diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/runtime/generic_hbrt_fsp_message.H | 5 | ||||
| -rw-r--r-- | src/include/usr/fsiscom/fsiscom_reasoncodes.H | 17 | ||||
| -rw-r--r-- | src/include/usr/scom/runtime/rt_scomif.H | 42 |
3 files changed, 55 insertions, 9 deletions
diff --git a/src/include/runtime/generic_hbrt_fsp_message.H b/src/include/runtime/generic_hbrt_fsp_message.H index 6daff3cc2..30566290d 100644 --- a/src/include/runtime/generic_hbrt_fsp_message.H +++ b/src/include/runtime/generic_hbrt_fsp_message.H @@ -73,7 +73,7 @@ struct TargetDeconfigHbrtFspData_t */ struct SingleScomOpHbrtFspData_t { - uint8_t scom_op; // 0 == read, 1 == write + uint8_t scom_op; // DeviceFW::READ, DeviceFW::WRITE uint32_t huid; // hardware target uint64_t scom_addr; uint64_t scom_data; // SCOM value read by FSP, or @@ -92,11 +92,12 @@ struct MultiScomReadHbrtFspData_t uint8_t scom_num; // number of SCOMs to read uint64_t scom_data; // addresses of SCOMs to read, or // values of SCOMs in FSP response + // // ** if a SCOM cannot be read, its value ** // ** should be returned as DEADBEEF ** // // placeholder that can be cast to an array - // of values (or addresses) + // of SCOM addresses (or values) // uint64_t* mydata = // (uint64_t*)&(l_generic_msg.data); // more than 8 bytes of data is possible diff --git a/src/include/usr/fsiscom/fsiscom_reasoncodes.H b/src/include/usr/fsiscom/fsiscom_reasoncodes.H index 0c9aa0767..2acee4c72 100644 --- a/src/include/usr/fsiscom/fsiscom_reasoncodes.H +++ b/src/include/usr/fsiscom/fsiscom_reasoncodes.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2018 */ +/* [+] 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. */ @@ -29,19 +31,22 @@ namespace FSISCOM { enum FSISCOMModuleId { - MOD_FSISCOM_INVALID = 0x00, /**< Zero is an invalid module id */ - MOD_FSISCOM_PERFORMOP = 0x01, /**< fsiscom.C : fsiScomPerformOp */ - + MOD_FSISCOM_INVALID = 0x00, // Zero is an invalid module id + MOD_FSISCOM_PERFORM_OP = 0x01, // fsiscom.C : fsiScomPerformOp + MOD_FSISCOM_RT_SEND_SCOM_TO_FSP = 0x02, + MOD_FSISCOM_RT_SEND_MULTI_SCOM_TO_FSP = 0x03, }; enum FSISCOMReasonCode { - RC_INVALID = FSISCOM_COMP_ID | 0x00, - RC_WRITE_ERROR = FSISCOM_COMP_ID | 0x01, + RC_INVALID = FSISCOM_COMP_ID | 0x00, + RC_WRITE_ERROR = FSISCOM_COMP_ID | 0x01, RC_READ_ERROR = FSISCOM_COMP_ID | 0x02, RC_INVALID_LENGTH = FSISCOM_COMP_ID | 0x03, RC_INVALID_ADDRESS = FSISCOM_COMP_ID | 0x04, RC_INVALID_OPTYPE = FSISCOM_COMP_ID | 0x05, + RC_RT_INTERFACE_ERR = FSISCOM_COMP_ID | 0x06, + RC_RT_NULL_FW_MSG_PTR = FSISCOM_COMP_ID | 0x07, }; }; diff --git a/src/include/usr/scom/runtime/rt_scomif.H b/src/include/usr/scom/runtime/rt_scomif.H index 4039f2827..5c645bde0 100644 --- a/src/include/usr/scom/runtime/rt_scomif.H +++ b/src/include/usr/scom/runtime/rt_scomif.H @@ -37,7 +37,7 @@ namespace SCOM * @param[in] i_target Scom target * @param[in] i_scomAddr Scom address * @param[in|out] io_buffer Pointer to scom data - * @return errlHndl_t + * @return errlHndl_t */ errlHndl_t sendScomToHyp(DeviceFW::OperationType i_opType, TARGETING::Target * i_target, @@ -46,4 +46,44 @@ errlHndl_t sendScomToHyp(DeviceFW::OperationType i_opType, }; // end namespace SCOM +namespace FSISCOM +{ + +/** + * @brief DMI channel has checkstopped. Mark it bad and switch to FSP access. + * + * @param[in] i_target SCOM target + * @return None + */ +void switchToFspScomAccess(TARGETING::TargetHandle_t i_target); + +/** + * @brief This function sends the scom op to the FSP + * + * @param[in] i_opType Scom operation type, see driverif.H + * @param[in] i_target Scom target + * @param[in] i_scomAddr Scom address + * @param[in/out] io_buffer Read: Pointer to output data storage + * Write: Pointer to input data storage + * @return errlHndl_t + */ +errlHndl_t sendScomOpToFsp(DeviceFW::OperationType i_opType, + TARGETING::TargetHandle_t i_target, + uint64_t i_scomAddr, + void * io_buffer); + +/** + * @brief Ask FSP to read list of SCOMs + * + * @param[in] i_target Scom target + * @param[in] i_scomAddr Scom addresses to read + * @param[out] o_scomValue Scom values read (0xDEADBEEF for errors) + * @return errlHndl_t + */ +errlHndl_t sendMultiScomReadToFsp(TARGETING::TargetHandle_t i_target, + std::vector<uint64_t> & i_scomAddr, + std::vector<uint64_t> & o_scomValue); + +}; // end namespace FSISCOM + #endif // end __RT_SCOMIF_H |

