Add PDR and BIOS support for Balcones
This commit adds the necessary changes needed to support the new
Balcones system. Below are the main changes
1. Sensors and effecters for Memory Boards
2. Sensors and effecters for single Cable Card
3. Power states for nvme drives
Tested By:
Tested with different system configurations and verified that
both PDR and BIOS tables are picked up correctly according
to the system specific json files
oem-ibm flag:
Change successfully built with -Doem-ibm=disabled
Change-Id: Ic39b7078f8a19ca00dec7ce8b4014ee2659b7776
Signed-off-by: Jayashankar Padath <jayashankarpadath@gmail.com>
diff --git a/libpldmresponder/platform_config.cpp b/libpldmresponder/platform_config.cpp
index 8f181f1..aa7f15d 100644
--- a/libpldmresponder/platform_config.cpp
+++ b/libpldmresponder/platform_config.cpp
@@ -150,15 +150,15 @@
return std::nullopt;
}
- for (const auto& dirEntry : std::filesystem::directory_iterator{dirPath})
+ for (const auto& compatibleName : dirNames)
{
- if (dirEntry.is_directory())
+ for (const auto& dirEntry :
+ std::filesystem::directory_iterator{dirPath})
{
- const auto sysDir = dirEntry.path().filename().string();
- if (std::find(dirNames.begin(), dirNames.end(), sysDir) !=
- dirNames.end())
+ if (dirEntry.is_directory() &&
+ (compatibleName == dirEntry.path().filename()))
{
- return sysDir;
+ return compatibleName;
}
}
}