Log PEL if System type DTB not supported
System boots up with respective dtb for that system type,
which is based on HW and IM keyword of system VPD.
If any new value comes for these keywords, that needs to be supported
in vpd-parser, otherwise it will log PEL and exit.
This commit is dependent on PDI change-
https://gerrit.openbmc-project.xyz/c/openbmc/phosphor-dbus-interfaces/+/49025
Signed-off-by: Alpana Kumari <alpankum@in.ibm.com>
Change-Id: I66e43a8aab38511bfaa59641556ea9e58b3f87e2
diff --git a/ibm_vpd_app.cpp b/ibm_vpd_app.cpp
index 7f9e383..43d8280 100644
--- a/ibm_vpd_app.cpp
+++ b/ibm_vpd_app.cpp
@@ -682,8 +682,17 @@
else
{
// System type not supported
- cerr << "This System type not found/supported in dtb table "
- << systemType << ". so system will be booted with default dtb.\n";
+ string err = "This System type not found/supported in dtb table " +
+ systemType +
+ ".Please check the HW and IM keywords in the system "
+ "VPD.Breaking...";
+
+ // map to hold additional data in case of logging pel
+ PelAdditionalData additionalData{};
+ additionalData.emplace("DESCRIPTION", err);
+ createPEL(additionalData, PelSeverity::WARNING,
+ errIntfForInvalidSystemType);
+ exit(-1);
}
string readVarValue;