summaryrefslogtreecommitdiffstats
path: root/src/usr/ipmiext
diff options
context:
space:
mode:
Diffstat (limited to 'src/usr/ipmiext')
-rw-r--r--src/usr/ipmiext/ipmifruinv.C47
1 files changed, 46 insertions, 1 deletions
diff --git a/src/usr/ipmiext/ipmifruinv.C b/src/usr/ipmiext/ipmifruinv.C
index 8e49ed7ba..e3518e20a 100644
--- a/src/usr/ipmiext/ipmifruinv.C
+++ b/src/usr/ipmiext/ipmifruinv.C
@@ -8,6 +8,7 @@
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* [+] International Business Machines Corp. */
/* [+] Jim Yuan */
+/* [+] Maxim Polyakov */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -1389,7 +1390,7 @@ errlHndl_t systemFwIpmiFruInv::buildBoardInfoArea(std::vector<uint8_t> &io_data)
errlHndl_t systemFwIpmiFruInv::buildProductInfoArea(std::vector<uint8_t>
&io_data)
{
- errlHndl_t l_errl = NULL;
+ errlHndl_t l_errl = nullptr, l_errl_version = nullptr;
do {
//Set formatting data that goes at the beginning of the record
@@ -1404,6 +1405,16 @@ errlHndl_t systemFwIpmiFruInv::buildProductInfoArea(std::vector<uint8_t>
&l_data[0],
&l_data[0] + (uint8_t(sizeof(l_data) / sizeof(uint8_t))));
+#ifdef CONFIG_SECUREBOOT
+ l_errl_version = PNOR::loadSecureSection(PNOR::VERSION);
+ if (l_errl_version)
+ {
+ TRACFCOMP(g_trac_ipmi,
+ "buildProductInfoArea: Failed to load secure VERSION");
+ break;
+ }
+#endif
+
//Get PNOR Version Here
PNOR::SectionInfo_t l_pnorInfo;
l_errl = getSectionInfo( PNOR::VERSION , l_pnorInfo);
@@ -1535,6 +1546,40 @@ errlHndl_t systemFwIpmiFruInv::buildProductInfoArea(std::vector<uint8_t>
} while(0);
+#ifdef CONFIG_SECUREBOOT
+ if (l_errl_version == nullptr)
+ {
+ l_errl_version = unloadSecureSection(PNOR::VERSION);
+ if (l_errl_version)
+ {
+ TRACFCOMP(g_trac_ipmi,
+ "buildProductInfoArea: Failed to unload secure VERSION");
+ if (l_errl)
+ {
+ errlCommit(l_errl_version, IPMI_COMP_ID);
+ }
+ else
+ {
+ l_errl = l_errl_version;
+ l_errl_version = nullptr;
+ }
+ }
+ }
+ else
+ {
+ if (l_errl)
+ {
+ errlCommit(l_errl_version, IPMI_COMP_ID);
+ }
+ else
+ {
+ l_errl = l_errl_version;
+ l_errl_version = nullptr;
+ }
+ }
+#endif
+
+
//Finalize section formatting
postFormatProcessing(io_data);
OpenPOWER on IntegriCloud