summaryrefslogtreecommitdiffstats
path: root/src/import/chips/common
diff options
context:
space:
mode:
authorClaus Michael Olsen <cmolsen@us.ibm.com>2018-04-09 13:48:56 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-04-25 12:10:36 -0400
commit699027b133ee04349205193161afbbe14a2c9447 (patch)
tree5daaa85574df10785e7a572c5e1542762b7dc1fd /src/import/chips/common
parent850cd71cc035699660db1f72273c0f6317f3a2db (diff)
downloadtalos-hostboot-699027b133ee04349205193161afbbe14a2c9447.tar.gz
talos-hostboot-699027b133ee04349205193161afbbe14a2c9447.zip
Risk level 3/4/5 support: Step 1 - backward compatibility and v6 image
- Introducing RV_RL3/4/5 ring variant (RV) support for EC/EQ chiplets. - Dropping RV support for all chiplet's instance rings which saves 456 Quad bytes and 58 Nest bytes in Seeprom's TOR slots (compared to master). - Each additional risk level adds 144 bytes in Seeprom TOR slots. - Various changes to data names associated with ring variants to clarify that the notion of ring variants is now specific only to Common rings while Instance rings only have the BASE variant. - Also, removed backwards compatibility to TOR v5, i.e. from before we introduced RL2 in february. Assumption is that all images/drivers used in fips910/920 and OP920 are TOR v6. - This commit produces a TOR v6 image to ensure EKB FSP CI success. Key_Cronus_Test=XIP_REGRESS Change-Id: Icfcb1e68fd74a10ffc48ee7a5da528a8042ef3b1 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56973 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: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Kahn C. Evans <kahnevan@us.ibm.com> Reviewed-by: James N. Klazynski <jklazyns@us.ibm.com> Reviewed-by: Joseph J. McGill <jmcgill@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56983 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/chips/common')
-rw-r--r--src/import/chips/common/utils/imageProcs/common_ringId.C169
-rw-r--r--src/import/chips/common/utils/imageProcs/common_ringId.H37
2 files changed, 100 insertions, 106 deletions
diff --git a/src/import/chips/common/utils/imageProcs/common_ringId.C b/src/import/chips/common/utils/imageProcs/common_ringId.C
index 3528ca557..c568468f8 100644
--- a/src/import/chips/common/utils/imageProcs/common_ringId.C
+++ b/src/import/chips/common/utils/imageProcs/common_ringId.C
@@ -45,81 +45,81 @@ const char* ringVariantName[] = { "BASE",
"CC",
"RL",
"RL2",
+ "RL3",
+ "RL4",
+ "RL5"
};
#ifndef __HOSTBOOT_MODULE // This is only used by ring_apply in EKB
-static int get_ipl_base_param( char*& l_ringPath )
+static int get_ipl_ring_path_param( RingVariant_t i_ringVariant, char*& o_ringPath)
{
- l_ringPath = getenv("IPL_BASE");
-
- if (l_ringPath == NULL)
+ switch (i_ringVariant)
{
- MY_ERR("p9_ring_apply.C: ring path: IPL_BASE environment parameter not set.\n");
- return INFRASTRUCT_RC_ENV_ERROR;
- }
+ case RV_BASE:
+ o_ringPath = getenv("IPL_BASE");
+ break;
- return INFRASTRUCT_RC_SUCCESS;
-}
+ case RV_CC:
+ o_ringPath = getenv("IPL_CACHE_CONTAINED");
+ break;
-static int get_ipl_cache_contained_param( char*& l_ringPath)
-{
- l_ringPath = getenv("IPL_CACHE_CONTAINED");
+ case RV_RL:
+ o_ringPath = getenv("IPL_RISK");
+ break;
- if (l_ringPath == NULL)
- {
- MY_ERR("p9_ring_apply.C: ring path: IPL_CACHE_CONTAINED environment parameter not set.\n");
- return INFRASTRUCT_RC_ENV_ERROR;
+ default:
+ o_ringPath = NULL;
+ break;
}
- return INFRASTRUCT_RC_SUCCESS;
-}
-
-static int get_ipl_risk_param( char*& l_ringPath)
-{
- l_ringPath = getenv("IPL_RISK");
-
- if (l_ringPath == NULL)
+ if (o_ringPath == NULL)
{
- MY_ERR("p9_ring_apply.C: ring path: IPL_RISK environment parameter not set.\n");
+ MY_ERR("get_ipl_ring_path_param(): IPL env parm for ringVariant=0x%x not set.\n",
+ i_ringVariant);
return INFRASTRUCT_RC_ENV_ERROR;
}
return INFRASTRUCT_RC_SUCCESS;
}
-static int get_runtime_base_param( char*& l_ringPath)
+static int get_runtime_ring_path_param( RingVariant_t i_ringVariant, char*& o_ringPath)
{
- l_ringPath = getenv("RUNTIME_BASE");
-
- if (l_ringPath == NULL)
+ switch (i_ringVariant)
{
- MY_ERR("p9_ring_apply.C: ring path: RUNTIME_BASE environment parameter not set.\n");
- return INFRASTRUCT_RC_ENV_ERROR;
- }
+ case RV_BASE:
+ o_ringPath = getenv("RUNTIME_BASE");
+ break;
- return INFRASTRUCT_RC_SUCCESS;
-}
-static int get_runtime_risk_param( char*& l_ringPath)
-{
- l_ringPath = getenv("RUNTIME_RISK");
+ case RV_RL:
+ o_ringPath = getenv("RUNTIME_RISK");
+ break;
- if (l_ringPath == NULL)
- {
- MY_ERR("p9_ring_apply.C: ring path: RUNTIME_RISK environment parameter not set.\n");
- return INFRASTRUCT_RC_ENV_ERROR;
- }
+ case RV_RL2:
+ o_ringPath = getenv("RUNTIME_RISK2");
+ break;
- return INFRASTRUCT_RC_SUCCESS;
-}
+ case RV_RL3:
+ o_ringPath = getenv("RUNTIME_RISK3");
+ break;
-static int get_runtime_risk2_param( char*& l_ringPath)
-{
- l_ringPath = getenv("RUNTIME_RISK2");
+ case RV_RL4:
+ o_ringPath = getenv("RUNTIME_RISK4");
+ break;
+
+ case RV_RL5:
+ o_ringPath = getenv("RUNTIME_RISK5");
+ break;
+
+ default:
+ o_ringPath = NULL;
+ break;
+ }
- if (l_ringPath == NULL)
+ if (o_ringPath == NULL)
{
- MY_ERR("p9_ring_apply.C: ring path: RUNTIME_RISK2 environment parameter not set.\n");
+ MY_ERR("get_runtime_ring_path_param(): RUNTIME env parm for ringVariant=0x%x not set.\n",
+ i_ringVariant);
return INFRASTRUCT_RC_ENV_ERROR;
}
@@ -138,23 +138,19 @@ int ringid_get_raw_ring_file_path( uint32_t i_magic,
if ( i_magic == TOR_MAGIC_SBE )
{
- if ( i_ringVariant == RV_BASE )
+ if ( i_ringVariant == RV_BASE ||
+ i_ringVariant == RV_CC ||
+ i_ringVariant == RV_RL )
{
- rc = get_ipl_base_param(l_ringDir);
+ rc = get_ipl_ring_path_param(i_ringVariant, l_ringDir);
}
- else if ( i_ringVariant == RV_CC )
- {
- rc = get_ipl_cache_contained_param(l_ringDir);
- }
- else if ( i_ringVariant == RV_RL )
+ else if ( i_ringVariant == RV_RL2 ||
+ i_ringVariant == RV_RL3 ||
+ i_ringVariant == RV_RL4 ||
+ i_ringVariant == RV_RL5 )
{
- rc = get_ipl_risk_param(l_ringDir);
- }
- else if ( i_ringVariant == RV_RL2 )
- {
- // Valid RV for Quad chiplets but there's just no RL2 rings for SBE phase (by convention).
+ // No IPL rings for these variants
rc = TOR_NO_RINGS_FOR_VARIANT;
- break;
}
else
{
@@ -174,23 +170,19 @@ int ringid_get_raw_ring_file_path( uint32_t i_magic,
else if ( i_magic == TOR_MAGIC_CME ||
i_magic == TOR_MAGIC_SGPE )
{
- if ( i_ringVariant == RV_BASE )
+ if ( i_ringVariant == RV_BASE ||
+ i_ringVariant == RV_RL ||
+ i_ringVariant == RV_RL2 ||
+ i_ringVariant == RV_RL3 ||
+ i_ringVariant == RV_RL4 ||
+ i_ringVariant == RV_RL5 )
{
- rc = get_runtime_base_param(l_ringDir);
+ rc = get_runtime_ring_path_param(i_ringVariant, l_ringDir);
}
else if ( i_ringVariant == RV_CC )
{
- // Valid RV for Quad chiplets but there's just no CC rings for runtime phases (by convention).
+ // No Runtime rings for this variant
rc = TOR_NO_RINGS_FOR_VARIANT;
- break;
- }
- else if ( i_ringVariant == RV_RL )
- {
- rc = get_runtime_risk_param(l_ringDir);
- }
- else if ( i_ringVariant == RV_RL2 )
- {
- rc = get_runtime_risk2_param(l_ringDir);
}
else
{
@@ -209,13 +201,10 @@ int ringid_get_raw_ring_file_path( uint32_t i_magic,
}
else if ( i_magic == TOR_MAGIC_CEN )
{
- if ( i_ringVariant == RV_BASE )
- {
- rc = get_ipl_base_param(l_ringDir);
- }
- else if ( i_ringVariant == RV_RL )
+ if ( i_ringVariant == RV_BASE ||
+ i_ringVariant == RV_RL )
{
- rc = get_ipl_risk_param(l_ringDir);
+ rc = get_ipl_ring_path_param(i_ringVariant, l_ringDir);
}
else
{
@@ -389,12 +378,12 @@ int ringid_get_properties( ChipType_t i_chipType,
o_ringIdListCommon,
o_ringIdListInstance,
o_ringVariantOrder,
- o_numVariants );
+ o_numVariants);
- if ( i_torVersion < 6 &&
+ if ( i_torVersion < 7 &&
(i_chipletType == P9_RID::EQ_TYPE || i_chipletType == P9_RID::EC_TYPE) )
{
- *o_numVariants = *o_numVariants - 1;
+ *o_numVariants = *o_numVariants - 3;
}
if ( i_torMagic == TOR_MAGIC_OVRD ||
@@ -409,11 +398,11 @@ int ringid_get_properties( ChipType_t i_chipType,
*o_ringIdListCommon = (GenRingIdList*)P9_RID::EC::RING_ID_LIST_COMMON;
*o_ringIdListInstance = (GenRingIdList*)P9_RID::EC::RING_ID_LIST_INSTANCE;
*o_ringVariantOrder = (RingVariantOrder*)P9_RID::EC::RING_VARIANT_ORDER;
- *o_numVariants = P9_RID::EC::g_chipletData.iv_num_ring_variants;
+ *o_numVariants = P9_RID::EC::g_chipletData.iv_num_common_ring_variants;
- if (i_torVersion < 6)
+ if (i_torVersion < 7)
{
- *o_numVariants = *o_numVariants - 1;
+ *o_numVariants = *o_numVariants - 3;
}
}
else if ( i_torMagic == TOR_MAGIC_SGPE )
@@ -422,11 +411,11 @@ int ringid_get_properties( ChipType_t i_chipType,
*o_ringIdListCommon = (GenRingIdList*)P9_RID::EQ::RING_ID_LIST_COMMON;
*o_ringIdListInstance = (GenRingIdList*)P9_RID::EQ::RING_ID_LIST_INSTANCE;
*o_ringVariantOrder = (RingVariantOrder*)P9_RID::EQ::RING_VARIANT_ORDER;
- *o_numVariants = P9_RID::EQ::g_chipletData.iv_num_ring_variants;
+ *o_numVariants = P9_RID::EQ::g_chipletData.iv_num_common_ring_variants;
- if (i_torVersion < 6)
+ if (i_torVersion < 7)
{
- *o_numVariants = *o_numVariants - 1;
+ *o_numVariants = *o_numVariants - 3;
}
}
else
@@ -449,7 +438,7 @@ int ringid_get_properties( ChipType_t i_chipType,
o_ringIdListCommon,
o_ringIdListInstance,
o_ringVariantOrder,
- o_numVariants );
+ o_numVariants);
if ( i_torMagic == TOR_MAGIC_OVRD)
{
diff --git a/src/import/chips/common/utils/imageProcs/common_ringId.H b/src/import/chips/common/utils/imageProcs/common_ringId.H
index 7b60d5aed..832608ec1 100644
--- a/src/import/chips/common/utils/imageProcs/common_ringId.H
+++ b/src/import/chips/common/utils/imageProcs/common_ringId.H
@@ -83,7 +83,7 @@ typedef uint8_t myBoolean_t; // false:0, true:1, undefined:UNDEFINED_BOOL
typedef struct
{
uint32_t magic; // =TOR_MAGIC_xyz
- uint8_t version; // =TOR_VERSION
+ uint8_t version; // =TOR version
ChipType_t chipType; // Value from ChipType enum
uint8_t ddLevel; // Actual DD level of ringSection
uint8_t undefined;
@@ -121,7 +121,8 @@ typedef uint16_t TorRingOffset_t; // Offset value to actual ring
//#define TOR_VERSION 3 // Added TOR magic header.
//#define TOR_VERSION 4 // TOR API code restructuring.
//#define TOR_VERSION 5 // Removed TOR-level DD handling.
-#define TOR_VERSION 6 // Added additional runtime risk level (RL2)
+//#define TOR_VERSION 6 // Added additional runtime risk level (RL2)
+#define TOR_VERSION 7 // Added three more runtime risk levels (RL3/4/5)
// TOR Magic values for top-level TOR ringSection and sub-ringSections
enum TorMagicNum
@@ -196,7 +197,7 @@ typedef struct
uint32_t scanScomAddress;
} GenRingIdList;
-// P9 PPE types supported.
+// PPE types supported.
// - This enum also reflects the order with which they appear in the HW image's .rings section.
// - Do NOT make changes to the values or order of this enum.
enum PpeType
@@ -207,28 +208,32 @@ enum PpeType
NUM_PPE_TYPES = 0x03
};
-// P9 ring variants supported.
+// Ring variants supported.
// - This enum also reflects the order with which they appear in various images' .rings section.
// - Do NOT make changes to the values or order of this enum.
enum RingVariant
{
RV_BASE = 0x00,
RV_CC = 0x01,
- RV_RL = 0x02,
- RV_RL2 = 0x03,
- NUM_RING_VARIANTS = 0x04,
+ RV_RL = 0x02, // Kernel and user protection
+ RV_RL2 = 0x03, // Kernel only protection
+ RV_RL3 = 0x04, // Rugby v4
+ RV_RL4 = 0x05, // Java performance
+ RV_RL5 = 0x06, // Spare
+ NUM_RING_VARIANTS = 0x07,
};
extern const char* ppeTypeName[];
extern const char* ringVariantName[];
+// Variant order for Common rings
typedef struct
{
- RingVariant_t variant[4];
+ RingVariant_t variant[NUM_RING_VARIANTS];
} RingVariantOrder;
-// P9 ring types supported.
+// Ring types supported.
// - This enum also reflects the order with which they appear in various images' .rings section.
// - Do NOT make changes to the values or order of this enum.
enum RingType
@@ -247,21 +252,21 @@ enum RingBlockType
typedef struct
{
- // This is the chiplet-ID of the first instance of the Chiplet
+ // Chiplet ID of the first instance of the Chiplet
uint8_t iv_base_chiplet_number;
- // The no.of common rings for the Chiplet
+ // Number of common rings for the Chiplet
uint8_t iv_num_common_rings;
- // The no.of instance rings for the Chiplet (w/different ringId values)
+ // Number of instance rings for the Chiplet (w/different ringId values)
uint8_t iv_num_instance_rings;
- // The no.of instance rings for the Chiplet (w/different ringId values
+ // Number of instance rings for the Chiplet (w/different ringId values
// AND different scanAddress values)
uint8_t iv_num_instance_rings_scan_addrs;
- // The no.of ring variants
- uint8_t iv_num_ring_variants;
+ // Number of variants for common rings (instance rings only have BASE variant)
+ uint8_t iv_num_common_ring_variants;
} ChipletData_t;
// This is used to Set (Mark) the left-most bit
@@ -351,7 +356,7 @@ int ringid_get_properties( ChipType_t i_chipType,
GenRingIdList** o_ringIdListInstance,
RingVariantOrder** o_ringVariantOrder,
RingProperties_t** o_ringProps,
- uint8_t* o_numVariants );
+ uint8_t* o_numVariants);
#endif // _COMMON_RINGID_H_
OpenPOWER on IntegriCloud