diff options
Diffstat (limited to 'src/include/usr/hwpf/plat/fapiPlatAttributeService.H')
-rwxr-xr-x | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index f328dbf4d..6bd206383 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -137,10 +137,35 @@ ReturnCode fapiPlatGetSpdAttr(const Target * i_target, const uint16_t i_keyword, void * o_data, size_t i_len ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_MSS_MEMORY_BASE. It should not be called directly + * + * @param[in] i_pMcsTarget MCS target pointer + * @param[out] o_addr Address of MCS BAR register + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetMemoryBaseAddr(const fapi::Target * i_pMcsTarget, + uint64_t & o_addr); + +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_MSS_MIRROR_BASE. It should not be called directly + * + * @param[in] i_pMcsTarget MCS target pointer + * @param[out] o_addr Address of MCS BAR register + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetMirrorBaseAddr(const fapi::Target * i_pMcsTarget, + uint64_t & o_addr); + } } +//------------------------------------------------------------------------------ +// MACROs to route each ATTR_SPD access to the Hostboot SPD function +//------------------------------------------------------------------------------ #define ATTR_SPD_DRAM_DEVICE_TYPE_GETMACRO(ID, PTARGET, VAL) \ fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::BASIC_MEMORY_TYPE, &(VAL), sizeof(VAL) ) #define ATTR_SPD_MODULE_TYPE_GETMACRO(ID, PTARGET, VAL) \ @@ -230,4 +255,12 @@ ReturnCode fapiPlatGetSpdAttr(const Target * i_target, #define ATTR_SPD_DRAM_MANUFACTURER_JEDEC_ID_CODE_GETMACRO(ID, PTARGET, VAL) \ fapi::platAttrSvc::fapiPlatGetSpdAttr( PTARGET, SPD::DRAM_MANUFACTURER_ID, &(VAL), sizeof(VAL) ) +//------------------------------------------------------------------------------ +// MACROs to route ATTR Base Address accesses to the correct Hostboot function +//------------------------------------------------------------------------------ +#define ATTR_MSS_MEMORY_BASE_GETMACRO(ID, PTARGET, VAL) \ + fapi::platAttrSvc::fapiPlatGetMemoryBaseAddr(PTARGET, VAL) +#define ATTR_MSS_MIRROR_BASE_GETMACRO(ID, PTARGET, VAL) \ + fapi::platAttrSvc::fapiPlatGetMirrorBaseAddr(PTARGET, VAL) + #endif // FAPIPLATATTRIBUTESERVICE_H_ |