summaryrefslogtreecommitdiffstats
path: root/src/usr/runtime
diff options
context:
space:
mode:
authorDan Crowell <dcrowell@us.ibm.com>2013-02-15 09:59:35 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-04-03 16:53:06 -0500
commitdb788c8ab715f12958584a9d20a31cef28b64698 (patch)
treee20b3f6b3b1f88a26e9b96a1aa72664cd9f27b67 /src/usr/runtime
parentad540da587687d36373267ab468584f40e99d14b (diff)
downloadblackbird-hostboot-db788c8ab715f12958584a9d20a31cef28b64698.tar.gz
blackbird-hostboot-db788c8ab715f12958584a9d20a31cef28b64698.zip
Updates to HostServices attribute list
Adding a few more attributes that the HWPs in HostServices need. Also improved the testcases to catch missing attributes. Updated gen script to add missing PM attribute defaults. Change-Id: I99d2c4646492f020fb59f526db5a449d3507939a RTC: 52950 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3236 Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/runtime')
-rwxr-xr-xsrc/usr/runtime/common/create_hsvc_data.pl9
-rw-r--r--src/usr/runtime/common/extra_runtime_attributes.xml23
-rw-r--r--src/usr/runtime/common/hsvc_exdata.C11
-rw-r--r--src/usr/runtime/common/hsvc_procdata.C49
-rw-r--r--src/usr/runtime/common/hsvc_sysdata.C26
-rw-r--r--src/usr/runtime/populate_attributes.C2
-rw-r--r--src/usr/runtime/test/runtimeattrstest.H62
7 files changed, 128 insertions, 54 deletions
diff --git a/src/usr/runtime/common/create_hsvc_data.pl b/src/usr/runtime/common/create_hsvc_data.pl
index 12b7392a4..fd88cb729 100755
--- a/src/usr/runtime/common/create_hsvc_data.pl
+++ b/src/usr/runtime/common/create_hsvc_data.pl
@@ -37,6 +37,8 @@ my $debug = 0;
my $warning = 0;
my @input_files;
+my $fullcmd = $0 . " " . (join " ", @ARGV);
+
for (my $i=0; $i < $#ARGV + 1; $i++)
{
if ($ARGV[$i] =~ /-h/)
@@ -70,18 +72,21 @@ if( -e "hsvc_sysdata.C" ) {
}
open SYS_FILE, ">hsvc_sysdata.C", or die("Could not create hsvc_sysdata.C\n");
print SYS_FILE "// Generated on $date by $user from \n";
+print SYS_FILE "// $fullcmd\n\n";
if( -e "hsvc_procdata.C" ) {
- die("hsvc_procdata.C file already exists\n");
+ die("hsvc_procdata.C file already exists\n\n");
}
open PROC_FILE, ">hsvc_procdata.C", or die("Could not create hsvc_procdata.C\n");
print PROC_FILE "// Generated on $date by $user from \n";
+print PROC_FILE "// $fullcmd\n";
if( -e "hsvc_exdata.C" ) {
- die("hsvc_exdata.C file already exists\n");
+ die("hsvc_exdata.C file already exists\n\n");
}
open EX_FILE, ">hsvc_exdata.C", or die("Could not create hsvc_exdata.C\n");
print EX_FILE "// Generated on $date by $user from \n";
+print EX_FILE "// $fullcmd\n";
# Keep a list for each type of attribute ever to find dupes
my @sys_all;
diff --git a/src/usr/runtime/common/extra_runtime_attributes.xml b/src/usr/runtime/common/extra_runtime_attributes.xml
index ae7c1785c..45eaec682 100644
--- a/src/usr/runtime/common/extra_runtime_attributes.xml
+++ b/src/usr/runtime/common/extra_runtime_attributes.xml
@@ -28,27 +28,50 @@ xml files and procedures
Parser only requires attribute, id and targetType tags.
-->
+<!-- from common_attributes.xml -->
<attribute>
<id>ATTR_FUNCTIONAL</id>
<targetType>TARGET_TYPE_PROC_CHIP</targetType>
</attribute>
+<!-- from common_attributes.xml -->
<attribute>
<id>ATTR_CHIP_UNIT_POS</id>
<targetType>TARGET_TYPE_EX_CHIPLET</targetType>
</attribute>
+<!-- from common_attributes.xml -->
<attribute>
<id>ATTR_FUNCTIONAL</id>
<targetType>TARGET_TYPE_EX_CHIPLET</targetType>
</attribute>
+<!-- from freq_attributes.xml -->
<attribute>
<id>ATTR_FREQ_PB</id>
<targetType>TARGET_TYPE_SYSTEM</targetType>
</attribute>
+<!-- from scratch_attributes.xml -->
<attribute>
<id>ATTR_SCRATCH_UINT32_1</id>
<targetType>TARGET_TYPE_SYSTEM</targetType>
</attribute>
+
+<!-- from system_attributes.xml -->
+<attribute>
+ <id>ATTR_EXECUTION_PLATFORM</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+</attribute>
+
+<!-- from freq_attributes.xml -->
+<attribute>
+ <id>ATTR_FREQ_PROC_REFCLOCK</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+</attribute>
+
+<!-- from system_attributes.xml -->
+<attribute>
+ <id>ATTR_IS_SIMULATION</id>
+ <targetType>TARGET_TYPE_SYSTEM</targetType>
+</attribute>
diff --git a/src/usr/runtime/common/hsvc_exdata.C b/src/usr/runtime/common/hsvc_exdata.C
index 4d4f23be2..9b79941cf 100644
--- a/src/usr/runtime/common/hsvc_exdata.C
+++ b/src/usr/runtime/common/hsvc_exdata.C
@@ -20,15 +20,16 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// Generated on Thu Feb 14 14:54:31 CST 2013 by dcrowell from
+// Generated on Wed Feb 20 15:44:15 CST 2013 by dcrowell from
+// src/usr/runtime/common/create_hsvc_data.pl src/usr/runtime/common/extra_runtime_attributes.xml src/usr/hwpf/hwp/chip_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml -w -d
// -- Input: src/usr/runtime/common/extra_runtime_attributes.xml --
HSVC_LOAD_ATTR( ATTR_CHIP_UNIT_POS );
HSVC_LOAD_ATTR( ATTR_FUNCTIONAL );
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_plat.xml --
+// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
+// No attributes found
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml --
// No attributes found
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_hwp.xml --
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml --
HSVC_LOAD_ATTR( ATTR_PM_SPWUP_FSP );
HSVC_LOAD_ATTR( ATTR_PM_SPWUP_OCC );
HSVC_LOAD_ATTR( ATTR_PM_SPWUP_PHYP );
-// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
-// No attributes found
diff --git a/src/usr/runtime/common/hsvc_procdata.C b/src/usr/runtime/common/hsvc_procdata.C
index b71b99565..df0f4a90e 100644
--- a/src/usr/runtime/common/hsvc_procdata.C
+++ b/src/usr/runtime/common/hsvc_procdata.C
@@ -20,35 +20,29 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// Generated on Thu Feb 14 14:54:31 CST 2013 by dcrowell from
+// Generated on Wed Feb 20 15:44:15 CST 2013 by dcrowell from
+// src/usr/runtime/common/create_hsvc_data.pl src/usr/runtime/common/extra_runtime_attributes.xml src/usr/hwpf/hwp/chip_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml -w -d
// -- Input: src/usr/runtime/common/extra_runtime_attributes.xml --
HSVC_LOAD_ATTR( ATTR_FUNCTIONAL );
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_plat.xml --
+// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
+HSVC_LOAD_ATTR( ATTR_CHIP_HAS_SBE );
+HSVC_LOAD_ATTR( ATTR_CHIP_ID );
+HSVC_LOAD_ATTR( ATTR_CHIP_REGIONS_TO_ENABLE );
+HSVC_LOAD_ATTR_P( ATTR_EC );
+HSVC_LOAD_ATTR( ATTR_FABRIC_CHIP_ID );
+HSVC_LOAD_ATTR( ATTR_FABRIC_NODE_ID );
+HSVC_LOAD_ATTR( ATTR_FSI_GP_REG_SCOM_ACCESS );
+HSVC_LOAD_ATTR_P( ATTR_NAME );
+HSVC_LOAD_ATTR( ATTR_PROC_DCM_INSTALLED );
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml --
HSVC_LOAD_ATTR( ATTR_PM_APSS_CHIP_SELECT );
-HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY );
-HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPSIZE );
HSVC_LOAD_ATTR( ATTR_PM_PBAX_BRDCST_ID_VECTOR );
HSVC_LOAD_ATTR( ATTR_PM_PBAX_CHIPID );
HSVC_LOAD_ATTR( ATTR_PM_PBAX_NODEID );
HSVC_LOAD_ATTR( ATTR_PM_PSTATE_UNDERVOLTING_MAXIMUM );
HSVC_LOAD_ATTR( ATTR_PM_PSTATE_UNDERVOLTING_MINIMUM );
-HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_FULL_CLOCK_SECTOR_BUFFER_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_HIGH_BAND_LOWER_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_HIGH_BAND_UPPER_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LOW_BAND_LOWER_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LOW_BAND_UPPER_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_SAFE_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_SAFE_VOLTAGE );
-HSVC_LOAD_ATTR( ATTR_PM_SLEEP_ENTRY );
-HSVC_LOAD_ATTR( ATTR_PM_SLEEP_EXIT );
-HSVC_LOAD_ATTR( ATTR_PM_SLEEP_TYPE );
-HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_FREQUENCY );
-HSVC_LOAD_ATTR( ATTR_PM_SPIVID_FREQUENCY );
HSVC_LOAD_ATTR( ATTR_PM_SPIVID_PORT_ENABLE );
-HSVC_LOAD_ATTR( ATTR_PM_WINKLE_ENTRY );
-HSVC_LOAD_ATTR( ATTR_PM_WINKLE_EXIT );
-HSVC_LOAD_ATTR( ATTR_PM_WINKLE_TYPE );
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_hwp.xml --
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml --
HSVC_LOAD_ATTR( ATTR_PM_AISS_TIMEOUT );
HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY_RANGE );
HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY_VALUE );
@@ -92,6 +86,9 @@ HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_HFRLOW_PSTATE );
HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LFRLOW_PSTATE );
HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LFRUPPER_PSTATE );
HSVC_LOAD_ATTR( ATTR_PM_SAFE_PSTATE );
+HSVC_LOAD_ATTR( ATTR_PM_SLEEP_ENTRY );
+HSVC_LOAD_ATTR( ATTR_PM_SLEEP_EXIT );
+HSVC_LOAD_ATTR( ATTR_PM_SLEEP_TYPE );
HSVC_LOAD_ATTR( ATTR_PM_SLEEP_WINKLE_REQUEST_TIMEOUT );
HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_CLOCK_DIVIDER );
HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_CLOCK_PHASE );
@@ -117,13 +114,5 @@ HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME1 );
HSVC_LOAD_ATTR( ATTR_PM_SPIVID_IN_DELAY_FRAME2 );
HSVC_LOAD_ATTR( ATTR_PM_SPIVID_MAJORITY_VOTE_ENABLE );
HSVC_LOAD_ATTR( ATTR_PM_SPIVID_MAX_RETRIES );
-// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
-HSVC_LOAD_ATTR( ATTR_CHIP_HAS_SBE );
-HSVC_LOAD_ATTR( ATTR_CHIP_ID );
-HSVC_LOAD_ATTR( ATTR_CHIP_REGIONS_TO_ENABLE );
-HSVC_LOAD_ATTR_P( ATTR_EC );
-HSVC_LOAD_ATTR( ATTR_FABRIC_CHIP_ID );
-HSVC_LOAD_ATTR( ATTR_FABRIC_NODE_ID );
-HSVC_LOAD_ATTR( ATTR_FSI_GP_REG_SCOM_ACCESS );
-HSVC_LOAD_ATTR_P( ATTR_NAME );
-HSVC_LOAD_ATTR( ATTR_PROC_DCM_INSTALLED );
+HSVC_LOAD_ATTR( ATTR_PM_WINKLE_TYPE );
+HSVC_LOAD_ATTR( ATTR_PROC_DPLL_DIVIDER );
diff --git a/src/usr/runtime/common/hsvc_sysdata.C b/src/usr/runtime/common/hsvc_sysdata.C
index 57b0cd373..e0bb0a553 100644
--- a/src/usr/runtime/common/hsvc_sysdata.C
+++ b/src/usr/runtime/common/hsvc_sysdata.C
@@ -20,17 +20,31 @@
/* Origin: 30 */
/* */
/* IBM_PROLOG_END_TAG */
-// Generated on Thu Feb 14 14:54:31 CST 2013 by dcrowell from
+// Generated on Wed Feb 20 15:44:15 CST 2013 by dcrowell from
+// src/usr/runtime/common/create_hsvc_data.pl src/usr/runtime/common/extra_runtime_attributes.xml src/usr/hwpf/hwp/chip_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml -w -d
+
// -- Input: src/usr/runtime/common/extra_runtime_attributes.xml --
+HSVC_LOAD_ATTR( ATTR_EXECUTION_PLATFORM );
HSVC_LOAD_ATTR( ATTR_FREQ_PB );
+HSVC_LOAD_ATTR( ATTR_FREQ_PROC_REFCLOCK );
+HSVC_LOAD_ATTR( ATTR_IS_SIMULATION );
HSVC_LOAD_ATTR( ATTR_SCRATCH_UINT32_1 );
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_plat.xml --
+// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
+// No attributes found
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_plat_attributes.xml --
HSVC_LOAD_ATTR( ATTR_FREQ_CORE_MAX );
-HSVC_LOAD_ATTR( ATTR_PROC_DPLL_DIVIDER );
+HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPDELAY );
+HSVC_LOAD_ATTR( ATTR_PM_EXTERNAL_VRM_STEPSIZE );
+HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_FULL_CLOCK_SECTOR_BUFFER_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_HIGH_BAND_LOWER_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_HIGH_BAND_UPPER_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LOW_BAND_LOWER_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_RESONANT_CLOCK_LOW_BAND_UPPER_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_SAFE_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_SPIPSS_FREQUENCY );
+HSVC_LOAD_ATTR( ATTR_PM_SPIVID_FREQUENCY );
HSVC_LOAD_ATTR( ATTR_PROC_R_DISTLOSS );
HSVC_LOAD_ATTR( ATTR_PROC_R_LOADLINE );
HSVC_LOAD_ATTR( ATTR_PROC_VRM_VOFFSET );
-// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_attributes_all_hwp.xml --
-// No attributes found
-// -- Input: src/usr/hwpf/hwp/chip_attributes.xml --
+// -- Input: src/usr/hwpf/hwp/runtime_attributes/pm_hwp_attributes.xml --
// No attributes found
diff --git a/src/usr/runtime/populate_attributes.C b/src/usr/runtime/populate_attributes.C
index 650f0d927..19d3d7d07 100644
--- a/src/usr/runtime/populate_attributes.C
+++ b/src/usr/runtime/populate_attributes.C
@@ -144,7 +144,7 @@ namespace RUNTIME
struct system_data_t
{
enum {
- MAX_ATTRIBUTES = 20
+ MAX_ATTRIBUTES = 25
};
// header data that HostServices uses
diff --git a/src/usr/runtime/test/runtimeattrstest.H b/src/usr/runtime/test/runtimeattrstest.H
index 76ccbac01..7ab4b1592 100644
--- a/src/usr/runtime/test/runtimeattrstest.H
+++ b/src/usr/runtime/test/runtimeattrstest.H
@@ -5,7 +5,7 @@
/* */
/* IBM CONFIDENTIAL */
/* */
-/* COPYRIGHT International Business Machines Corp. 2012 */
+/* COPYRIGHT International Business Machines Corp. 2012,2013 */
/* */
/* p1 */
/* */
@@ -86,19 +86,22 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
{
TS_FAIL("Error getting fapi::ATTR_FREQ_PB");
}
+ bool freq_found = false;
- fapi::ATTR_PROC_R_LOADLINE_Type spivid = 0;
- l_rc = FAPI_ATTR_GET(ATTR_PROC_R_LOADLINE,NULL,spivid);
+ fapi::ATTR_PROC_R_LOADLINE_Type loadline = 0;
+ l_rc = FAPI_ATTR_GET(ATTR_PROC_R_LOADLINE,NULL,loadline);
if( l_rc )
{
TS_FAIL("Error getting fapi::ATTR_PROC_R_LOADLINE");
}
+ bool loadline_found = false;
uint64_t attr = 0;
while( headers[attr].id != hsvc_attr_header_t::NO_ATTRIBUTE )
{
if( headers[attr].id == fapi::ATTR_FREQ_PB )
{
+ freq_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_FREQ_PB_Type) )
{
@@ -119,6 +122,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
}
else if( headers[attr].id == fapi::ATTR_PROC_R_LOADLINE )
{
+ loadline_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_PROC_R_LOADLINE_Type) )
{
@@ -127,18 +131,18 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
}
else
{
- fapi::ATTR_PROC_R_LOADLINE_Type* spivid_act =
+ fapi::ATTR_PROC_R_LOADLINE_Type* loadline_act =
reinterpret_cast<fapi::ATTR_PROC_R_LOADLINE_Type*>
(beginning+headers[attr].offset);
- if( *spivid_act != spivid )
+ if( *loadline_act != loadline )
{
- TRACFCOMP( g_trac_runtime, "Expected=%X, Actual=%X", spivid, *spivid_act );
+ TRACFCOMP( g_trac_runtime, "Expected=%X, Actual=%X", loadline, *loadline_act );
TS_FAIL("fapi::ATTR_PROC_R_LOADLINE data is wrong");
}
}
}
attr++;
- }
+ }
if( attr != sysdata->numAttr )
{
@@ -146,6 +150,15 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
TS_FAIL("testVerifySystemAttributes> Number of attributes found doesn't match expected value");
}
+ if( !freq_found )
+ {
+ TS_FAIL("Never found FREQ_PB in system attributes");
+ }
+ if( !loadline_found )
+ {
+ TS_FAIL("Never found ATTR_PROC_R_LOADLINE in system attributes");
+ }
+
TRACFCOMP( g_trac_runtime, "testVerifySystemAttributes> finish" );
}
@@ -207,6 +220,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
{
TS_FAIL("Error getting fapi::ATTR_CHIP_ID");
}
+ bool tmp1_found = false;
fapi::ATTR_PM_PVSAFE_PSTATE_Type tmp2 = 0;
l_rc = FAPI_ATTR_GET(ATTR_PM_PVSAFE_PSTATE,proc,tmp2);
@@ -214,12 +228,14 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
{
TS_FAIL("Error getting fapi::ATTR_PM_PVSAFE_PSTATE");
}
+ bool tmp2_found = false;
uint64_t attr = 0;
while( headers[attr].id != hsvc_attr_header_t::NO_ATTRIBUTE )
{
if( headers[attr].id == fapi::ATTR_CHIP_ID )
{
+ tmp1_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_CHIP_ID_Type) )
{
@@ -240,6 +256,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
}
else if( headers[attr].id == fapi::ATTR_PM_PVSAFE_PSTATE )
{
+ tmp2_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_PM_PVSAFE_PSTATE_Type) )
{
@@ -266,6 +283,15 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
TS_FAIL("testVerifyNodeAttributes> Number of attributes found doesn't match expected value");
}
+ if( !tmp1_found )
+ {
+ TS_FAIL("Never found ATTR_PM_PVSAFE_PSTATE for procid=%d",curproc->procid);
+ }
+ if( !tmp2_found )
+ {
+ TS_FAIL("Never found ATTR_PM_PVSAFE_PSTATE for procid=%d",curproc->procid);
+ }
+
delete proc;
curproc++;
}
@@ -304,6 +330,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
errlHndl_t errhdl = fapiRcToErrl(l_rc);
errlCommit(errhdl,RUNTIME_COMP_ID);
}
+ bool tmp1_found = false;
fapi::ATTR_FUNCTIONAL_Type tmp2 = 0;
l_rc = FAPI_ATTR_GET(ATTR_FUNCTIONAL,ex,tmp2);
@@ -313,12 +340,14 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
errlHndl_t errhdl = fapiRcToErrl(l_rc);
errlCommit(errhdl,RUNTIME_COMP_ID);
}
+ bool tmp2_found = false;
uint64_t attr = 0;
while( headers[attr].id != hsvc_attr_header_t::NO_ATTRIBUTE )
{
if( headers[attr].id == fapi::ATTR_CHIP_UNIT_POS )
{
+ tmp1_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_CHIP_UNIT_POS_Type) )
{
@@ -339,6 +368,7 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
}
else if( headers[attr].id == fapi::ATTR_FUNCTIONAL )
{
+ tmp2_found = true;
if( headers[attr].sizeBytes !=
sizeof(fapi::ATTR_FUNCTIONAL_Type) )
{
@@ -365,6 +395,17 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
TS_FAIL("Number of attributes found doesn't match expected value");
}
+ if( !tmp1_found )
+ {
+ TS_FAIL("Never found ATTR_CHIP_UNIT_POS for procid=%d, ex=%d",
+ curproc->procid,curex->chiplet);
+ }
+ if( !tmp2_found )
+ {
+ TS_FAIL("Never found ATTR_FUNCTIONAL for procid=%d, ex=%d",
+ curproc->procid,curex->chiplet);
+ }
+
delete ex;
curex++;
}
@@ -462,9 +503,10 @@ class RuntimeAttrsTest: public CxxTest::TestSuite
uint32_t chiplet = all_ex[e]->getAttr<TARGETING::ATTR_CHIP_UNIT>();
if( chiplet == i_chiplet )
{
- return( new fapi::Target( fapi::TARGET_TYPE_PROC_CHIP,
- reinterpret_cast<void *>
- (const_cast<TARGETING::Target*>(all_ex[e])) ) );
+ return( new fapi::Target(
+ fapi::TARGET_TYPE_PROC_CHIP,
+ reinterpret_cast<void *>
+ (const_cast<TARGETING::Target*>(all_ex[e])) ) );
}
}
return NULL;
OpenPOWER on IntegriCloud