Skip to content

Commit

Permalink
Add translation for SuperWOF lid id
Browse files Browse the repository at this point in the history
Missed a PNOR->Lid translation entry for the new WOFDATA lid
supporting Super WOF on the Gen4 systems.  This is needed for
Opal boots.

Change-Id: Ib6afafc5286a82bb5c5b8f9c713370985475e836
CQ: SW488396
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/94118
Reviewed-by: Michael Baiocchi <mbaiocch@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: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Reviewed-by: Corey V Swenson <cswenson@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Nicholas E Bofferding <bofferdn@us.ibm.com>
  • Loading branch information
dcrowell77 authored and Nicholas E Bofferding committed Mar 31, 2020
1 parent e69d7d9 commit 0b49c19
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/include/usr/util/utillidpnor.H
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2017 */
/* Contributors Listed Below - COPYRIGHT 2014,2020 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -52,8 +52,8 @@ struct LidAndContainerLid
lid(i_lid), containerLid(i_containerLid) {}
};

typedef std::map<PNOR::SectionId, LidAndContainerLid > PnorLidsMap;
typedef std::pair<PNOR::SectionId, LidAndContainerLid> PnorLidsPair;
typedef std::vector<PnorLidsPair> PnorLidsMap;

/**
* @brief Returns Lid and ContainerLid (Secure Header) Ids associated with a
Expand Down
10 changes: 8 additions & 2 deletions src/usr/util/utillidpnor.C
Expand Up @@ -51,17 +51,23 @@ static const PnorLidsMap PnorToLidsMap =
{ PNOR::VERSION, LidAndContainerLid(VERSION_LIDID, INVALID_LIDID)},
{ PNOR::OCC, LidAndContainerLid(OCC_LIDID, OCC_CONTAINER_LIDID)},
{ PNOR::WOFDATA, LidAndContainerLid(WOF_LIDID, WOF_CONTAINER_LIDID)},
{ PNOR::WOFDATA, LidAndContainerLid(WOF_GEN4_LIDID, WOF_GEN4_CONTAINER_LIDID)},
{ PNOR::HCODE, LidAndContainerLid(NIMBUS_HCODE_LIDID, HCODE_CONTAINER_LIDID)},
{ PNOR::RINGOVD, LidAndContainerLid(HWREFIMG_RINGOVD_LIDID,INVALID_LIDID)},
// Note - This list does not include data that is used on non-OPAL
// systems, e.g. CUMULUS_HCODE, WOF_GEN4
// systems, e.g. CUMULUS_HCODE
};

LidAndContainerLid getPnorSecLidIds(const PNOR::SectionId i_sec)
{
LidAndContainerLid l_lids;

auto l_secIter = PnorToLidsMap.find(i_sec);
auto l_secIter = std::find_if(PnorToLidsMap.begin(),
PnorToLidsMap.end(),
[i_sec](const PnorLidsPair & pair) -> bool
{
return pair.first == i_sec;
});
if (l_secIter != PnorToLidsMap.end())
{
l_lids.lid = l_secIter->second.lid;
Expand Down

0 comments on commit 0b49c19

Please sign in to comment.