diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2018-03-23 10:49:35 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-04-02 13:44:41 -0400 |
commit | b51298075aee402dbcef485088cfa71a6ca61725 (patch) | |
tree | 21bd59df20830b108f6b3f6dd835915c28691ec7 /src/include | |
parent | 55f0053bc34e10d118e383f782b7be5cb14f59d2 (diff) | |
download | talos-hostboot-b51298075aee402dbcef485088cfa71a6ca61725.tar.gz talos-hostboot-b51298075aee402dbcef485088cfa71a6ca61725.zip |
Add ibscom runtime support
- Add ibscom runtime files
- Make ibscom multicast workaround common
- Call from ibscom rt_ibscom
- Make scom sanity check common
- Call from xscom rt_xscom ibscom rt_ibscom
RTC:190144
Change-Id: Ia52feac596ff6b6c8fb9f0db4493f35e4ee837af
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56215
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: Martin Gloff <mgloff@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/usr/ibscom/ibscomif.H | 46 | ||||
-rw-r--r-- | src/include/usr/scom/scomif.H | 20 | ||||
-rw-r--r-- | src/include/usr/scom/scomreasoncodes.H | 3 |
3 files changed, 67 insertions, 2 deletions
diff --git a/src/include/usr/ibscom/ibscomif.H b/src/include/usr/ibscom/ibscomif.H index f539caf90..41e9f0cdd 100644 --- a/src/include/usr/ibscom/ibscomif.H +++ b/src/include/usr/ibscom/ibscomif.H @@ -5,7 +5,9 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* COPYRIGHT International Business Machines Corp. 2013,2014 */ +/* Contributors Listed Below - COPYRIGHT 2013,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. */ @@ -26,6 +28,7 @@ #include <stdint.h> #include <builtins.h> #include <errl/errlentry.H> +#include <devicefw/driverif.H> namespace IBSCOM { @@ -40,6 +43,45 @@ namespace IBSCOM */ void enableInbandScoms( bool i_disable = IBSCOM_ENABLE ); -} +/** + * @brief Multicast this ibscom address + * + * @param[in] i_opType read/write + * @param[in] i_target target membuf + * @param[inout] io_buffer return data + * @param[inout] io_buflen return data length + * @param[in] i_addr inband scom address + * @param[out] o_didWorkaround return indicator + * + * @return error log on fail + */ +errlHndl_t doIBScomMulticast( DeviceFW::OperationType i_opType, + TARGETING::Target* i_target, + void* io_buffer, + size_t& io_buflen, + uint64_t i_addr, + bool& o_didWorkaround ); + +#ifndef __HOSTBOOT_RUNTIME +/** + * @brief Perform ibscom + * + * @param[in] i_opType read/write + * @param[in] i_target target membuf + * @param[inout] io_buffer return data + * @param[inout] io_buflen return data length + * @param[in] i_addr inband scom address + * @param[in] i_errDataPath generate SUE error + * + * @return error log on fail + */ +errlHndl_t doIBScom(DeviceFW::OperationType i_opType, + TARGETING::Target* i_target, + void* io_buffer, + size_t& io_buflen, + uint64_t i_addr, + bool i_errDataPath); +#endif +} // end namespace IBSCOM #endif diff --git a/src/include/usr/scom/scomif.H b/src/include/usr/scom/scomif.H index da7227735..d86bd6358 100644 --- a/src/include/usr/scom/scomif.H +++ b/src/include/usr/scom/scomif.H @@ -25,6 +25,8 @@ #ifndef __SCOMIF_H #define __SCOMIF_H +#include <devicefw/driverif.H> + namespace SCOM { @@ -43,6 +45,24 @@ errlHndl_t scomTranslate(TARGETING::Target * &i_target, bool & o_needsWakeup, uint64_t i_opMode = 0); +/** + * @brief Common routine that verifies input parameters for *scom accesses. + * + * @param[in] i_opType Operation type, see driverif.H + * @param[in] i_target Scom target + * @param[in] i_buffer Read: Pointer to output data storage + * Write: Pointer to input data storage + * @param[in] i_buflen Input: size of io_buffer (in bytes) + * @param[in] i_addr Address being accessed (Used for FFDC) + * @return errlHndl_t + */ +errlHndl_t scomOpSanityCheck(const DeviceFW::OperationType i_opType, + const TARGETING::Target* i_target, + const void* i_buffer, + const size_t i_buflen, + const uint64_t i_addr, + const size_t i_minbufsize); + #ifndef __HOSTBOOT_RUNTIME /** * @brief Enable scoms to all cores for multicast workaround diff --git a/src/include/usr/scom/scomreasoncodes.H b/src/include/usr/scom/scomreasoncodes.H index b6fb9816b..c4db021c8 100644 --- a/src/include/usr/scom/scomreasoncodes.H +++ b/src/include/usr/scom/scomreasoncodes.H @@ -41,6 +41,7 @@ namespace SCOM SCOM_HANDLE_SPECIAL_WAKEUP = 0x07, SCOM_TRANSLATE_CENTAUR = 0x08, SCOM_RT_SEND_SCOM_TO_HYP = 0x09, + SCOM_OP_SANITY_CHECK = 0x0A, }; enum scomReasonCode @@ -66,6 +67,8 @@ namespace SCOM SCOM_SPCWKUP_COUNT_ERR = SCOM_COMP_ID | 0x13, SCOM_CEN_TRANS_INVALID_TYPE = SCOM_COMP_ID | 0x14, SCOM_RUNTIME_HYP_ERR = SCOM_COMP_ID | 0x15, + SCOM_INVALID_DATA_BUFFER = SCOM_COMP_ID | 0x16, + SCOM_INVALID_OP_TYPE = SCOM_COMP_ID | 0x17, }; enum UserDetailsTypes |