diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2017-07-16 09:51:43 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-04-05 09:31:43 -0400 |
commit | e286748a94bde253ec0d0d5bfae7d1df99393546 (patch) | |
tree | 2d13581564bea3b6607aa1caff632291ddc59d7e /src/import/chips/p9/procedures/hwp/accessors | |
parent | 3661916096ea58e7a99f031a46982106d593a0b2 (diff) | |
download | talos-hostboot-e286748a94bde253ec0d0d5bfae7d1df99393546.tar.gz talos-hostboot-e286748a94bde253ec0d0d5bfae7d1df99393546.zip |
Code restruct: ring_apply
- Consolidating the three <ppe>_image_ring_generation functions
into a single shared, and renamed, ring_section_generation
function,
- Moving several data centric functions into common_ringId API,
- Use of sizeof(<type or var>) instead of hardcoded assumptions
about structure or data type sizes,
- Renaming of variables which makes sense in the context of the
scope of this commit, such as:
- ringBuffer renamed to ringSection
- ringBufSize renamed to ringSectionSize and type changed to
uint32_t
- Removes the backward compatibility to TORV3/V4 and now only
works with latest TOR version, i.e. 6 at this point.
About the Hw_ImageBuild_Prereq:
- 51511 must have fully propagated into all repos and drivers
used in FSP CI tests before this commit (43175) can be merged.
43175 removes the TORV3/V4 backwards compatibility to support
TOR ring sections that have TOR level DD coordination.
Key_Cronus_Test=XIP_REGRESS
Change-Id: I0af25fa623c1c523eb0297e475066497787f3d15
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43175
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: Hostboot CI <hostboot-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>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/52211
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Tested-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/accessors')
-rw-r--r-- | src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C | 44 |
1 files changed, 22 insertions, 22 deletions
diff --git a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C index 3dcc9024a..5645e364d 100644 --- a/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C +++ b/src/import/chips/p9/procedures/hwp/accessors/p9_mvpd_ring_funcs.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* Contributors Listed Below - COPYRIGHT 2016,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,21 +38,13 @@ // #include <stdint.h> -#include <p9_scan_compression.H> - -namespace P9_RID -{ -#include <p9_ringId.H> -} -#include <p9_mvpd_ring_funcs.H> - -// fapi2 support #include <fapi2.H> #include <utils.H> #include <mvpd_access.H> - -using namespace P9_RID; +#include <p9_mvpd_ring_funcs.H> +#include <p9_scan_compression.H> +#include <p9_ringId.H> extern "C" { @@ -534,17 +526,25 @@ extern "C" be64toh(l_pScanDataOld->iv_scanSelect) & l_evenOddMask ) ) { // look up ring in p9_ringId and retrieve scanAddr - GenRingIdList* l_ringProp = ringid_get_ring_list(i_ringId); + int l_rc = INFRASTRUCT_RC_SUCCESS; + ChipType_t l_chipType = CT_P9N; // Any P9 CT will do here + GenRingIdList* l_ringProp = NULL; - FAPI_ASSERT(l_ringProp, - fapi2::MVPD_RINGID_DATA_NOT_FOUND(). - set_CHIP_TARGET(i_fapiTarget). - set_RING_ID(i_ringId). - set_CHIPLET_ID(i_chipletId), - "mvpdRingFuncFind: lookup of scanAddr failed " - "for ringId=0x%x, chipletId=0x%x", - i_ringId, - i_chipletId); + l_rc = ringid_get_ring_list( l_chipType, + i_ringId, + &l_ringProp ); + + FAPI_ASSERT( l_rc == INFRASTRUCT_RC_SUCCESS || + l_ringProp != NULL, + fapi2::MVPD_RINGID_DATA_NOT_FOUND(). + set_CHIP_TARGET(i_fapiTarget). + set_RING_ID(i_ringId). + set_CHIPLET_ID(i_chipletId), + "mvpdRingFuncFind: lookup of scanAddr failed " + "for chipType=%d, ringId=0x%x, chipletId=0x%x", + l_chipType, + i_ringId, + i_chipletId ); // update chipletId in iv_scanScomAddress (for instance rings) uint32_t l_scanScomAddr = l_ringProp->scanScomAddress; |