diff options
author | Matt Derksen <mderkse1@us.ibm.com> | 2017-12-15 15:45:24 -0600 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-12-22 09:49:35 -0500 |
commit | d2b876356f5441e7be94c434952c25826e929370 (patch) | |
tree | 50cbf1b464584d992850c5fca5dc5e1ea6f94e87 /src/include/runtime | |
parent | 024dc9b9a20380fd7dbdec4f20aca23ceab751ed (diff) | |
download | talos-hostboot-d2b876356f5441e7be94c434952c25826e929370.tar.gz talos-hostboot-d2b876356f5441e7be94c434952c25826e929370.zip |
Lock i2c around vpd write message to FSP at runtime
Adding this lock mechanism to handle contention between
the Host and OCC. Using the Host's lock as a proxy for any
operations we want the FSP to do for us. HBRT will now call
to lock the master i2c, then call down to the FSP to do the
VPD write, then call to unlock the master.
Change-Id: Ifa06b3bf12fe9914980d39d2663f032ddb950b94
RTC:184131
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/51041
Reviewed-by: Martin Gloff <mgloff@us.ibm.com>
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@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: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/include/runtime')
-rw-r--r-- | src/include/runtime/interface.h | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/src/include/runtime/interface.h b/src/include/runtime/interface.h index 3a6ac6b93..b2c7312a4 100644 --- a/src/include/runtime/interface.h +++ b/src/include/runtime/interface.h @@ -74,6 +74,7 @@ enum MemoryError_t MEMORY_ERROR_PREDICTIVE = 2, }; + /** * I2C Master Description: chip, engine and port packed into * a single 64-bit argument @@ -504,7 +505,6 @@ typedef struct hostInterfaces /** * @brief Structure to be sent and received in the * firmware_request call - * */ enum { @@ -515,6 +515,7 @@ typedef struct hostInterfaces HBRT_FW_MSG_HBRT_FSP_REQ = 4, HBRT_FW_MSG_TYPE_ERROR_LOG = 5, HBRT_FW_MSG_HBRT_FSP_RESP = 6, + HBRT_FW_MSG_TYPE_I2C_LOCK = 7, }; struct hbrt_fw_msg // define struct hbrt_fw_msg @@ -558,6 +559,19 @@ typedef struct hostInterfaces // (uint8_t*)&l_req_fw_msg->error_log.i_data; } __attribute__ ((packed)) error_log; + + // This struct is sent from HBRT with + // io_type set to HBRT_FW_MSG_TYPE_I2C_LOCK + struct + { + uint64_t i_chipId; // processor chip ID plus ID type, + // always proc (0x0) + uint8_t i_i2cMaster; // i2c master + // B=0, C=1, D=2, E=3 + uint8_t i_operation; // type of operation to perform + // 1 = lock, 2 = unlock + } __attribute__ ((packed)) req_i2c_lock; + // This struct is sent from HBRT with // io_type set to HBRT_FW_MSG_HBRT_FSP_REQ or // HBRT_FW_MSG_HBRT_FSP_RESP |