Skip to content

Commit

Permalink
SMF: Create New UVBWLIST Partition
Browse files Browse the repository at this point in the history
A new partition was added for the contents of the XSCOM
white/blacklist called UVBWLIST. When the time comes,
this partition will hold the binary representation of
the aforementioned lists. The partition is dumped into
hostboot reserved memory for Ultravisor consumption.

Change-Id: I06ebce74aae3c0df987e5a057967842042db2bae
RTC: 192422
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/68869
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: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
  • Loading branch information
Ilya Smirnov authored and dcrowell77 committed Jan 24, 2019
1 parent 799f85e commit 9de9d8f
Show file tree
Hide file tree
Showing 7 changed files with 29 additions and 10 deletions.
11 changes: 10 additions & 1 deletion src/build/buildpnor/defaultPnorLayout.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<!-- -->
<!-- OpenPOWER HostBoot Project -->
<!-- -->
<!-- Contributors Listed Below - COPYRIGHT 2012,2018 -->
<!-- Contributors Listed Below - COPYRIGHT 2012,2019 -->
<!-- [+] International Business Machines Corp. -->
<!-- -->
<!-- -->
Expand Down Expand Up @@ -325,4 +325,13 @@ Layout Description
<sha512Version/>
<ecc/>
</section>
<section>
<description>Ultravisor XSCOM White/Blacklist (64K)</description>
<eyeCatch>UVBWLIST</eyeCatch>
<physicalOffset>0x3DF4000</physicalOffset>
<physicalRegionSize>0x10000</physicalRegionSize>
<side>sideless</side>
<sha512Version/>
<readOnly/>
</section>
</pnor>
3 changes: 2 additions & 1 deletion src/build/buildpnor/genPnorImages.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# OpenPOWER HostBoot Project
#
# Contributors Listed Below - COPYRIGHT 2016,2018
# Contributors Listed Below - COPYRIGHT 2016,2019
# [+] International Business Machines Corp.
#
#
Expand Down Expand Up @@ -523,6 +523,7 @@ sub manipulateImages
$isNormalSecure ||= ($eyeCatch eq "TESTRO");
$isNormalSecure ||= ($eyeCatch eq "TESTLOAD");
$isNormalSecure ||= ($eyeCatch eq "VERSION");
$isNormalSecure ||= ($eyeCatch eq "UVBWLIST");

my $isSpecialSecure = ($eyeCatch eq "HBB");
$isSpecialSecure ||= ($eyeCatch eq "HBD");
Expand Down
5 changes: 3 additions & 2 deletions src/build/mkrules/hbfw/img/makefile
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ RINGOVD_FINAL_IMG = RINGOVD.bin
SBKT_FINAL_IMG = SBKT.bin
FIRDATA_FINAL_IMG = FIRDATA.bin
MEMD_FINAL_IMG = MEMD.bin
UVBWLIST_FINAL_IMG = UVBWLIST.bin
FINAL_OUTPUT_IMAGES = ${HBBL_FINAL_IMG} ${HBB_FINAL_IMG} ${HBI_FINAL_IMG} \
${HBRT_FINAL_IMG} ${TEST_FINAL_IMG} ${TESTRO_FINAL_IMG} \
${HBEL_FINAL_IMG} ${GUARD_FINAL_IMG} ${GLOBAL_FINAL_IMG} \
Expand Down Expand Up @@ -207,7 +208,7 @@ BUILD_TYPE_PARAMS = --build-type fspbuild
.if (${FAKEPNOR} == "")
# Parameters passed into GEN_PNOR_IMAGE_SCRIPT.
.if (${PNOR_LAYOUT_SELECTED} == 1)
GEN_DEFAULT_BIN_FILES = HBBL=${HBBL_IMG},HBB=${HBB_IMG},HBI=${HBI_IMG},HBRT=${HBRT_IMG},TEST=EMPTY,TESTRO=EMPTY,TESTLOAD=EMPTY,HBEL=EMPTY,GUARD=EMPTY,GLOBAL=EMPTY,PAYLOAD=EMPTY,CVPD=EMPTY,MVPD=EMPTY,DJVPD=EMPTY,RINGOVD=EMPTY,SBKT=EMPTY,FIRDATA=EMPTY,MEMD=${${ZZ_MEMD_IMG}:P}
GEN_DEFAULT_BIN_FILES = HBBL=${HBBL_IMG},HBB=${HBB_IMG},HBI=${HBI_IMG},HBRT=${HBRT_IMG},TEST=EMPTY,TESTRO=EMPTY,TESTLOAD=EMPTY,HBEL=EMPTY,GUARD=EMPTY,GLOBAL=EMPTY,PAYLOAD=EMPTY,CVPD=EMPTY,MVPD=EMPTY,DJVPD=EMPTY,RINGOVD=EMPTY,SBKT=EMPTY,FIRDATA=EMPTY,MEMD=${${ZZ_MEMD_IMG}:P},UVBWLIST=EMPTY
.else
GEN_DEFAULT_BIN_FILES = HBBL=${HBBL_IMG},HBB=${HBB_IMG},HBI=${HBI_IMG},HBRT=${HBRT_IMG},HBEL=EMPTY,GUARD=EMPTY,GLOBAL=EMPTY,CVPD=EMPTY,MVPD=EMPTY,DJVPD=EMPTY,RINGOVD=EMPTY,SBKT=EMPTY,MEMD=${${ZZ_MEMD_IMG}:P}
.endif
Expand Down Expand Up @@ -470,7 +471,7 @@ gen_system_specific_images: build_sbe_partitions .PMAKE
@${MAKE:T:R} gen_system_specific_images_bypass_cache

