Add Post code description
Added functionality to read post code description from post_desc.json
file stored in /usr/share/ipmi-providers/. This file is platform
specific and can be overwritten for different platforms. This
post code description will be requested by lcd debug card for
displaying in screen.
Tested: verified with lcd debug card screen.
Change-Id: I655178fd031cf7107a04db1f587ae35a1bc9d4d8
Signed-off-by: Vijay Khemka <vijaykhemka@fb.com>
diff --git a/src/oemcommands.cpp b/src/oemcommands.cpp
index cc3a604..b628c7b 100644
--- a/src/oemcommands.cpp
+++ b/src/oemcommands.cpp
@@ -44,8 +44,8 @@
sdbusplus::bus::bus dbus(ipmid_get_sd_bus_connection()); // from ipmid/api.h
static constexpr size_t maxFRUStringLength = 0x3F;
-ipmi_ret_t plat_udbg_get_post_desc(uint8_t, uint8_t *, uint8_t, uint8_t *,
- uint8_t *, uint8_t *);
+int plat_udbg_get_post_desc(uint8_t, uint8_t *, uint8_t, uint8_t *, uint8_t *,
+ uint8_t *);
ipmi_ret_t plat_udbg_get_frame_data(uint8_t, uint8_t, uint8_t *, uint8_t *,
uint8_t *);
ipmi_ret_t plat_udbg_control_panel(uint8_t, uint8_t, uint8_t, uint8_t *,
@@ -444,16 +444,13 @@
uint8_t next = 0;
uint8_t end = 0;
uint8_t phase = 0;
- uint8_t count = 0;
+ uint8_t descLen = 0;
int ret;
index = req[3];
phase = req[4];
- phosphor::logging::log<phosphor::logging::level::INFO>(
- "Get POST Description Event");
-
- ret = plat_udbg_get_post_desc(index, &next, phase, &end, &count, &res[8]);
+ ret = plat_udbg_get_post_desc(index, &next, phase, &end, &descLen, &res[8]);
if (ret)
{
memcpy(res, req, SIZE_IANA_ID); // IANA ID
@@ -466,8 +463,8 @@
res[4] = next;
res[5] = phase;
res[6] = end;
- res[7] = count;
- *data_len = SIZE_IANA_ID + 5 + count;
+ res[7] = descLen;
+ *data_len = SIZE_IANA_ID + 5 + descLen;
return IPMI_CC_OK;
}