diff options
author | Samuel Mendoza-Jonas <sjonas@au1.ibm.com> | 2018-06-27 13:35:35 +1000 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-10-16 13:55:50 -0500 |
commit | cd400323aa493e656fb839202d6f6414a3b040af (patch) | |
tree | b1a053b10829eaa30b267051579fcbcacdfdddf4 /src/usr/ipmiext | |
parent | ce1ebd1460c3666a8e8553d0f57e5dc8bf5aa344 (diff) | |
download | blackbird-hostboot-cd400323aa493e656fb839202d6f6414a3b040af.tar.gz blackbird-hostboot-cd400323aa493e656fb839202d6f6414a3b040af.zip |
genPnorImages: Add VERSION to signed partitions
Mark VERSION as a signed partition and also check for it in the IPMI FRU
setup.
Change-Id: I6e8690c4f34d1f5ce92750960e6c73afcbf0a8e9
CQ:SW416159
Signed-off-by: Samuel Mendoza-Jonas <sjonas@au1.ibm.com>
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/61439
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/ipmiext')
-rw-r--r-- | src/usr/ipmiext/ipmifruinv.C | 47 |
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); |