diff options
author | Claus Michael Olsen <cmolsen@us.ibm.com> | 2016-10-06 08:31:03 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-10-20 08:46:59 -0400 |
commit | 0b6c7068d2605008465e2afd5651641964fc8cb0 (patch) | |
tree | d07fbdd3e385b5a8afb55b5dea1c008fce96ee41 /src/import/chips/p9/utils/imageProcs/p9_tor.H | |
parent | ee521e8abed5bc2aec750922337aab8078475aa6 (diff) | |
download | talos-hostboot-0b6c7068d2605008465e2afd5651641964fc8cb0.tar.gz talos-hostboot-0b6c7068d2605008465e2afd5651641964fc8cb0.zip |
Cleanup: TOR API cleaning up
- Catching all abrupt ending if-elseif endings.
- Updated all API comments in *.C file.
- Making local functions static.
- Accommodated additional six EX rings in tor_get_block_of_rings(CPLT).
- Now limiting max DD levels to 20 to prevent infinite trace out loop.
- Fixing bunch of inconsistent error return code situations.
Change-Id: I516c9554836b32a7717ef626afcba0cf4c03d6bf
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30798
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com>
Reviewed-by: Joachim Fenkes <fenkes@de.ibm.com>
Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com>
Reviewed-by: Richard J. Knight <rjknight@us.ibm.com>
Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com>
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/30840
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/p9/utils/imageProcs/p9_tor.H')
-rw-r--r-- | src/import/chips/p9/utils/imageProcs/p9_tor.H | 66 |
1 files changed, 26 insertions, 40 deletions
diff --git a/src/import/chips/p9/utils/imageProcs/p9_tor.H b/src/import/chips/p9/utils/imageProcs/p9_tor.H index e881f14b1..522197193 100644 --- a/src/import/chips/p9/utils/imageProcs/p9_tor.H +++ b/src/import/chips/p9/utils/imageProcs/p9_tor.H @@ -31,7 +31,8 @@ namespace P9_TOR { -#define NUM_RING_IDS P9_NUM_RINGS +extern const char* ppeTypeName[]; +extern const char* ringVariantName[]; typedef struct { @@ -59,30 +60,29 @@ typedef struct } TorPpeBlock_t; -#define IMGBUILD_TGR_RING_FOUND 0 -#define IMGBUILD_TGR_RING_BLOCKS_FOUND 0 -#define IMGBUILD_TGR_TOR_PUT_RING_DONE 0 -#define IMGBUILD_TGR_RING_NOT_FOUND 1 // Ring is not found in HW image -#define IMGBUILD_TGR_INVALID_RING_ID 2 // Ring is invalid or mismatch -#define IMGBUILD_TGR_AMBIGUOUS_API_PARMS 3 // Ring search in HW iamge got ambiguous condition -#define IMGBUILD_TGR_SECTION_NOT_FOUND 4 -#define IMGBUILD_TGR_DD_LVL_INFO_NOT_FOUND 5 -#define IMGBUILD_TGR_OP_BUFFER_INVALID 6 -#define IMGBUILD_TGR_OP_BUFFER_SIZE_EXCEEDED 7 -#define IMGBUILD_INVALID_INSTANCEID 8 -#define IMGBUILD_TGR_IMAGE_DOES_NOT_SUPPORT_CME 10 -#define IMGBUILD_TGR_IMAGE_DOES_NOT_SUPPORT_SGPE 11 -#define IMGBUILD_TGR_IMAGE_DOES_NOT_SUPPORT_DD_LEVEL 12 -#define IMGBUILD_TGR_IMAGE_DOES_NOT_SUPPORT_PPE_LEVEL 13 -#define IMGBUILD_TGR_RING_AVAILABLE_IN_RINGSECTION 14 // Ring container is already available in ring section -#define IMGBUILD_TGR_BUFFER_TOO_SMALL 15 - - -extern const char* ringVariantName[]; -extern const char* ppeTypeName[]; +#define TOR_RING_FOUND 0 +#define TOR_RING_BLOCKS_FOUND 0 +#define TOR_APPEND_RING_DONE 0 +#define TOR_RING_NOT_FOUND 1 +#define TOR_INVALID_RING_ID 2 +#define TOR_AMBIGUOUS_API_PARMS 3 +#define TOR_SECTION_NOT_FOUND 4 +#define TOR_DD_LEVEL_NOT_FOUND 5 +#define TOR_OP_BUFFER_INVALID 6 +#define TOR_OP_BUFFER_SIZE_EXCEEDED 7 +#define TOR_INVALID_INSTANCE_ID 8 +#define TOR_INVALID_CHIPLET 9 +#define TOR_IMAGE_DOES_NOT_SUPPORT_CME 10 +#define TOR_IMAGE_DOES_NOT_SUPPORT_SGPE 11 +#define TOR_IMAGE_DOES_NOT_SUPPORT_DD_LEVEL 12 +#define TOR_IMAGE_DOES_NOT_SUPPORT_PPE_LEVEL 13 +#define TOR_RING_AVAILABLE_IN_RINGSECTION 14 // Ring is already present +#define TOR_BUFFER_TOO_SMALL 15 +#define TOR_TOO_MANY_DD_LEVELS 16 -typedef enum RingBlockType // Different options to extract data using tor_access_ring API +// Different options to extract data using tor_access_ring API +typedef enum RingBlockType { GET_SINGLE_RING = 0x00, GET_DD_LEVEL_RINGS = 0x01, @@ -91,36 +91,21 @@ typedef enum RingBlockType // Different options to extract data using tor_acce PUT_SINGLE_RING = 0x04 } RingBlockType_t; - -typedef enum RingType // Different type of Rings +typedef enum RingType { COMMON = 0x00, INSTANCE = 0x01, ALLRING = 0x02 } RingType_t; - - -// -// PPE types -// typedef enum PpeType { - SBE = 0x00, // Ppe type partition in Ringsection + SBE = 0x00, CME = 0x01, SGPE = 0x02, NUM_PPE_TYPES = 0x03 } PpeType_t; - - -typedef enum RingSectionId -{ - SECTION_RING = 0x00, //.ring section ID - SECTION_OVRD = 0x01, //.Override section ID - SECTION_OVRL = 0x02 //.Overlay section ID -} RingSectionId_t; - typedef enum SbeTorId { PERV_CPLT = 0, @@ -141,6 +126,7 @@ typedef enum SbeTorId EC_CPLT = 15, SBE_NOOF_CHIPLETS = 16 } SbeTorId_t; + typedef enum CmeTorId { CME0_CPLT = 0, |