diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2017-07-17 20:33:21 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-08-11 16:32:57 -0400 |
commit | f3423e48a1fec89b8d9f7a0f20977013f2330dd9 (patch) | |
tree | 1638235944e89551cdde4fb67abe6353a9b12378 /src/include/runtime | |
parent | f872a41a9d1551903f3f1caf94852e92576cd019 (diff) | |
download | talos-hostboot-f3423e48a1fec89b8d9f7a0f20977013f2330dd9.tar.gz talos-hostboot-f3423e48a1fec89b8d9f7a0f20977013f2330dd9.zip |
Changed method firmware_request so it can be used by OPAL
Change-Id: I5ebdc6d61b7891f1c975490820a57259b35a6fdf
RTC:175856
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43283
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: ILYA SMIRNOV <ismirno@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/runtime')
-rw-r--r-- | src/include/runtime/interface.h | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 7f2062775..265ba2d0f 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -490,6 +490,56 @@ typedef struct hostInterfaces uint64_t i_scomData ); /** + * @brief Structure to be sent and received in the + * firmware_request call + * + */ + enum + { + HBRT_FW_MSG_TYPE_REQ_NOP = 0, + HBRT_FW_MSG_TYPE_RESP_NOP = 1, + HBRT_FW_MSG_TYPE_RESP_GENERIC = 2, + HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE = 3, + }; + + struct hbrt_fw_msg // define struct hbrt_fw_msg + { + hbrt_fw_msg() { req_hcode_update = { 0 }; }; // ctor + + uint64_t io_type; // message type from HBRT_FW_MSG_TYPE enum + union + { + // This struct is returned from skiboot with + // io_type set to HBRT_FW_MSG_TYPE_RESP_GENERIC or + // with HBRT_FW_MSG_TYPE_RESP_NOP + struct + { + uint64_t o_status; // return code for a generic response + } resp_generic; + + // This struct is sent from HBRT with + // io_type set to HBRT_FW_MSG_TYPE_REQ_HCODE_UPDATE + struct + { + uint64_t i_chipId; // processor chip ID plus ID type, + // always proc (0x0) + uint32_t i_section; // runtime section to update + // (passthru to pore_gen_scom) + uint32_t i_operation; // type of operation to perform + // (passthru to pore_gen_scom) + uint64_t i_scomAddr; // fully qualified scom address + uint64_t i_scomData; // data for operation + } req_hcode_update; + }; + }; + + // Created this enum to hold the base size of hbrt_fw_msg + // Can't do #define - sizeof not allowed to be used in #defines + // Can't do a constant, if you do, you will need to create + // an instance of this struct to get to it + enum { HBRT_FW_MSG_BASE_SIZE = sizeof(uint64_t) }; + + /** * @brief Send a request to firmware, and receive a response * @details * req_len bytes are sent to runtime firmware, and resp_len |