summaryrefslogtreecommitdiffstats
path: root/src/usr/hwpf/hwp/mvpd_accessors
diff options
context:
space:
mode:
authorElizabeth Liner <eliner@us.ibm.com>2014-09-02 15:46:56 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-10-06 11:01:35 -0500
commit5e8d612185ddcaf6af1c66c9ce4d2a98eebdb1ef (patch)
treeb7f7b68aee478c8b2a10b48307087915574d0f56 /src/usr/hwpf/hwp/mvpd_accessors
parent79ab9af6f2d2413c4154226e6dd5b99c00df2873 (diff)
downloadtalos-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/hwp/mvpd_accessors')
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.C77
-rw-r--r--src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk5
2 files changed, 81 insertions, 1 deletions
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.C b/src/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.C
new file mode 100644
index 000000000..b52512a31
--- /dev/null
+++ b/src/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.C
@@ -0,0 +1,77 @@
+/* IBM_PROLOG_BEGIN_TAG */
+/* This is an automatically generated prolog. */
+/* */
+/* $Source: src/usr/hwpf/hwp/mvpd_accessors/getControlCapableData.C $ */
+/* */
+/* OpenPOWER HostBoot Project */
+/* */
+/* Contributors Listed Below - COPYRIGHT 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. */
+/* You may obtain a copy of the License at */
+/* */
+/* http://www.apache.org/licenses/LICENSE-2.0 */
+/* */
+/* Unless required by applicable law or agreed to in writing, software */
+/* distributed under the License is distributed on an "AS IS" BASIS, */
+/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */
+/* implied. See the License for the specific language governing */
+/* permissions and limitations under the License. */
+/* */
+/* IBM_PROLOG_END_TAG */
+// $ID: getControlCapableData.C, v 1.1 2014/9/4 09:05:00 eliner Exp $
+/**
+ * @file getControlCapable.C
+ *
+ * @brief MBvpd accessor for the ATTR_MSS_POWER_CONTROL_CAPABLE attributes
+ */
+
+#include <stdint.h>
+#include <fapi.H>
+#include <getControlCapableData.H>
+
+extern "C"
+{
+using namespace fapi;
+fapi::ReturnCode getControlCapableData(
+ const fapi::Target &i_mbTarget,
+ uint8_t & o_val)
+{
+ //Record:VSPD, Keyword:MR, offset: 253, 1 byte.
+ const uint32_t MR_KEYWORD_SIZE = 255;
+
+ struct mr_keyword
+ {
+ uint8_t filler[253];
+ uint8_t position; //offset 253
+ uint8_t extraFiller[MR_KEYWORD_SIZE-sizeof(filler)-sizeof(position)];
+ };
+
+ fapi::ReturnCode l_fapirc;
+ mr_keyword * l_pMrBuffer = new mr_keyword;
+ uint32_t l_MrBufsize = MR_KEYWORD_SIZE;
+ do{
+
+ l_fapirc = fapiGetMBvpdField(fapi::MBVPD_RECORD_VSPD,
+ fapi::MBVPD_KEYWORD_MR,
+ i_mbTarget,
+ reinterpret_cast<uint8_t *>(l_pMrBuffer),
+ l_MrBufsize);
+ if(l_fapirc)
+ {
+ FAPI_ERR("getControlCapableData: Read of MR Keyword failed");
+ break;
+ }
+ o_val = l_pMrBuffer->position;
+
+ }while(0);
+
+ delete l_pMrBuffer;
+ l_pMrBuffer = NULL;
+
+ return l_fapirc;
+}
+}
diff --git a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
index e2769a606..73e2281fd 100644
--- a/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
+++ b/src/usr/hwpf/hwp/mvpd_accessors/mvpd.mk
@@ -5,7 +5,9 @@
#
# OpenPOWER HostBoot Project
#
-# COPYRIGHT International Business Machines Corp. 2012,2014
+# Contributors Listed Below - COPYRIGHT 2012,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.
@@ -38,5 +40,6 @@ OBJS += getMBvpdSpareDramData.o
OBJS += getMBvpdVersion.o
OBJS += getMBvpdDram2NModeEnabled.o
OBJS += getMBvpdSensorMap.o
+OBJS += getControlCapableData.o
OBJS += accessMBvpdL4BankDelete.o
OpenPOWER on IntegriCloud