monitor: Add Intel read supported features command
authorTedd Ho-Jeong An <tedd.an@intel.com>
Mon, 19 Apr 2021 18:21:49 +0000 (11:21 -0700)
committerAyush Garg <ayush.garg@samsung.com>
Fri, 11 Mar 2022 13:38:35 +0000 (19:08 +0530)
< HCI Command: Intel Read Supported Features (0x3f|0x00a6) plen 1
        Page: 0x01
> HCI Event: Command Complete (0x0e) plen 22
      Intel Read Supported Features (0x3f|0x00a6) ncmd 1
        Status: Success (0x00)
        Page: 0x01
        Max Pages: 0x02
        Supported Features:
        1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................

Signed-off-by: Anuj Jain <anuj01.jain@samsung.com>
Signed-off-by: Ayush Garg <ayush.garg@samsung.com>
monitor/intel.c

index 62c8303..b1ec5df 100755 (executable)
@@ -470,6 +470,26 @@ static void memory_write_cmd(const void *data, uint8_t size)
        packet_hexdump(data + 6, size - 6);
 }
 
+static void read_supported_features_cmd(const void *data, uint8_t size)
+{
+       uint8_t page = get_u8(data);
+
+       print_field("Page: 0x%2.2x", page);
+}
+
+static void read_supported_features_rsp(const void *data, uint8_t size)
+{
+       uint8_t status = get_u8(data);
+       uint8_t page = get_u8(data + 1);
+       uint8_t max_pages = get_u8(data + 2);
+
+       print_status(status);
+       print_field("Page: 0x%2.2x", page);
+       print_field("Max Pages: 0x%2.2x", max_pages);
+       print_field("Supported Features:");
+       packet_hexdump(data + 3, size - 3);
+}
+
 static const struct vendor_ocf vendor_ocf_table[] = {
        { 0x001, "Reset",
                        reset_cmd, 8, true,
@@ -532,6 +552,10 @@ static const struct vendor_ocf vendor_ocf_table[] = {
        { 0x08e, "Memory Write",
                        memory_write_cmd, 6, false,
                        status_rsp, 1, true },
+       { 0x0a6, "Read Supported Features",
+                       read_supported_features_cmd, 1, true,
+                       read_supported_features_rsp, 19, true },
+
        { }
 };