From f43da019dd692145c0f761a537041e5caf451828 Mon Sep 17 00:00:00 2001 From: Sumit Kumar Date: Tue, 31 Jan 2017 04:50:15 -0600 Subject: 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 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Sumit Kumar Tested-by: PPE CI Reviewed-by: Richard J. Knight Reviewed-by: Thi N. Tran Tested-by: Hostboot CI Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/36011 Reviewed-by: Hostboot Team Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Christian R. Geddes --- src/import/chips/p9/utils/imageProcs/p9_tor.H | 60 +++++---------------------- 1 file changed, 10 insertions(+), 50 deletions(-) (limited to 'src/import/chips/p9/utils/imageProcs/p9_tor.H') diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.H b/src/import/chips/p9/utils/imageProcs/p9_tor.H index cc8f15afd..821362f59 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_tor.H +++ b/src/import/chips/p9/utils/imageProcs/p9_tor.H @@ -25,13 +25,10 @@ #ifndef _P9_TOR_H_ #define _P9_TOR_H_ -#include "p9_ringId.H" +#include #define MAX_TOR_RING_OFFSET (256*256-1) // Max value of 2Byte uint -namespace P9_TOR -{ - extern const char* ppeTypeName[]; extern const char* ringVariantName[]; @@ -52,35 +49,6 @@ enum TorMagicNum TOR_MAGIC_CEN = (uint32_t)0x544F524E, // "TORN" }; -// -// Chip types to represent p9n, p9c, centaur -// -enum ChipType -{ - CT_P9N, - CT_P9C, - CT_CEN, - NUM_CHIP_TYPES -}; - -typedef uint8_t ChipType_t; -const ChipType_t INVALID_CHIP_TYPE = 0xff; - -typedef struct ChipTypeList -{ - const char* name; - ChipType_t type; -} ChipTypeList_t; - -const ChipTypeList_t CHIP_TYPE_LIST[] = -{ - {"p9n", CT_P9N}, - {"p9c", CT_P9C}, - {"cen", CT_CEN}, -}; - - - // // TOR header field (appears in top of every HW, SBE, CEN, OVRD, etc ring section) // @@ -91,7 +59,7 @@ typedef struct ChipType_t chipType; // Value from ChipType enum uint8_t ddLevel; // =0xff if MAGIC_HW, >0 all other MAGICs uint8_t numDdLevels; // >0 if MAGIC_HW, =1 all other MAGICs - uint32_t size; // A place holder for now, but will be used in a later commit. + uint32_t size; // Size of the TOR ringSection. } TorHeader_t; #define UNDEFINED_DD_LEVEL (uint8_t)0xff @@ -161,20 +129,13 @@ typedef enum RingBlockType PUT_SINGLE_RING = 0x03 } RingBlockType_t; -typedef enum RingType +enum PpeType { - COMMON = 0x00, - INSTANCE = 0x01, - ALLRING = 0x02 -} RingType_t; - -typedef enum PpeType -{ - SBE = 0x00, - CME = 0x01, - SGPE = 0x02, + PT_SBE = 0x00, + PT_CME = 0x01, + PT_SGPE = 0x02, NUM_PPE_TYPES = 0x03 -} PpeType_t; +}; /// /// **************************************************************************** @@ -281,7 +242,7 @@ typedef enum PpeType /// /// \retval non-0 See \ref TOR API RETURN errors int tor_access_ring( void* i_ringSection, // Ring address Ptr any of .rings, .overrides and .overlays. - RingID i_ringId, // Unique ring ID + RingId_t i_ringId, // Unique ring ID uint16_t i_ddLevel, // DD level info PpeType_t i_PpeType, // PPE type : SBE, CME, etc RingType_t& io_RingType, // 0: Common 1: Instance @@ -333,7 +294,7 @@ int tor_access_ring( void* i_ringSection, // Ring address Ptr any of . /// \retval non-0 See \ref TOR API RETURN errors int tor_get_single_ring ( void* i_ringSection, uint16_t i_ddLevel, - RingID i_ringId, + RingId_t i_ringId, PpeType_t i_PpeType, RingVariant_t i_RingVariant, uint8_t i_instanceId, @@ -441,7 +402,7 @@ int tor_append_ring( void* i_ringSection, uint32_t& io_ringSectionSize, void* i_ringBuffer, const uint32_t i_ringBufferSize, - RingID i_ringId, + RingId_t i_ringId, PpeType_t i_ppeType, RingType_t i_RingType, RingVariant_t i_RingVariant, @@ -457,6 +418,5 @@ int tor_append_ring( void* i_ringSection, /// \retval - TOR version uint8_t tor_version( void); -}; #endif //_P9_TOR_H_ -- cgit v1.2.1