summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorVan Lee <vanlee@us.ibm.com>2012-01-06 13:59:01 -0600
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-01-09 16:58:49 -0600
commit7a8bc7106aee3772bb978ff9d4f0a33ab7e8e90f (patch)
treebeeea4114ffdfd57cac887b3d05ee9ebaa29976b /src/usr
parentcecc38a1b5782b5ddaa351d37e064200d407c8fb (diff)
downloadtalos-hostboot-7a8bc7106aee3772bb978ff9d4f0a33ab7e8e90f.tar.gz
talos-hostboot-7a8bc7106aee3772bb978ff9d4f0a33ab7e8e90f.zip
HWPF Attribute Support: ATTR_EC - RTC4552
Change-Id: I4543ea01f1f31e2b3018699753cd33efdcec0c5c Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/595 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr')
-rw-r--r--src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml9
-rw-r--r--src/usr/hwpf/test/hwpftest.H26
-rw-r--r--src/usr/targeting/xmltohb/attribute_types.xml17
-rw-r--r--src/usr/targeting/xmltohb/target_types.xml3
4 files changed, 49 insertions, 6 deletions
diff --git a/src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml b/src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml
index ec2767491..6cff3f8f7 100644
--- a/src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml
+++ b/src/usr/hwpf/hwp/fapiHwpAttributeInfo.xml
@@ -184,4 +184,13 @@
<valueType>uint8</valueType>
<platInit/>
</attribute>
+ <!-- ********************************************************************* -->
+ <attribute>
+ <id>ATTR_EC</id>
+ <targetType>TARGET_TYPE_PROC_CHIP,TARGET_TYPE_MEMBUF_CHIP</targetType>
+ <description>EC level of a chip target</description>
+ <valueType>uint8</valueType>
+ <platInit/>
+ <persistRuntime/>
+ </attribute>
</attributes>
diff --git a/src/usr/hwpf/test/hwpftest.H b/src/usr/hwpf/test/hwpftest.H
index 8a7e0e9c1..09072b8a5 100644
--- a/src/usr/hwpf/test/hwpftest.H
+++ b/src/usr/hwpf/test/hwpftest.H
@@ -370,21 +370,22 @@ public:
NULL, l_uint8array2);
if (l_rc != fapi::FAPI_RC_SUCCESS)
{
- FAPI_IMP("testHwpf5: ATTR_SCRATCH_UINT8_ARRAY_2. "
- "Error from SET");
+ TS_FAIL("testHwpf5: ATTR_SCRATCH_UINT8_ARRAY_2. "
+ "Error from SET");
break;
}
- uint8_t l_vpoMode;
- l_rc = FAPI_ATTR_GET(ATTR_IS_SIMULATION, NULL, l_vpoMode);
+ // Test ATTR_IS_SIMULATION access through FAPI
+ uint8_t l_flag;
+ l_rc = FAPI_ATTR_GET(ATTR_IS_SIMULATION, NULL, l_flag);
if (l_rc != fapi::FAPI_RC_SUCCESS)
{
- FAPI_IMP("testHwpf5: ATTR_IS_SIMULATION. Error from GET");
+ TS_FAIL("testHwpf5: ATTR_IS_SIMULATION. Error from GET");
break;
}
else
{
- //printk("VPO = %d\n", l_vpoMode);
+ //printk("ATTR_IS_SIMULATION = %d\n", l_flag);
}
// Get the master processor chip
@@ -395,6 +396,19 @@ public:
fapi::Target l_fapiTarget(TARGET_TYPE_PROC_CHIP,
reinterpret_cast<void *> (l_pTarget));
+ // Test ATTR_EC attribute access through FAPI
+ uint8_t l_EC_R = 0xFF;
+ fapi::Target *l_pfapiTarget = &l_fapiTarget;
+
+ l_rc = FAPI_ATTR_GET(ATTR_EC, l_pfapiTarget, l_EC_R);
+ if (l_rc != fapi::FAPI_RC_SUCCESS)
+ {
+ TS_FAIL("testHwpf5: ATTR_EC. Error from GET");
+ break;
+ }
+
+ //printk("EC = %d\n", l_EC_R);
+
/*
// Save original scom data to restore at end of test
for (uint32_t i = 0; i < sizeof(l_ifScomData)/sizeof(ifScom_t); i++)
diff --git a/src/usr/targeting/xmltohb/attribute_types.xml b/src/usr/targeting/xmltohb/attribute_types.xml
index b2433ffc7..2e3822612 100644
--- a/src/usr/targeting/xmltohb/attribute_types.xml
+++ b/src/usr/targeting/xmltohb/attribute_types.xml
@@ -2581,4 +2581,21 @@
<writeable/>
</attribute>
+<attribute>
+ <id>EC</id>
+ <description>attribute indicating the chip target's EC level</description>
+ <simpleType>
+ <uint8_t>
+ <default>0</default>
+ </uint8_t>
+ </simpleType>
+ <persistency>volatile-zeroed</persistency>
+ <readable/>
+ <writeable/>
+ <hwpfToHbAttrMap>
+ <id>ATTR_EC</id>
+ <macro>DIRECT</macro>
+ </hwpfToHbAttrMap>
+</attribute>
+
</attributes>
diff --git a/src/usr/targeting/xmltohb/target_types.xml b/src/usr/targeting/xmltohb/target_types.xml
index e801816da..8529b780a 100644
--- a/src/usr/targeting/xmltohb/target_types.xml
+++ b/src/usr/targeting/xmltohb/target_types.xml
@@ -114,6 +114,9 @@
<id>DECONFIG_GARDABLE</id>
<default>1</default>
</attribute>
+ <attribute>
+ <id>EC</id>
+ </attribute>
</targetType>
<targetType>
OpenPOWER on IntegriCloud