.if (${PNOR_LAYOUT_SELECTED} == 1)
HOSTBOOT_DEFAULT_SECTIONS = HBBL=${HBBL_FINAL_IMG},HBB=${HBB_FINAL_IMG},HBI=${HBI_FINAL_IMG},HBRT=${HBRT_FINAL_IMG},TEST=${TEST_FINAL_IMG},TESTRO=${TESTRO_FINAL_IMG},TESTLOAD=${TESTLOAD_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},GUARD=${GUARD_FINAL_IMG},GLOBAL=${GLOBAL_FINAL_IMG},PAYLOAD=${PAYLOAD_FINAL_IMG},CVPD=${CVPD_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},RINGOVD=${RINGOVD_FINAL_IMG},SBKT=${SBKT_FINAL_IMG},FIRDATA=${FIRDATA_FINAL_IMG}
HOSTBOOT_DEFAULT_SECTIONS = HBBL=${HBBL_FINAL_IMG},HBB=${HBB_FINAL_IMG},HBI=${HBI_FINAL_IMG},HBRT=${HBRT_FINAL_IMG},TEST=${TEST_FINAL_IMG},TESTRO=${TESTRO_FINAL_IMG},TESTLOAD=${TESTLOAD_FINAL_IMG},HBEL=${HBEL_FINAL_IMG},GUARD=${GUARD_FINAL_IMG},GLOBAL=${GLOBAL_FINAL_IMG},PAYLOAD=${PAYLOAD_FINAL_IMG},CVPD=${CVPD_FINAL_IMG},MVPD=${MVPD_FINAL_IMG},DJVPD=${DJVPD_FINAL_IMG},RINGOVD=${RINGOVD_FINAL_IMG},SBKT=${SBKT_FINAL_IMG},FIRDATA=${FIRDATA_FINAL_IMG},UVBWLIST=${UVBWLIST_FINAL_IMG}
NIMBUS_SECT = HBD=${NIMBUS_HBD_FINAL_IMG},SBE=${NIMBUS_SBE_FINAL_IMG},HCODE=${NIMBUS_HCODE_FINAL_IMG},OCC=${NIMBUS_OCC_FINAL_IMG},WOFDATA=${ZZ_WOFDATA_FINAL_IMG},CENHWIMG=${NIMBUS_CENHWIMG_FINAL_IMG},MEMD=${ZZ_MEMD_FINAL_IMG}
CUMULUS_SECT = HBD=${CUMULUS_HBD_FINAL_IMG},SBE=${CUMULUS_SBE_FINAL_IMG},HCODE=${CUMULUS_HCODE_FINAL_IMG},OCC=${CUMULUS_OCC_FINAL_IMG},WOFDATA=${ZEPPELIN_WOFDATA_FINAL_IMG},CENHWIMG=${CUMULUS_CENHWIMG_FINAL_IMG},MEMD=${ZEPPELIN_MEMD_FINAL_IMG}
CUMULUS_CDIMM_SECT = HBD=${CUMULUS_CDIMM_HBD_FINAL_IMG},SBE=${CUMULUS_SBE_FINAL_IMG},HCODE=${CUMULUS_HCODE_FINAL_IMG},OCC=${CUMULUS_OCC_FINAL_IMG},WOFDATA=${ZEPPELIN_WOFDATA_FINAL_IMG},CENHWIMG=${CUMULUS_CENHWIMG_FINAL_IMG},MEMD=${MEMD_FINAL_IMG}
Expand Down
1 change: 1 addition & 0 deletions src/include/usr/pnor/pnor_const.H
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,7 @@ enum SectionId
CENTAUR_HW_IMG, /**< Centaur HCODE Reference image */
HDAT, /**< HDAT data */
EECACHE,
UVBWLIST, /**< Ultravisor XSCOM white/blacklist binary */
#endif
NUM_SECTIONS, /**< Number of defined sections */

