From 2b40e2e100c7a0725762c40865d36ac7639e12cc Mon Sep 17 00:00:00 2001 From: Santosh Puranik Date: Fri, 16 Sep 2016 08:47:53 -0500 Subject: Unpack attributes for Pervasive targets -- Reserve space for all 64 possible chiplets Change-Id: I21b431205c84c8502b98364eb4c2befc31cdf3d9 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29839 Reviewed-by: Joseph J. McGill Tested-by: Jenkins Server Reviewed-by: SRINIVAS V. POLISETTY Tested-by: PPE CI Reviewed-by: Sachin Gupta Reviewed-by: Jennifer A. Stofer Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/29840 Reviewed-by: Santosh S. Puranik --- src/hwpf/include/plat/plat_target_parms.H | 3 ++ .../xml/attribute_info/p9_sbe_attributes.xml | 40 +++++++++++++++++++++- src/tools/image/sbe_default_tool.c | 8 ++--- src/tools/scripts/ppeCreateAttrGetSetMacros.pl | 19 +--------- src/tools/scripts/ppeParseProcSbeFixed.pl | 2 +- 5 files changed, 48 insertions(+), 24 deletions(-) (limited to 'src') diff --git a/src/hwpf/include/plat/plat_target_parms.H b/src/hwpf/include/plat/plat_target_parms.H index dd2b8a74..730f10da 100644 --- a/src/hwpf/include/plat/plat_target_parms.H +++ b/src/hwpf/include/plat/plat_target_parms.H @@ -90,4 +90,7 @@ CONST_UINT32_T(TARGET_COUNT, CHIP_TARGET_COUNT + SYSTEM_TARGET_COUNT + MCAST_TARGET_COUNT); +// Maximum possible Pervasive chiplets +CONST_UINT32_T(MAX_PERV_CHIPLETS, 64); + #endif // __FAPI2_PPE_TARGET_PARMS__ diff --git a/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml b/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml index 23c49c20..345b4a06 100644 --- a/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml +++ b/src/import/chips/p9/procedures/xml/attribute_info/p9_sbe_attributes.xml @@ -108,7 +108,7 @@ ATTR_CHIP_POS 0x01 - + ATTR_SCRATCH_UINT8_1 0x8 @@ -205,6 +205,7 @@ ATTR_CHIP_UNIT_POS + 0x00 0x01 0x02 0x03 @@ -226,6 +227,16 @@ 0x13 0x14 0x15 + 0x16 + 0x17 + 0x18 + 0x19 + 0x1A + 0x1B + 0x1C + 0x1D + 0x1E + 0x1F 0x20 0x21 0x22 @@ -250,6 +261,14 @@ 0x35 0x36 0x37 + 0x38 + 0x39 + 0x3A + 0x3B + 0x3C + 0x3D + 0x3E + 0x3F @@ -283,6 +302,7 @@ Bits 0,1,2 are don't care. For nimbus, pervasive chiplets 10 and 11 are not used (OB1 and OB2), therefore the value for them is 0xFFFF --> ATTR_PG + 0xFFFF 0xE07D 0xE03F 0xE03F @@ -304,6 +324,16 @@ 0xE288 0xE001 0xE001 + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF 0xE1FF 0xE1FF 0xE1FF @@ -328,6 +358,14 @@ 0xE1FF 0xE1FF 0xE1FF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF + 0xFFFF ATTR_ADU_XSCOM_BAR_BASE_ADDR diff --git a/src/tools/image/sbe_default_tool.c b/src/tools/image/sbe_default_tool.c index 82d34bc7..2600a365 100644 --- a/src/tools/image/sbe_default_tool.c +++ b/src/tools/image/sbe_default_tool.c @@ -94,13 +94,13 @@ void assertTarget(const char* str, unsigned int index) exit(1); } } else if(strcmp(str, "TARGET_TYPE_PERV") == 0) { - if (index > PERV_TARGET_COUNT) { - fprintf(stderr, "sbe_default_tool: index (%d) is larger than PERV_TARGET_COUNT (%d)\n", - index, PERV_TARGET_COUNT); + if (index > MAX_PERV_CHIPLETS) { + fprintf(stderr, "sbe_default_tool: index (%d) is larger than MAX_PERV_CHIPLETS (%d)\n", + index, MAX_PERV_CHIPLETS); exit(1); } } else { - if (index >= PERV_TARGET_COUNT) { + if (index >= MAX_PERV_CHIPLETS) { fprintf(stderr, "sbe_default_tool: target not supported:"); fprintf(stderr, " %s\n", str); exit(1); diff --git a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl index a0004f39..a77054c9 100755 --- a/src/tools/scripts/ppeCreateAttrGetSetMacros.pl +++ b/src/tools/scripts/ppeCreateAttrGetSetMacros.pl @@ -366,24 +366,7 @@ if (@newAttributeDefines != 0) { print OUTFILE " __attribute__((always_inline)) inline uint32_t getPervAttrIndex(const fapi2::Target &i_target) { - uint32_t l_index = static_cast(i_target.get()).getTargetInstance(); - if(PPE_TARGET_TYPE_EQ & static_cast(i_target.get()).getTargetType()) - { - l_index += (EQ_TARGET_OFFSET); - } - else if(PPE_TARGET_TYPE_CORE & static_cast(i_target.get()).getTargetType()) - { - l_index += (CORE_TARGET_OFFSET); - } - else if(PPE_TARGET_TYPE_MCBIST & static_cast(i_target.get()).getTargetType()) - { - l_index += (MCBIST_TARGET_OFFSET); - } - else - { - l_index += (NEST_GROUP1_TARGET_OFFSET); - } - return (l_index - NEST_GROUP1_TARGET_OFFSET); + return i_target.getChipletNumber(); } "; diff --git a/src/tools/scripts/ppeParseProcSbeFixed.pl b/src/tools/scripts/ppeParseProcSbeFixed.pl index f58a0ef5..80c68afb 100755 --- a/src/tools/scripts/ppeParseProcSbeFixed.pl +++ b/src/tools/scripts/ppeParseProcSbeFixed.pl @@ -298,7 +298,7 @@ foreach my $attr (@attrPervIds) { my $value = uc $attr->{valueType}; - print PEFILE "PROC_SBE_FIXED_TARGET_$value($attr->{id}, PERV_TARGET_COUNT);\n" + print PEFILE "PROC_SBE_FIXED_TARGET_$value($attr->{id}, MAX_PERV_CHIPLETS);\n" } -- cgit v1.2.1