diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2014-09-02 15:46:56 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2014-10-06 11:01:35 -0500 |
commit | 5e8d612185ddcaf6af1c66c9ce4d2a98eebdb1ef (patch) | |
tree | b7f7b68aee478c8b2a10b48307087915574d0f56 /src/usr/hwpf/test/hwpMBvpdAccessorTest.H | |
parent | 79ab9af6f2d2413c4154226e6dd5b99c00df2873 (diff) | |
download | talos-hostboot-5e8d612185ddcaf6af1c66c9ce4d2a98eebdb1ef.tar.gz talos-hostboot-5e8d612185ddcaf6af1c66c9ce4d2a98eebdb1ef.zip |
add support for ATTR_MSS_POWER_CONTROL_CAPABLE
RTC:112608
Change-Id: If3cdeda8d8cd4a25f6ea4823c8f4cc8de05450cc
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13107
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/test/hwpMBvpdAccessorTest.H')
-rw-r--r-- | src/usr/hwpf/test/hwpMBvpdAccessorTest.H | 58 |
1 files changed, 57 insertions, 1 deletions
diff --git a/src/usr/hwpf/test/hwpMBvpdAccessorTest.H b/src/usr/hwpf/test/hwpMBvpdAccessorTest.H index 383c47928..7b686a2f9 100644 --- a/src/usr/hwpf/test/hwpMBvpdAccessorTest.H +++ b/src/usr/hwpf/test/hwpMBvpdAccessorTest.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,2014 */ +/* [+] International Business Machines Corp. */ +/* */ /* */ /* Licensed under the Apache License, Version 2.0 (the "License"); */ /* you may not use this file except in compliance with the License. */ @@ -56,6 +58,7 @@ #include <mvpd_accessors/getMBvpdVersion.H> #include <mvpd_accessors/getMBvpdDram2NModeEnabled.H> #include <mvpd_accessors/getMBvpdSensorMap.H> +#include <mvpd_accessors/getControlCapableData.H> #include <mvpd_accessors/accessMBvpdL4BankDelete.H> #include <errl/errlmanager.H> @@ -203,6 +206,59 @@ public: } /** + * @brief call getControlCapableData to ensure that it's getting the MR + * keyword correctly, and getting the right data + * + */ + void testGetControlCapableData() + { + fapi::ReturnCode l_fapirc; + + TS_TRACE( "getControlCapableData entry" ); + + TARGETING::TargetHandleList l_memBufList; + getAllChips(l_memBufList, TYPE_MEMBUF); + +#if HWPMBVPDACCESSORTEST_UT0 + uint8_t l_mbNum = 0; //check them all in unit test +#else + uint8_t l_mbNum = (l_memBufList.size() > 0) ? l_memBufList.size()-1 : 0; +#endif + for (; l_mbNum < l_memBufList.size(); l_mbNum++ ) + { + // make a local copy of the memory buffer target + TARGETING::Target* l_mb_target = l_memBufList[l_mbNum]; + + // dump physical path to target + EntityPath l_path; + l_path = l_mb_target->getAttr<ATTR_PHYS_PATH>(); + l_path.dump(); + + // cast OUR type of target to a FAPI type of target. + fapi::Target l_fapi_mb_target( + TARGET_TYPE_MEMBUF_CHIP, + (const_cast<TARGETING::Target*>(l_mb_target)) ); + + + uint8_t l_val = 5; + l_fapirc = FAPI_ATTR_GET(ATTR_MSS_POWER_CONTROL_CAPABLE, + &l_fapi_mb_target,l_val); + + if(l_fapirc) break; + TS_TRACE( "Power Control Capable Accessor " + "POWER_CONTROL_CAPABLE=0x%02x", l_val); + } + if (l_fapirc) + { + TS_FAIL( "getControlCapableData: FAPI_ATTR_GET fail rc=0x%x", + static_cast<uint32_t>(l_fapirc) ); + fapiLogError(l_fapirc); + } + + TS_TRACE( "testGetControlCapableData exit" ); + + } + /** * @brief call getMBvpdSlopeInterceptData to fetch power slope and intercept * attributes from the MW and MV keywords * |