Expand Down
4 changes: 3 additions & 1 deletion src/usr/pnor/pnor_utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,8 @@ bool PNOR::isEnforcedSecureSection(const uint32_t i_section)
i_section == MEMD ||
i_section == CAPP ||
i_section == TESTLOAD ||
i_section == VERSION;
i_section == VERSION ||
i_section == UVBWLIST;
#endif
#else
return false;
Expand Down Expand Up @@ -450,6 +451,7 @@ const char * PNOR::SectionIdToString( uint32_t i_secIdIndex )
"CENHWIMG", /**< PNOR::CENTAUR_HW_IMG : Centaur HCODE ref image */
"HDAT", /**< PNOR::HDAT : Hdat Data */
"EECACHE", /**< PNOR::EECACHE : Cached data from various EEPROMs */
"UVBWLIST", /**< PNOR::UVBWLIST : Ultravisor XSCOM white/blacklist */
#endif
};

Expand Down
4 changes: 4 additions & 0 deletions src/usr/runtime/common/runtime_utils.C
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ namespace RUNTIME
// -- OCC
// -- WOFDATA
// -- HCODE
// -- UVBWLIST
// -- Images that never have secure headers
/// -- RINGOVD
const PreVerifyVector preVerifiedPnorSections {
Expand All @@ -39,6 +40,9 @@ const PreVerifyVector preVerifiedPnorSections {
{PNOR::HCODE, true},
{PNOR::VERSION, true},
{PNOR::RINGOVD, false},
#ifndef CONFIG_FSP_BUILD
{PNOR::UVBWLIST, true},
#endif
};

bool isPreVerifiedSection(const PNOR::SectionId i_section)
Expand Down
11 changes: 6 additions & 5 deletions src/usr/util/utillidpnor.C
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER HostBoot Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2014,2018 */
/* Contributors Listed Below - COPYRIGHT 2014,2019 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -48,11 +48,12 @@ const size_t lidIdStrLength = 9;
// The second Lid in the pair is the Container LID (Secure Header)
static const PnorLidsMap PnorToLidsMap =
{
{ PNOR::TESTRO, LidAndContainerLid(TEST_LIDID, INVALID_LIDID)},
{ PNOR::TESTRO, LidAndContainerLid(TEST_LIDID, INVALID_LIDID)},
{ PNOR::VERSION, LidAndContainerLid(VERSION_LIDID, INVALID_LIDID)},
{ PNOR::OCC, LidAndContainerLid(OCC_LIDID, OCC_CONTAINER_LIDID)},
{ PNOR::WOFDATA, LidAndContainerLid(WOF_LIDID, WOF_CONTAINER_LIDID)},
{ PNOR::HCODE, LidAndContainerLid(NIMBUS_HCODE_LIDID, HCODE_CONTAINER_LIDID)},
{ PNOR::OCC, LidAndContainerLid(OCC_LIDID, OCC_CONTAINER_LIDID)},
{ PNOR::WOFDATA, LidAndContainerLid(WOF_LIDID, WOF_CONTAINER_LIDID)},
{ PNOR::HCODE, LidAndContainerLid(NIMBUS_HCODE_LIDID, HCODE_CONTAINER_LIDID)},
{ PNOR::UVBWLIST, LidAndContainerLid(TEST_LIDID, INVALID_LIDID)},
/* @TODO RTC:177927 - Figure out how to handle different Lids for the
same PNOR section based on chip.
{ PNOR::HCODE, LidAndContainerLid(CUMULUS_HCODE_LIDID, HCODE_CONTAINER_LIDID)},
Expand Down

0 comments on commit 9de9d8f

Please sign in to comment.