usb-dbg: add meson option for enabling ME support
Add a meson option called me_support for enabling ME related feature.
Default value is true (enable)
Tested on Bletchley with me_support false
Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I7e9f632b53c68b95f1d63f5408a9025f2a20fc3a
diff --git a/src/usb-dbg.cpp b/src/usb-dbg.cpp
index c030e4e..8b6c6e5 100644
--- a/src/usb-dbg.cpp
+++ b/src/usb-dbg.cpp
@@ -869,6 +869,7 @@
return 0;
}
+#ifdef ME_SUPPORT
static int getMeStatus(std::string& status, size_t pos)
{
uint8_t cmd = 0x01; // Get Device id command
@@ -918,6 +919,7 @@
return 0;
}
+#endif
static int udbg_get_info_page(uint8_t, uint8_t page, uint8_t* next,
uint8_t* count, uint8_t* buffer)
@@ -1005,6 +1007,8 @@
frame_info.append("BIOS_FW_ver:", 0);
frame_info.append(biosVer.c_str(), 1);
}
+
+#ifdef ME_SUPPORT
// ME status
std::string meStatus;
if (getMeStatus(meStatus, pos) != 0)
@@ -1015,6 +1019,7 @@
}
frame_info.append("ME_status:", 0);
frame_info.append(meStatus.c_str(), 1);
+#endif
}
/* TBD: Board ID needs implementation */