oem-ibm: PCIe Topology support
This is the infrastructure commit to support PCIe Topology
PCIe topology refers to the physical arrangement of PCIe devices within
the system. Topology data contains links connecting PCIe device to the
PCIe Controller. This commit adds support for PCIe Topology and Cable
information filetype. Topology information is provided by host using
FILIO mechanism.
This commit adds support for handling
1. Topology file(PLDM_FILE_TYPE_PCIE_TOPOLOGY)
2. Cable information file(PLDM_FILE_TYPE_CABLE_INFO)
Tested: Updated Unit test and tested power on.
Change-Id: Ic77f4f9921dd855c61c3929b5a458d80b1691b48
Signed-off-by: Archana Kakani <archana.kakani@ibm.com>
diff --git a/oem/ibm/test/libpldmresponder_fileio_test.cpp b/oem/ibm/test/libpldmresponder_fileio_test.cpp
index d9d68e7..2ca1016 100644
--- a/oem/ibm/test/libpldmresponder_fileio_test.cpp
+++ b/oem/ibm/test/libpldmresponder_fileio_test.cpp
@@ -4,6 +4,7 @@
#include "libpldmresponder/file_io_type_cert.hpp"
#include "libpldmresponder/file_io_type_dump.hpp"
#include "libpldmresponder/file_io_type_lid.hpp"
+#include "libpldmresponder/file_io_type_pcie.hpp"
#include "libpldmresponder/file_io_type_pel.hpp"
#include "libpldmresponder/file_table.hpp"
#include "xyz/openbmc_project/Common/error.hpp"
@@ -883,6 +884,14 @@
certType = dynamic_cast<CertHandler*>(handler.get());
ASSERT_TRUE(certType != nullptr);
+ handler = getHandlerByType(PLDM_FILE_TYPE_PCIE_TOPOLOGY, fileHandle);
+ auto pcieTopologyType = dynamic_cast<PCIeInfoHandler*>(handler.get());
+ ASSERT_TRUE(pcieTopologyType != nullptr);
+
+ handler = getHandlerByType(PLDM_FILE_TYPE_CABLE_INFO, fileHandle);
+ auto cableInfoType = dynamic_cast<PCIeInfoHandler*>(handler.get());
+ ASSERT_TRUE(cableInfoType != nullptr);
+
handler = getHandlerByType(PLDM_FILE_TYPE_ROOT_CERT, fileHandle);
certType = dynamic_cast<CertHandler*>(handler.get());
ASSERT_TRUE(certType != nullptr);