summaryrefslogtreecommitdiffstats
path: root/sbe/hwpf/include/plat/plat_hw_access.H
diff options
context:
space:
mode:
authorSantosh Puranik <santosh.puranik@in.ibm.com>2016-07-31 10:16:23 -0500
committerSantosh S. Puranik <santosh.puranik@in.ibm.com>2016-08-12 11:14:25 -0400
commit422a358cbe5ed82c4c0a1a8e5158d94549a532fa (patch)
treefc827b950eb41683fac17b515066d343a2c137b2 /sbe/hwpf/include/plat/plat_hw_access.H
parente598dab7f300aad26b3b9590c4865e4f3af9800e (diff)
downloadtalos-sbe-422a358cbe5ed82c4c0a1a8e5158d94549a532fa.tar.gz
talos-sbe-422a358cbe5ed82c4c0a1a8e5158d94549a532fa.zip
Wrappers for SCOM functions
Change-Id: Ie0db2bfb88ce4c3ddef4b0f30b872c397412640a Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/28141 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-by: Santosh S. Puranik <santosh.puranik@in.ibm.com>
Diffstat (limited to 'sbe/hwpf/include/plat/plat_hw_access.H')
-rw-r--r--sbe/hwpf/include/plat/plat_hw_access.H28
1 files changed, 25 insertions, 3 deletions
diff --git a/sbe/hwpf/include/plat/plat_hw_access.H b/sbe/hwpf/include/plat/plat_hw_access.H
index 6c42e13d..b0f95fe2 100644
--- a/sbe/hwpf/include/plat/plat_hw_access.H
+++ b/sbe/hwpf/include/plat/plat_hw_access.H
@@ -33,6 +33,8 @@
#include <plat_includes.H>
#include "hw_access_def.H"
+#include <return_code.H>
+
/// PIB Error Mask
@@ -70,11 +72,11 @@ asm volatile \
/// GetScom
#define PLAT_GETSCOM(_m_rc, _m_base, _m_offset, _m_data) \
- _m_rc = getscom_abs(getEffectiveAddress(_m_base, _m_offset), _m_data)
+ _m_rc = fapi2::getscom_abs_wrap(getEffectiveAddress(_m_base, _m_offset), _m_data)
/// PutScom
#define PLAT_PUTSCOM(_m_rc, _m_base, _m_offset, _m_data) \
- _m_rc = putscom_abs(getEffectiveAddress(_m_base, _m_offset), _m_data)
+ _m_rc = fapi2::putscom_abs_wrap(getEffectiveAddress(_m_base, _m_offset), _m_data)
/// GetCFAM
#define PLAT_GETCFAM(_m_base, _m_offset, _m_data) \
@@ -91,7 +93,7 @@ asm volatile \
static_assert( K == TARGET_TYPE_NONE, \
"modifyCfamRegister is not supported by PPE platforms")
-namespace fapi2
+namespace fapi2
{
// This function loads the scan region data for the given ring address and
// updates the check word data
@@ -120,6 +122,26 @@ namespace fapi2
// @return fapi::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
fapi2::ReturnCode getRing_verifyAndcleanup(const uint32_t i_ringAddress,
const fapi2::RingMode i_ringMode);
+
+ ///
+ /// @brief Platform wrapper over PK getscom_abs
+ ///
+ /// @param [in] i_addr The SCOM address
+ /// @param [out] o_data The data read
+ ///
+ /// @return PCB-PIB return code
+ ///
+ uint32_t getscom_abs_wrap(const uint32_t i_addr, uint64_t *o_data);
+
+ ///
+ /// @brief Platform wrapper over PK putscom_abs
+ ///
+ /// @param [in] i_addr The SCOM address
+ /// @param [in] i_data The data read
+ ///
+ /// @return PCB-PIB return code
+ ///
+ uint32_t putscom_abs_wrap(const uint32_t i_addr, uint64_t i_data);
}
OpenPOWER on IntegriCloud