diff options
| author | Sumit Kumar <sumit_kumar@in.ibm.com> | 2017-01-31 04:50:15 -0600 |
|---|---|---|
| committer | Sachin Gupta <sgupta2m@in.ibm.com> | 2017-11-02 02:50:48 -0400 |
| commit | 0d8c248cc29e659ab67fffcd26f54a660569ab8a (patch) | |
| tree | 855fc8c36bdc6db447061de8c971b03bc069a751 /src/hwpf | |
| parent | 67a37783b04bb5b8de3648def3329b0b5000b852 (diff) | |
| download | talos-sbe-0d8c248cc29e659ab67fffcd26f54a660569ab8a.tar.gz talos-sbe-0d8c248cc29e659ab67fffcd26f54a660569ab8a.zip | |
Centaur ring support - ring_apply and ring data
- Introduces Centaur ring ID header files and ring_apply support to generate
a separate Centaur ring image file.
- Introduces common ring ID header file consumed by both P9 and Centaur and
all user codes, e.g. putRing, ipl_build, xip_tool, etc.
- Introduces a namespace approach for complete separation of P9 and Centaur
ring data and to facilitate execution time selection of either P9 and
Centaur ring data.
- Added Centaur image .rings generation function to p9_ring_apply.
- This commit does NOT support Centaur in the TOR API nor in xip_tool. See
commit 38018 for that support.
- Modified hw_image.mk file to support Centaur XIP image generation.
- Updated ring_apply to also support .overrides ring gen for Centaur.
Change-Id: I12a27b194dc14d906fea7bc273eb9f766f0fc5bf
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35639
Tested-by: HWSV CI <hwsv-ci+hostboot@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Sumit Kumar <sumit_kumar@in.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: Thi N. Tran <thi@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36010
Reviewed-by: Hostboot Team <hostboot@us.ibm.com>
Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/hwpf')
| -rw-r--r-- | src/hwpf/plat_ring_traverse.C | 21 | ||||
| -rw-r--r-- | src/hwpf/plat_ring_traverse.H | 21 |
2 files changed, 20 insertions, 22 deletions
diff --git a/src/hwpf/plat_ring_traverse.C b/src/hwpf/plat_ring_traverse.C index 41ce2fe7..101c066b 100644 --- a/src/hwpf/plat_ring_traverse.C +++ b/src/hwpf/plat_ring_traverse.C @@ -33,7 +33,6 @@ // SEEPROM start address const uint32_t g_seepromAddr = SBE_SEEPROM_BASE_ORIGIN; -using namespace RING_TYPES; const uint32_t CACHE_CONTAINED_MODE = 4; const uint32_t RISK_LEVEL_MODE = 1; #define CACHE_CONTAINED_MODE_OFFSET_IN_TOR 1 @@ -51,7 +50,7 @@ const uint32_t RISK_LEVEL_MODE = 1; /// fapi2::ReturnCode findRS4InImageAndApply( const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, - const RingID i_ringID, + const RingId_t i_ringID, const fapi2::RingMode i_ringMode) { SBE_TRACE(">> findRS4InImageAndApply"); @@ -75,12 +74,12 @@ fapi2::ReturnCode findRS4InImageAndApply( } uint8_t l_torHdrSz; - P9_TOR::TorHeader_t* torHeader = (P9_TOR::TorHeader_t*)(g_seepromAddr + - l_section->iv_offset); + TorHeader_t* torHeader = (TorHeader_t*)(g_seepromAddr + + l_section->iv_offset); - if (torHeader->magic == P9_TOR::TOR_MAGIC_SBE) + if (torHeader->magic == TOR_MAGIC_SBE) { - l_torHdrSz = sizeof(P9_TOR::TorHeader_t); + l_torHdrSz = sizeof(TorHeader_t); } else { @@ -90,7 +89,7 @@ fapi2::ReturnCode findRS4InImageAndApply( // an error. l_torHdrSz = 0; SBE_TRACE("TOR magic header (=0x%08x) != TOR_MAGIC_SBE (=0x%08x)", - torHeader->magic, P9_TOR::TOR_MAGIC_SBE); + torHeader->magic, TOR_MAGIC_SBE); } SectionTOR* l_sectionTOR = (SectionTOR*)(g_seepromAddr + @@ -137,7 +136,7 @@ fapi2::ReturnCode findRS4InImageAndApply( fapi2::ReturnCode getRS4ImageFromTor( const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, - const RingID i_ringID, + const RingId_t i_ringID, SectionTOR* i_sectionTOR, bool i_applyOverride, const uint32_t i_sectionOffset, @@ -146,8 +145,8 @@ fapi2::ReturnCode getRS4ImageFromTor( // Determine the Offset ID and Ring Type for the given Ring ID. uint32_t l_torOffset = 0; - RINGTYPE l_ringType = COMMON_RING; - CHIPLET_TYPE l_chipLetType; + RingType_t l_ringType = COMMON_RING; + ChipletType_t l_chipLetType = INVALID_CHIPLET_TYPE; fapi2::ReturnCode l_rc = fapi2::FAPI2_RC_SUCCESS; do @@ -155,7 +154,7 @@ fapi2::ReturnCode getRS4ImageFromTor( getRingProperties(i_ringID, l_torOffset, l_ringType, l_chipLetType); - if(INVALID_RING == l_torOffset) + if(INVALID_RING_OFFSET == l_torOffset) { SBE_TRACE("Invalid Ring ID - %d", i_ringID); l_rc = fapi2::FAPI2_RC_INVALID_PARAMETER; diff --git a/src/hwpf/plat_ring_traverse.H b/src/hwpf/plat_ring_traverse.H index cd5fbc29..71e01ef3 100644 --- a/src/hwpf/plat_ring_traverse.H +++ b/src/hwpf/plat_ring_traverse.H @@ -6,6 +6,7 @@ /* OpenPOWER sbe Project */ /* */ /* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* [+] International Business Machines Corp. */ /* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ @@ -27,8 +28,6 @@ #include <p9_putRingUtils.H> // for RS4 decompression utilities -using namespace RING_TYPES; - /// @brief This structure represents the layout of the Section-TOR /// Section-TOR has the offsets to the different chiplet's /// Common Ring section and Instance Ring section @@ -93,9 +92,9 @@ struct SectionTOR /// @return FAPI2_RC_SUCCESS on success, else error code. /// fapi2::ReturnCode findRS4InImageAndApply( - const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, - const RingID i_ringID, - const fapi2::RingMode i_ringMode); + const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, + const RingId_t i_ringID, + const fapi2::RingMode i_ringMode); /// /// @brief This is a plat pecific (SBE Plat) function that locates the /// Ring Container in the image and calls the functin to decompress the @@ -107,10 +106,10 @@ fapi2::ReturnCode findRS4InImageAndApply( /// @return FAPI2_RC_SUCCESS on success, else error code. /// fapi2::ReturnCode getRS4ImageFromTor( - const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, - const RingID i_ringID, - SectionTOR *i_sectionTOR, - bool i_applyOverride, - const uint32_t i_sectionOffset, - const fapi2::RingMode i_ringMode); + const fapi2::Target<fapi2::TARGET_TYPE_ALL>& i_target, + const RingId_t i_ringID, + SectionTOR* i_sectionTOR, + bool i_applyOverride, + const uint32_t i_sectionOffset, + const fapi2::RingMode i_ringMode); #endif |

