diff options
author | Chris Cain <cjcain@us.ibm.com> | 2015-06-18 12:46:05 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-08-18 19:35:23 -0500 |
commit | 275ea30364bf2d831f213f9a73b5f8fa8ef851af (patch) | |
tree | 448949765c96bd8c4c83a109cb6ee8f7ca729c39 /src/include | |
parent | 6ff3e00062b894a880937ce41f748e26105b579a (diff) | |
download | talos-hostboot-275ea30364bf2d831f213f9a73b5f8fa8ef851af.tar.gz talos-hostboot-275ea30364bf2d831f213f9a73b5f8fa8ef851af.zip |
HTMGT support for Pstate Table Biasing
Change-Id: I96aff34fb9b588d8546575b77655a6cf167469fb
RTC: 128436
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18789
Tested-by: Jenkins Server
Tested-by: Jenkins OP Build CI
Tested-by: Jenkins OP HW
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/runtime/interface.h | 26 | ||||
-rwxr-xr-x | src/include/usr/htmgt/htmgt.H | 24 | ||||
-rw-r--r-- | src/include/usr/htmgt/htmgt_reasoncodes.H | 4 |
3 files changed, 54 insertions, 0 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index a7177a000..055f751a5 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -466,6 +466,32 @@ typedef struct runtimeInterfaces int (*apply_attr_override)(uint8_t* i_data, size_t i_size ); + /** + * @brief Send a pass-through command to HTMGT + * + * @details This is a blocking call that will send a command + * to HTMGT. + * + * @note If o_rspLength is returned with a non-zero value, + * the data at the o_rspData should be dumped to + * stdout in a hex dump format. + * @note The maximum response data returned will be 4096 bytes + * + * @param[in] i_cmdLength number of bytes in pass-thru command data + * @param[in] *i_cmdData pointer to pass-thru command data + * @param[out] *o_rspLength pointer to number of bytes returned + * in o_rspData + * @param[out] *o_rspData pointer to a 4096 byte buffer that will + * contain the response data from the command + * + * @returns 0 on success, or return code if the command failed + * @platform OpenPower + */ + int (*mfg_htmgt_pass_thru)(uint16_t i_cmdLength, + uint8_t * i_cmdData, + uint16_t * o_rspLength, + uint8_t * o_rspData); + // Reserve some space for future growth. void (*reserved[32])(void); diff --git a/src/include/usr/htmgt/htmgt.H b/src/include/usr/htmgt/htmgt.H index de7cfd2fb..8fbdf21c9 100755 --- a/src/include/usr/htmgt/htmgt.H +++ b/src/include/usr/htmgt/htmgt.H @@ -107,6 +107,30 @@ namespace HTMGT */ errlHndl_t enableOccActuation(bool i_occActivation); + + + /** + * @brief Send a pass-through command to HTMGT + * + * @details This is a blocking call that will send a command + * to HTMGT. + * + * @note The maximum response data returned will be 4096 bytes + * + * @param[in] i_cmdLength number of bytes in pass-thru command data + * @param[in] *i_cmdData pointer to pass-thru command data + * @param[out] o_rspLength number of bytes returned in o_rspData + * @param[out] *o_rspData pointer to a 4096 byte buffer that will + * contain the response data from the command + * + * @returns NULL on success, or an error handle if the state did not + * change. + */ + errlHndl_t passThruCommand(uint16_t i_cmdLength, + uint8_t * i_cmdData, + uint16_t & o_rspLength, + uint8_t * o_rspData); + } #endif // HTMGT_H diff --git a/src/include/usr/htmgt/htmgt_reasoncodes.H b/src/include/usr/htmgt/htmgt_reasoncodes.H index 18c4da539..5fc1b9638 100644 --- a/src/include/usr/htmgt/htmgt_reasoncodes.H +++ b/src/include/usr/htmgt/htmgt_reasoncodes.H @@ -40,6 +40,8 @@ namespace HTMGT HTMGT_MOD_PROCESS_OCC_RESET = 0x06, HTMGT_MOD_OCC_RESET = 0x07, HTMGT_MOD_BUILD_OCCS = 0x08, + HTMGT_MOD_PASS_THRU = 0x09, + HTMGT_MOD_CFG_FREQ_POINTS = 0x0A, HTMGT_MOD_OCC_POLL = 0x76, HTMGT_MOD_BAD_FRU_CALLOUTS = 0x7D, HTMGT_MOD_MISMATCHING_SEVERITY = 0x7F, @@ -54,11 +56,13 @@ namespace HTMGT enum htmgtReasonCode { + HTMGT_RC_NO_ERROR = 0x00, HTMGT_RC_INTERNAL_ERROR = HTMGT_COMP_ID | 0x01, HTMGT_RC_THROTTLE_UTIL_ERROR = HTMGT_COMP_ID | 0x02, HTMGT_RC_THROTTLE_INVALID_N = HTMGT_COMP_ID | 0x03, HTMGT_RC_OT_THROTTLE_INVALID_N = HTMGT_COMP_ID | 0x04, HTMGT_RC_OCC_NOT_READY = HTMGT_COMP_ID | 0x05, + HTMGT_RC_ATTRIBUTE_ERROR = HTMGT_COMP_ID | 0x06, HTMGT_RC_NO_SUPPORT = HTMGT_COMP_ID | 0x0F, HTMGT_RC_OCC_RESET = HTMGT_COMP_ID | 0x15, HTMGT_RC_OCC_CRIT_FAILURE = HTMGT_COMP_ID | 0x16, |