oem ibm: support reading LIDs based on type
This commit reads the LIDs requested by Host. Host
sends request as T or P side. This commit evaluates the
current boot side and reads the appropriate LIDs.
Also this commit stores the image LIDs sent by Host
during an inband code update
Change-Id: Ia4bae68fa95f19bc228ef7002493d54abab3dc93
Signed-off-by: Sampa Misra <sampmisr@in.ibm.com>
diff --git a/oem/ibm/libpldmresponder/file_io_type_cert.cpp b/oem/ibm/libpldmresponder/file_io_type_cert.cpp
index f78dbf1..b49903c 100644
--- a/oem/ibm/libpldmresponder/file_io_type_cert.cpp
+++ b/oem/ibm/libpldmresponder/file_io_type_cert.cpp
@@ -21,7 +21,8 @@
CertMap CertHandler::certMap;
int CertHandler::writeFromMemory(uint32_t offset, uint32_t length,
- uint64_t address)
+ uint64_t address,
+ oem_platform::Handler* /*oemPlatformHandler*/)
{
auto it = certMap.find(certType);
if (it == certMap.end())
@@ -46,7 +47,8 @@
}
int CertHandler::readIntoMemory(uint32_t offset, uint32_t& length,
- uint64_t address)
+ uint64_t address,
+ oem_platform::Handler* /*oemPlatformHandler*/)
{
if (certType != PLDM_FILE_TYPE_CERT_SIGNING_REQUEST)
{
@@ -55,7 +57,8 @@
return transferFileData(csrFilePath, true, offset, length, address);
}
-int CertHandler::read(uint32_t offset, uint32_t& length, Response& response)
+int CertHandler::read(uint32_t offset, uint32_t& length, Response& response,
+ oem_platform::Handler* /*oemPlatformHandler*/)
{
if (certType != PLDM_FILE_TYPE_CERT_SIGNING_REQUEST)
{
@@ -64,7 +67,8 @@
return readFile(csrFilePath, offset, length, response);
}
-int CertHandler::write(const char* buffer, uint32_t offset, uint32_t& length)
+int CertHandler::write(const char* buffer, uint32_t offset, uint32_t& length,
+ oem_platform::Handler* /*oemPlatformHandler*/)
{
auto it = certMap.find(certType);
if (it == certMap.end())