diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2018-02-02 11:58:41 -0600 |
---|---|---|
committer | Christian R. Geddes <crgeddes@us.ibm.com> | 2018-02-22 14:22:28 -0500 |
commit | 3fbe556d9d69b8f4b7978f5b4053ca0bd9de9078 (patch) | |
tree | 9ed5569d8e07b48ed2a9ef5a49e2d3f5da585cf6 /src | |
parent | 33725d24db91b1877f4c07a004f236f10863bdad (diff) | |
download | talos-hostboot-3fbe556d9d69b8f4b7978f5b4053ca0bd9de9078.tar.gz talos-hostboot-3fbe556d9d69b8f4b7978f5b4053ca0bd9de9078.zip |
Additional risk level support - (step 2) Updating the image w/RL2
This commit changes the images' .rings section by adding the TOR
RL2 variant slot to the runtime Quad chiplets, EQ and EC.
Specifically, we have changed the definition of the ATTR_RISK_LEVEL
attribute to now have three risk levels, RL0 (prev FALSE), RL1
(prev TRUE) and RL2 (new). To accomodate RL2, a new "override"
txt file has been created, ./attribute_ovd/runtime_risk2.txt and
changes to many other files using the ATTR_RISK_LEVEL attrib have
been updated as well.
Lastly, and to allow for the inclusion of RL2 rings in the HW
image, the TOR_VERSION has been updated to version 6 which will
allow for RL2 support in the ring ID metadata files.
p9_setup_sbe_config is updated to write the RISK_LEVEL value into
scratch 3 bits 28:31, and deprecate the existing mailbox.
RISK_LEVEL processing has been removed from p9_sbe_attr_setup. It's
only function is to seed mailboxes which are empty via the
attribute state present in the SEEPROM. Since RISK_LEVEL is zero
at image build time, and explicitly cleared as a result of every
customization, there's logically no need to process the RISK_LEVEL
here.
PPE changes to accomodate the new RISK_LEVEL mailbox
location need to be implemented in the PLAT code: src/hwpf/target.C
Key_Cronus_Test=XIP_REGRESS
HW-ImageBuild-Preqeq=52659
- 52659 must be fully merged in Cronus and HB before this commit
(53292) can be merged. This is to avoid a Coreq situation.
CQ: SW416424
cmvc-prereq: 1046058
cmvc-prereq: 1043606
cmvc-prereq: 1045920
Change-Id: Ia0471219916602cc0041a2c55a1070013f66a7d9
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53292
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Tested-by: Cronus HW CI <cronushw-ci+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/53321
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: Christian R. Geddes <crgeddes@us.ibm.com>
Diffstat (limited to 'src')
4 files changed, 22 insertions, 18 deletions
diff --git a/src/import/chips/common/utils/imageProcs/common_ringId.H b/src/import/chips/common/utils/imageProcs/common_ringId.H index de2b13930..a317ac4b1 100644 --- a/src/import/chips/common/utils/imageProcs/common_ringId.H +++ b/src/import/chips/common/utils/imageProcs/common_ringId.H @@ -137,8 +137,8 @@ typedef uint16_t TorRingOffset_t; // Offset value to actual ring //#define TOR_VERSION 2 // Reduced RS4 header. //#define TOR_VERSION 3 // Added TOR magic header. //#define TOR_VERSION 4 // TOR API code restructuring. -#define TOR_VERSION 5 // Removed TOR-level DD handling. -//#define TOR_VERSION 6 // Added additional runtime risk level (RL2) +//#define TOR_VERSION 5 // Removed TOR-level DD handling. +#define TOR_VERSION 6 // Added additional runtime risk level (RL2) // TOR Magic values for top-level TOR ringSection and sub-ringSections enum TorMagicNum diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C b/src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C index f0b07d763..a6144985b 100644 --- a/src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C +++ b/src/import/chips/p9/procedures/hwp/perv/p9_setup_sbe_config.C @@ -72,6 +72,8 @@ enum P9_SETUP_SBE_CONFIG_Private_Constants // Scratch_reg_3 ATTR_BOOT_FLAGS_STARTBIT = 0, ATTR_BOOT_FLAGS_LENGTH = 32, + ATTR_RISK_LEVEL_STARTBIT = 28, + ATTR_RISK_LEVEL_LENGTH = 4, // Scratch_reg_4 ATTR_BOOT_FREQ_MULT_STARTBIT = 0, @@ -90,7 +92,7 @@ enum P9_SETUP_SBE_CONFIG_Private_Constants ATTR_PLL_MUX_LENGTH = 20, ATTR_CC_IPL_BIT = 0, ATTR_INIT_ALL_CORES_BIT = 1, - ATTR_RISK_LEVEL_BIT = 2, + ATTR_RISK_LEVEL_BIT_DEPRECATED = 2, ATTR_DISABLE_HBBL_VECTORS_BIT = 3, ATTR_MC_SYNC_MODE_BIT = 4, ATTR_SLOW_PCI_REF_CLOCK_BIT = 5, @@ -297,6 +299,7 @@ fapi2::ReturnCode p9_setup_sbe_config(const //set_scratch3_reg { FAPI_DBG("Reading Scratch_reg3"); + uint8_t l_risk_level; if ( l_accessViaScom ) { @@ -313,8 +316,10 @@ fapi2::ReturnCode p9_setup_sbe_config(const FAPI_DBG("Reading the BOOT_FLAGS"); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_BOOT_FLAGS, FAPI_SYSTEM, l_read_5)); + FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_RISK_LEVEL, FAPI_SYSTEM, l_risk_level)); l_read_scratch_reg.insertFromRight< ATTR_BOOT_FLAGS_STARTBIT, ATTR_BOOT_FLAGS_LENGTH >(l_read_5); + l_read_scratch_reg.insertFromRight< ATTR_RISK_LEVEL_STARTBIT, ATTR_RISK_LEVEL_LENGTH >(l_risk_level); FAPI_DBG("Setting up value of Scratch_reg3"); @@ -414,7 +419,6 @@ fapi2::ReturnCode p9_setup_sbe_config(const { uint8_t l_system_ipl_phase; uint8_t l_force_all_cores; - uint8_t l_risk_level; uint8_t l_disable_hbbl_vectors; uint32_t l_pll_mux; uint8_t l_mc_sync_mode; @@ -438,7 +442,6 @@ fapi2::ReturnCode p9_setup_sbe_config(const FAPI_DBG("Reading control flag attributes"); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYSTEM_IPL_PHASE, FAPI_SYSTEM, l_system_ipl_phase)); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_SYS_FORCE_ALL_CORES, FAPI_SYSTEM, l_force_all_cores)); - FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_RISK_LEVEL, FAPI_SYSTEM, l_risk_level)); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DISABLE_HBBL_VECTORS, FAPI_SYSTEM, l_disable_hbbl_vectors)); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_MC_SYNC_MODE, i_target_chip, l_mc_sync_mode)); FAPI_TRY(FAPI_ATTR_GET(fapi2::ATTR_DD1_SLOW_PCI_REF_CLOCK, FAPI_SYSTEM, l_slow_pci_ref_clock)); @@ -463,15 +466,8 @@ fapi2::ReturnCode p9_setup_sbe_config(const l_read_scratch_reg.clearBit<ATTR_INIT_ALL_CORES_BIT>(); } - // set risk level flag - if (l_risk_level == fapi2::ENUM_ATTR_RISK_LEVEL_TRUE) - { - l_read_scratch_reg.setBit<ATTR_RISK_LEVEL_BIT>(); - } - else - { - l_read_scratch_reg.clearBit<ATTR_RISK_LEVEL_BIT>(); - } + // risk level flag is deprecated here, moved to scratch3 + l_read_scratch_reg.clearBit<ATTR_RISK_LEVEL_BIT_DEPRECATED>(); // set disable of HBBL exception vector flag if (l_disable_hbbl_vectors == fapi2::ENUM_ATTR_DISABLE_HBBL_VECTORS_TRUE) diff --git a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C index 63aa86b22..4641d7d21 100644 --- a/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C +++ b/src/import/chips/p9/procedures/hwp/pm/p9_hcode_image_build.C @@ -2904,10 +2904,14 @@ fapi2::ReturnCode layoutRingsForCME( Homerlayout_t* i_pHomer, i_debugMode ); // get all the rings pertaining to CME in a work buffer first. - if( i_riskLevel ) + if( i_riskLevel == 0x1 ) { l_ringVariant = RV_RL; } + else if ( i_riskLevel == 0x2 ) + { + l_ringVariant = RV_RL2; + } ringLength = SWIZZLE_4_BYTE(pCmeHdr->g_cme_pstate_region_offset) + SWIZZLE_4_BYTE( pCmeHdr->g_cme_pstate_region_length); @@ -3370,10 +3374,14 @@ fapi2::ReturnCode layoutRingsForSGPE( Homerlayout_t* i_pHomer, { // get all the rings pertaining to CME in a work buffer first. - if( i_riskLevel ) + if( i_riskLevel == 0x1 ) { l_ringVariant = RV_RL; } + else if ( i_riskLevel == 0x2 ) + { + l_ringVariant = RV_RL2; + } //Manage the Quad Common rings in HOMER diff --git a/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml index 4c7cc2bc6..20c055671 100755 --- a/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/pervasive_attributes.xml @@ -5,7 +5,7 @@ <!-- --> <!-- OpenPOWER HostBoot Project --> <!-- --> -<!-- Contributors Listed Below - COPYRIGHT 2015,2017 --> +<!-- Contributors Listed Below - COPYRIGHT 2015,2018 --> <!-- [+] International Business Machines Corp. --> <!-- --> <!-- --> @@ -210,7 +210,7 @@ <description>HWP/Init "risk level" enabled. Used by HB to pass to HB driven HWPs</description> <valueType>uint8</valueType> - <enum>FALSE = 0x0,TRUE = 0x1</enum> + <enum>RL0 = 0x0,RL1 = 0x1,RL2 = 0x2</enum> <persistRuntime/> <platInit/> </attribute> |