summaryrefslogtreecommitdiffstats
path: root/src/include/usr/hwpf
diff options
context:
space:
mode:
authorAdriana Kobylak <anoo@us.ibm.com>2014-09-28 18:41:51 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2014-12-02 18:07:13 -0600
commitf722d8c15b0ffa1d7d57608b8cff4e2865961aa8 (patch)
tree730144ecc90386c0ad3fddc417d2628bbe8ba5a4 /src/include/usr/hwpf
parentaeb70d93bba10dcddc9d4f8f35b460359cf864c2 (diff)
downloadblackbird-hostboot-f722d8c15b0ffa1d7d57608b8cff4e2865961aa8.tar.gz
blackbird-hostboot-f722d8c15b0ffa1d7d57608b8cff4e2865961aa8.zip
Port HWSV FreqVoltageSvc functionality to HB for Habanero
Change-Id: I90abd08bb6abf042273da606c6241bd22c58fa29 RTC: 108816 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/13642 Tested-by: Jenkins Server Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include/usr/hwpf')
-rw-r--r--src/include/usr/hwpf/fapi/fapiMvpdAccess.H65
-rw-r--r--src/include/usr/hwpf/hwpf_reasoncodes.H10
2 files changed, 72 insertions, 3 deletions
diff --git a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H b/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
index 902ab11ff..e1cbba54f 100644
--- a/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
+++ b/src/include/usr/hwpf/fapi/fapiMvpdAccess.H
@@ -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. */
@@ -124,6 +126,43 @@ namespace fapi
MVPD_KEYWORD_PB = 0x21,
MVPD_KEYWORD_CH = 0x22,
};
+
+ typedef struct voltageBucketData
+ {
+ // bucket Id
+ uint8_t bucketId;
+ // Nominal
+ uint16_t nomFreq;
+ uint16_t VnestNomVltg;
+ uint16_t InestNomCurr;
+ uint16_t VcsNomVltg;
+ uint16_t IcsNomCurr;
+ // PowerSave
+ uint16_t PSFreq;
+ uint16_t VnestPSVltg;
+ uint16_t InestPSCurr;
+ uint16_t VcsPSVltg;
+ uint16_t IcsPSCurr;
+ // Turbo
+ uint16_t turboFreq;
+ uint16_t VnestTurboVltg;
+ uint16_t InestTurboCurr;
+ uint16_t VcsTurboVltg;
+ uint16_t IcsTurboCurr;
+ //Fvmin
+ uint16_t fvminFreq;
+ uint16_t VnestFvminVltg;
+ uint16_t InestFvminCurr;
+ uint16_t VcsFvminVltg;
+ uint16_t IcsFvminCurr;
+ //Lab
+ uint16_t labFreq;
+ uint16_t VnestLabVltg;
+ uint16_t InestLabCurr;
+ uint16_t VcsLabVltg;
+ uint16_t IcsLabCurr;
+ }voltageBucketData_t;
+
}
extern "C"
@@ -131,9 +170,9 @@ extern "C"
/**
* @brief Get Module VPD field.
- *
+ *
* A Module VPD field is specified using a record and keyword enumerator
- *
+ *
* Suggested way to call this routine is to call it once with a NULL buffer
* pointer to to retrieve the size of the record, then allocate the proper
* size of the buffer and call again.
@@ -172,6 +211,26 @@ fapi::ReturnCode fapiSetMvpdField(const fapi::MvpdRecord i_record,
const fapi::Target &i_procTarget,
const uint8_t * const i_pBuffer,
const uint32_t i_fieldSize);
+
+/**
+ * @brief Get #V bucket data from VPD
+ *
+ * @par Detailed Description:
+ * This function reads PR keyword from the VPD, parses PR keyword
+ * to get voltage bucket id, reads #V keyword (Voltage data) from VPD,
+ * parses #V keyword to get voltage data corresponding to the bucket id
+ * indicated by the PR keyword and returns data to the caller.
+ *
+ * @param[in] i_pTarget Pointer to proc chip target.
+ * @param[in] i_record VPD record number to read #V bucket data
+ * @param[out] o_data On success, structure with #V bucket data from VPD
+ *
+ * @return fapi::ReturnCode. FAPI_RC_SUCCESS, or failure value.
+ */
+fapi::ReturnCode fapiGetPoundVBucketData(const TARGETING::Target *i_pChipTarget,
+ const uint32_t i_record,
+ fapi::voltageBucketData_t & o_data);
+
}
#endif
diff --git a/src/include/usr/hwpf/hwpf_reasoncodes.H b/src/include/usr/hwpf/hwpf_reasoncodes.H
index d9d0e8ae4..f4f5fc13b 100644
--- a/src/include/usr/hwpf/hwpf_reasoncodes.H
+++ b/src/include/usr/hwpf/hwpf_reasoncodes.H
@@ -74,6 +74,10 @@ namespace fapi
MOD_GET_OCC_CHIP_TARGET = 0x20,
MOD_ACCESS_OCB_INDIRECT_CHANNEL = 0x21,
MOD_GET_RCD_CNTL_WORD = 0x22,
+ MOD_GET_SYS_FREQ = 0x23,
+ MOD_GET_POUNDV_BUCKET_DATA = 0x24,
+ MOD_GET_VER_ONE_VOLTAGE_BUCKET_DATA = 0x25,
+ MOD_PLAT_MVPD_GET_VLTG_BUCKET_ATTR = 0x26,
};
@@ -126,6 +130,12 @@ namespace fapi
RC_TARGET_UNSUPPORTED = HWPF_COMP_ID | 0x31,
RC_INVALID_DATA_BUFFER_LENGTH = HWPF_COMP_ID | 0x32,
RC_INVALID_DIMM_TYPE = HWPF_COMP_ID | 0x33,
+ RC_INVALID_DATA = HWPF_COMP_ID | 0x34,
+ RC_INVALID_SIZE = HWPF_COMP_ID | 0x35,
+ RC_INVALID_FREQ = HWPF_COMP_ID | 0x36,
+ RC_INVALID_PARAM = HWPF_COMP_ID | 0x37,
+ RC_DATA_MISMATCH = HWPF_COMP_ID | 0x38,
+ RC_DATA_NOT_SUPPORTED = HWPF_COMP_ID | 0x39,
};
/**
OpenPOWER on IntegriCloud