summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/xip
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2017-03-15 23:00:23 -0500
committerSachin Gupta <sgupta2m@in.ibm.com>2017-11-02 02:50:59 -0400
commit8247c1a74c108600dd571e4a1d80475647a79d8c (patch)
treed2558c4f181b593f4570f1e53aae936e586ea38e /src/import/chips/p9/xip
parent0d8c248cc29e659ab67fffcd26f54a660569ab8a (diff)
downloadtalos-sbe-8247c1a74c108600dd571e4a1d80475647a79d8c.tar.gz
talos-sbe-8247c1a74c108600dd571e4a1d80475647a79d8c.zip
Centaur ring support - TOR API
Key_Cronus_Test=XIP_REGRESS - Updates to TOR API codes to allow user codes to call TOR API function on a Centaur image. Note that the API no longer needs the caller to supply and XIP section ID. - Updates to TOR API codes to take advantage of the improved data and meta-data representation in the ring Id codes and the more self-contained ring image which now has the TOR magic header. - Updates to xip_tool to allow dissection of Centaur image. - Additional updates to TOR API codes and ring Id codes to continue improving overall clarity of data, data structures and flow through TOR API, incl name changes to related data variables and structures. Change-Id: I42891b9662cc0c443d2b16ce866ac945dc2c58dc Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/38018 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> 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/38562 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/xip')
-rw-r--r--src/import/chips/p9/xip/p9_xip_tool.C19
1 files changed, 11 insertions, 8 deletions
diff --git a/src/import/chips/p9/xip/p9_xip_tool.C b/src/import/chips/p9/xip/p9_xip_tool.C
index 011f90e4..38f07612 100644
--- a/src/import/chips/p9/xip/p9_xip_tool.C
+++ b/src/import/chips/p9/xip/p9_xip_tool.C
@@ -1886,7 +1886,8 @@ int dissectRingSectionTor( void* i_ringSection,
if ((torMagic == TOR_MAGIC_SGPE && ppeType != PT_SGPE) ||
(torMagic == TOR_MAGIC_CME && ppeType != PT_CME) ||
(torMagic == TOR_MAGIC_SBE && ppeType != PT_SBE) ||
- (torMagic == TOR_MAGIC_OVRD && ppeType != PT_SBE))
+ (torMagic == TOR_MAGIC_OVRD && ppeType != PT_SBE) ||
+ (torMagic == TOR_MAGIC_CEN && ppeType != PT_SBE))
{
continue;
}
@@ -1897,7 +1898,8 @@ int dissectRingSectionTor( void* i_ringSection,
for (ringVariant = 0; ringVariant <= OVERRIDE; ringVariant++)
{
if ((torMagic != TOR_MAGIC_OVRD && ringVariant == OVERRIDE) ||
- (torMagic == TOR_MAGIC_OVRD && ringVariant != OVERRIDE))
+ (torMagic == TOR_MAGIC_OVRD && ringVariant != OVERRIDE) ||
+ (torMagic == TOR_MAGIC_CEN && ringVariant == CC))
{
continue;
}
@@ -1945,7 +1947,7 @@ int dissectRingSectionTor( void* i_ringSection,
rs4 = (CompressedScanData*)ringBlockPtr;
// Sanity check RS4 container's ringId matches the requested.
- uint16_t l_ringId = be16toh(rs4->iv_ringId);
+ RingId_t l_ringId = be16toh(rs4->iv_ringId);
if ( l_ringId != ringId )
{
@@ -2182,7 +2184,7 @@ int dissectRingSectionTor( void* i_ringSection,
/// to dissectRingSectionTor which does the actual dissection and
/// summarizing of the ring section.
///
-/// \param[in] i_image A pointer to a P9-XIP image in host memory.
+/// \param[in] i_image A pointer to a P9-XIP image or TOR ringSection in host memory.
///
/// \param[in] i_argc Additional number of arguments beyond "dissect" keyword.
///
@@ -2235,7 +2237,8 @@ int dissectRingSection(void* i_image,
{
sectionId = P9_XIP_SECTION_SBE_RINGS;
}
- else if (hostHeader.iv_magic == P9_XIP_MAGIC_HW)
+ else if (hostHeader.iv_magic == P9_XIP_MAGIC_HW ||
+ hostHeader.iv_magic == P9_XIP_MAGIC_CENTAUR)
{
sectionId = P9_XIP_SECTION_HW_RINGS;
}
@@ -2298,15 +2301,15 @@ int dissectRingSection(void* i_image,
exit(1);
}
- if (be32toh(((TorHeader_t*)i_image)->magic) >> 8 != TOR_MAGIC)
+ ringSectionPtr = (void*)(hostSection.iv_offset + (uintptr_t)i_image);
+
+ if (be32toh(((TorHeader_t*)ringSectionPtr)->magic) >> 8 != TOR_MAGIC)
{
fprintf( stderr,
"ERROR: The XIP section is not a TOR compatible ring section. Possibly, the image is outdated and has the old TOR-headerless layout which is no longer supported. Try dissecting with an older version of p9_xip_tool.\n");
exit(EXIT_FAILURE);
}
- ringSectionPtr = (void*)(hostSection.iv_offset + (uintptr_t)i_image);
-
}
else if (be32toh(((TorHeader_t*)i_image)->magic) >> 8 == TOR_MAGIC)
{
OpenPOWER on IntegriCloud