diff options
Diffstat (limited to 'src/include')
| -rw-r--r-- | src/include/usr/hwpf/hwp/procMemConsts.H | 83 | ||||
| -rwxr-xr-x | src/include/usr/hwpf/plat/fapiPlatAttributeService.H | 418 | ||||
| -rw-r--r-- | src/include/usr/hwpf/plat/fapiPlatReasonCodes.H | 25 | ||||
| -rw-r--r-- | src/include/util/impl/stlmap.H | 13 |
4 files changed, 510 insertions, 29 deletions
diff --git a/src/include/usr/hwpf/hwp/procMemConsts.H b/src/include/usr/hwpf/hwp/procMemConsts.H new file mode 100644 index 000000000..122048049 --- /dev/null +++ b/src/include/usr/hwpf/hwp/procMemConsts.H @@ -0,0 +1,83 @@ +/* IBM_PROLOG_BEGIN_TAG + * This is an automatically generated prolog. + * + * $Source: src/include/usr/hwpf/hwp/procMemConsts.H $ + * + * IBM CONFIDENTIAL + * + * COPYRIGHT International Business Machines Corp. 2012 + * + * p1 + * + * Object Code Only (OCO) source materials + * Licensed Internal Code Source Materials + * IBM HostBoot Licensed Internal Code + * + * The source code for this program is not published or other- + * wise divested of its trade secrets, irrespective of what has + * been deposited with the U.S. Copyright Office. + * + * Origin: 30 + * + * IBM_PROLOG_END_TAG + */ +/** + * @file procMemConsts.H + * + * @brief Constants to implement support for proc_setup_bars and mss_setup_bars + * Taken from Shawn Lambeth's MMIOMap8.1.0 spreadsheet + */ + +#ifndef _HWP_PROCMEMCONSTS_H_ +#define _HWP_PROCMEMCONSTS_H_ + +// Service Processor PSI Space - line 85 Overall Map +// size is 1_MB +const uint64_t SP_PSI_START = 0x0003FFFE80000000ULL ; +const uint64_t SP_PSI_SIZE = 0x0000000000100000ULL ; + + +// Processor Interrupt Space - line 7 Overall Map +// size is 1_MB +const uint64_t PROC_INTP_START = 0x0003FFFF80000000ULL; +const uint64_t PROC_INTP_SIZE = 0x0000000000100000ULL; + + +// Lower FSP Bar Regions - line 226 Overall Map, line 72 service processor +// size is 4_GB +const uint64_t SP_BAR_START = 0x0003FFE000000000ULL ; +const uint64_t SP_BAR_SIZE = 0x0000000100000000ULL ; + +// FSP Bar Size, line 227 Overall Map +const uint64_t FSP_BAR_SIZE = 0x0000000100000000ULL ; + +// Fsp MMIO Mask Size +// @todo P7 had this at 4_GB, don't see it in the spreadsheet. +const uint64_t FSP_MMIO_MASK_SIZE = 0x0000000100000000 ; + +// Processor RNG Space, for NX_MMIO - line 46 Overall Map +// size is 4_KB +const uint64_t PROC_RNG_START = 0x0003FFFF40000000ULL; +const uint64_t PROC_RNG_SIZE = 0x0000000000001000ULL; + +// PCIE Mem Address Space - line 236 Overall Map +// corresponds to the "unit number" in ATTR description +// size is 64_GB +const uint64_t PCI_MEM_START = 0x0003D00000000000ULL; +const uint64_t PCI_MEM_SIZE = 0x0000001000000000ULL; + +// PCIE BAR size values +// Bar0 = 64_GB ( from spreadsheet) +// Bar1 = always 0 and disabled ( Joe McGill ) +// Bar2 = 4_KB see NOTE above +const uint64_t PCIE_BAR0_SIZE = 0x0000001000000000ULL; +const uint64_t PCIE_BAR1_SIZE = 0x0000001000000000ULL; +const uint64_t PCIE_BAR2_SIZE = 0x0000000000001000ULL; + +// PHB Register Address Space - line 90 Overall Map +// size is 1_MB +const uint64_t PHB_REGS_START = 0x0003FFFE40000000ULL; +const uint64_t PHB_REGS_SIZE = 0x0000000000100000ULL; + + +#endif diff --git a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H index a60abcb38..821644820 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttributeService.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttributeService.H @@ -56,6 +56,7 @@ #include <spd/spdenums.H> #include <dimmConsts.H> #include <util/singleton.H> +#include <procMemConsts.H> //****************************************************************************** // Interface @@ -63,7 +64,7 @@ namespace fapi { - + namespace platAttrSvc { @@ -79,10 +80,10 @@ namespace platAttrSvc * * @retval !NULL An actual target handle * @retval NULL Not possible - */ + */ TARGETING::Target* getSystemTarget(); -/** +/** * @brief Returns a fapiReturn code containing information on an attribute * access error * @@ -113,7 +114,7 @@ fapi::ReturnCode createAttrAccessError( * @return ReturnCode. Zero on success, else platform specified error */ fapi::ReturnCode fapiPlatGetSpdAttr(const fapi::Target * i_target, - const uint16_t i_keyword, + const uint16_t i_keyword, void * o_data, size_t i_len ); @@ -134,6 +135,28 @@ fapi::ReturnCode fapiPlatSetSpdAttr(const fapi::Target * i_target, /** * @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); + +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting * ATTR_CEN_DQ_TO_DIMM_CONN_DQ. It should not be called directly * * @param[in] i_pDimmTarget DIMM target pointer @@ -258,7 +281,7 @@ bool overridesExistWrap(); /** * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE * macro to get any override for a 1D array attribute - * + * * @param[in] i_attrId Attribute ID * @param[in] i_pTarget Pointer to Target (NULL if system) * @param[out] o_1dArray Reference to 1D array where override will be copied to @@ -270,7 +293,7 @@ bool getOverrideT(const fapi::AttributeId i_attrId, T(&o_1dArray)[SZ1]) { uint64_t l_overrideVal = 0; - + for (uint8_t d1 = 0; d1 < SZ1; d1++) { if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal, d1))) @@ -284,14 +307,14 @@ bool getOverrideT(const fapi::AttributeId i_attrId, o_1dArray[d1] = l_overrideVal; } } - + return true; } /** * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE * macro to get any override for a 2D array attribute - * + * * @param[in] i_attrId Attribute ID * @param[in] i_pTarget Pointer to Target (NULL if system) * @param[out] o_2dArray Reference to 2D array where override will be copied to @@ -303,7 +326,7 @@ bool getOverrideT(const fapi::AttributeId i_attrId, T(&o_2dArray)[SZ1][SZ2]) { uint64_t l_overrideVal = 0; - + for (uint8_t d1 = 0; d1 < SZ1; d1++) { for (uint8_t d2 = 0; d2 < SZ2; d2++) @@ -320,14 +343,14 @@ bool getOverrideT(const fapi::AttributeId i_attrId, } } } - + return true; } /** * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE * macro to get any override for a 3D array attribute - * + * * @param[in] i_attrId Attribute ID * @param[in] i_pTarget Pointer to Target (NULL if system) * @param[out] o_3dArray Reference to 3D array where override will be copied to @@ -339,7 +362,7 @@ bool getOverrideT(const fapi::AttributeId i_attrId, T(&o_3dArray)[SZ1][SZ2][SZ3]) { uint64_t l_overrideVal = 0; - + for (uint8_t d1 = 0; d1 < SZ1; d1++) { for (uint8_t d2 = 0; d2 < SZ2; d2++) @@ -360,14 +383,14 @@ bool getOverrideT(const fapi::AttributeId i_attrId, } } } - + return true; } /** * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE * macro to get any override for a 4D array attribute - * + * * @param[in] i_attrId Attribute ID * @param[in] i_pTarget Pointer to Target (NULL if system) * @param[out] o_4dArray Reference to 4D array where override will be copied to @@ -379,7 +402,7 @@ bool getOverrideT(const fapi::AttributeId i_attrId, T(&o_4dArray)[SZ1][SZ2][SZ3][SZ4]) { uint64_t l_overrideVal = 0; - + for (uint8_t d1 = 0; d1 < SZ1; d1++) { for (uint8_t d2 = 0; d2 < SZ2; d2++) @@ -404,14 +427,14 @@ bool getOverrideT(const fapi::AttributeId i_attrId, } } } - + return true; } /** * @brief This function template is called by the FAPI_PLAT_GET_ATTR_OVERRIDE * macro to get any override for a non-array attribute - * + * * @param[in] i_attrId Attribute ID * @param[in] i_pTarget Pointer to Target (NULL if system) * @param[out] o_val Reference to variable where override will be copied to @@ -423,7 +446,7 @@ bool getOverrideT(const fapi::AttributeId i_attrId, T & o_val) { uint64_t l_overrideVal = 0; - + if (!(getOverrideWrap(i_attrId, i_pTarget, l_overrideVal))) { return false; @@ -433,6 +456,299 @@ bool getOverrideT(const fapi::AttributeId i_attrId, return true; } +//------------------------------------------------------------------------------ +// Prototypes to support proc_setup_bars_memory_attributes +// See proc_setup_bars_memory_attributes.xml for detailed descriptions +//------------------------------------------------------------------------------ +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_MEM_BASE . + * It should not be called directly + * + * @param[in] i_pTarget Target pointer + * @param[out] o_memBase Base CPU address for non-mirrored memory regions + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcMemBase( + const fapi::Target * i_pTarget, + uint64_t &o_memBase ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_MIRROR_BASE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_mirrorMemBase Base address for mirrored memory regions + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcMirrorBase ( + const fapi::Target * i_pTarget, + uint64_t &o_mirrorMemBase ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FOREIGN_NEAR_BASE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_foreignNearBase Foreign (near) address region base address + * @note: the array size of 2 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcForeignNearBase ( + const fapi::Target * i_pTarget, + uint64_t (&o_foreignNearBase)[ 2 ] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FOREIGN_NEAR_SIZE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_foreignNearSize Size of foreign (near) region + * @note: the array size of 2 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcForeignNearSize ( + const fapi::Target * i_pTarget, + uint64_t (&o_foreignNearSize)[ 2 ] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FOREIGN_FAR_BASE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_foreignFarBase Foreign (far) address region base address + * @note: the array size of 2 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcForeignFarBase ( + const fapi::Target * i_pTarget, + uint64_t (&o_foreignFarBase)[ 2 ] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FOREIGN_FAR_SIZE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_foreignFarSize Size of foreign (far) region + * @note: the array size of 2 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcForeignFarSize ( + const fapi::Target * i_pTarget, + uint64_t (&o_foreignFarSize)[ 2 ] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_HA_BASE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_haBase HA logging base address + * @note: the array size of 8 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcHaBase ( + const fapi::Target * i_pTarget, + uint64_t (&o_haBase)[ 8 ] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_HA_SIZE . + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_haSize Size of HA memory region + * @note: the array size of 8 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcHaSize ( + const fapi::Target * i_pTarget, + uint64_t (&o_haBase)[ 8 ] ); +//------------------------------------------------------------------------------ +// Prototypes to support proc_setup_bars_mmio_attributes +// see proc_setup_bars_mmio_attributes for detailed descriptions +//------------------------------------------------------------------------------ +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_PSI_BRIDGE_BAR_ENABLE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_psiBridgeBarEnable PSI Bridge BAR enable + * @return ReturnCode. Zero on success, else platform specified error + */ + +fapi::ReturnCode fapiPlatGetProcPsiBridgeBarEnable ( + const fapi::Target * i_pTarget, + uint8_t &o_psiBridgeBarEnable ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_PSI_BRIDGE_BAR_BASE_ADDR + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_psiBridgeBarBase PSI Bridge BAR base address value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcPsiBridgeBarBaseAddr ( + const fapi::Target * i_pTarget, + uint64_t &o_psiBridgeBarBase ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FSP_BAR_ENABLE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_fspBarEnable FSP BAR enable + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcFspBarEnable ( + const fapi::Target * i_pTarget, + uint8_t &o_fspBarEnable ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FSP_BAR_BASE_ADDR + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_fspBarBase FSP BAR base address value + * @return ReturnCode. Zero on success, else platform specified error + */ + +fapi::ReturnCode fapiPlatGetProcFspBarBaseAddr ( + const fapi::Target * i_pTarget, + uint64_t &o_fspBarBase ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FSP_BAR_SIZE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_fspBarSize FSP BAR size value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcFspBarSize ( + const fapi::Target * i_pTarget, + uint64_t &o_fspBarSize ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_FSP_MMIO_MASK_SIZE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_fspMmioMaskSize FSP MMIO mask size value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcFspMmioMaskSize ( + const fapi::Target * i_pTarget, + uint64_t &o_fspMmioMaskSize ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_INTP_BAR_ENABLE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_intpBarEnable INTP BAR enable + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcIntpBarEnable ( + const fapi::Target * i_pTarget, + uint8_t &o_intpBarEnable ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_INTP_BAR_BASE_ADDR + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_intpBarBaseAddr INTP BAR base address value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcIntpBarBaseAddr ( + const fapi::Target * i_pTarget, + uint64_t &o_intpBarBaseAddr ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_NX_MMIO_BAR_ENABLE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_nxMmioBarEnable NX MMIO BAR enable + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcNxMmioBarEnable( + const fapi::Target * i_pTarget, + uint8_t &o_nxMmioBarEnable ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_NX_MMIO_BAR_BASE_ADDR + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_nxMmioBarBase NX MMIO BAR base address value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcNxMmioBarBaseAddr ( + const fapi::Target * i_pTarget, + uint64_t &o_nxMmioBarBase ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_NX_MMIO_BAR_SIZE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_nxMmioBarSize NX MMIO BAR size value + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcNxMmioBarSize ( + const fapi::Target * i_pTarget, + uint64_t &o_nxMmioBarSize ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_PCIE_BAR_ENABLE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_pcieBarEnable PCIE BAR enable + * @note: the array size of 3,3 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcPcieBarEnable ( + const fapi::Target * i_pTarget, + uint8_t (&o_pcieBarEnable) [3][3] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_PCIE_BAR_BASE_ADDR_ + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_pcieBarBase PCIE BAR base address value + * @note: the array size of 3,3 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcPcieBarBaseAddr ( + const fapi::Target * i_pTarget, + uint64_t (&o_pcieBarBase) [3][3] ); +/** + * @brief This function is called by the FAPI_ATTR_GET macro when getting + * ATTR_PROC_PCIE_BAR_SIZE + * It should not be called directly. + * + * @param[in] i_pTarget Target pointer + * @param[out] o_pcieBarSize PCIE BAR size value + * @note: the array size of 3,3 was pulled from + * the xml file and is not expected to change. + * @return ReturnCode. Zero on success, else platform specified error + */ +fapi::ReturnCode fapiPlatGetProcPcieBarSize ( + const fapi::Target * i_pTarget, + uint64_t (&o_pcieBarSize) [3][3] ); + } // namespace platAttrSvc } // namespace fapi @@ -603,4 +919,70 @@ bool getOverrideT(const fapi::AttributeId i_attrId, #define ATTR_POS_GETMACRO(ID, PTARGET, VAL) \ fapi::platAttrSvc::fapiPlatGetTargetPos(PTARGET, VAL) +//------------------------------------------------------------------------------ +// MACROS to support proc_setup_bars_memory_attributes.xml +//------------------------------------------------------------------------------ +#define ATTR_PROC_MEM_BASE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcMemBase( PTARGET, VAL ) +#define ATTR_PROC_MIRROR_BASE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcMirrorBase (PTARGET, VAL ) +#define ATTR_PROC_FOREIGN_NEAR_BASE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcForeignNearBase (PTARGET, VAL ) +#define ATTR_PROC_FOREIGN_NEAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcForeignNearSize (PTARGET, VAL ) +#define ATTR_PROC_FOREIGN_FAR_BASE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcForeignFarBase (PTARGET, VAL ) +#define ATTR_PROC_FOREIGN_FAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcForeignFarSize (PTARGET, VAL ) +#define ATTR_PROC_HA_BASE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcHaBase (PTARGET, VAL ) +#define ATTR_PROC_HA_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcHaSize (PTARGET, VAL ) + +//------------------------------------------------------------------------------ +// MACROS to support proc_setup_bars_mmio_attributes.xml +//------------------------------------------------------------------------------ +#define ATTR_PROC_PSI_BRIDGE_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPsiBridgeBarEnable (PTARGET, VAL ) +#define ATTR_PROC_PSI_BRIDGE_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPsiBridgeBarBaseAddr (PTARGET, VAL ) +#define ATTR_PROC_FSP_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcFspBarEnable (PTARGET, VAL ) +#define ATTR_PROC_FSP_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcFspBarBaseAddr (PTARGET, VAL ) +#define ATTR_PROC_FSP_BAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcFspBarSize (PTARGET, VAL ) +#define ATTR_PROC_FSP_MMIO_MASK_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcFspMmioMaskSize (PTARGET, VAL ) +#define ATTR_PROC_INTP_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcIntpBarEnable (PTARGET, VAL ) +#define ATTR_PROC_INTP_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcIntpBarBaseAddr (PTARGET, VAL ) +#define ATTR_PROC_NX_MMIO_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcNxMmioBarEnable(PTARGET, VAL ) +#define ATTR_PROC_NX_MMIO_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcNxMmioBarBaseAddr (PTARGET, VAL ) +#define ATTR_PROC_NX_MMIO_BAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcNxMmioBarSize (PTARGET, VAL ) +#define ATTR_PROC_PCIE_BAR_ENABLE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPcieBarEnable (PTARGET, VAL ) +#define ATTR_PROC_PCIE_BAR_BASE_ADDR_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPcieBarBaseAddr (PTARGET, VAL ) +#define ATTR_PROC_PCIE_BAR_SIZE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPcieBarSize (PTARGET, VAL ) + +//------------------------------------------------------------------------------ +// MACROS to support proc_fab_smp_fabric_attributes.xml +//------------------------------------------------------------------------------ + +#if 0 +// @todo not sure if these need to be active yet. Leave commented out +#define ATTR_FREQ_CORE_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetFreqCore (PTARGET, VAL ) +#define ATTR_FREQ_CORE_SETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatSetFreqCore (PTARGET, VAL ) +#define ATTR_PROC_PCIE_NOT_F_LINK_GETMACRO( ID, PTARGET, VAL ) \ + fapi::platAttrSvc::fapiPlatGetProcPcieNotFLink (PTARGET, VAL ) +#endif + #endif // FAPIPLATATTRIBUTESERVICE_H_ diff --git a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H index d1c6b0b7a..3bc7749d4 100644 --- a/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H +++ b/src/include/usr/hwpf/plat/fapiPlatReasonCodes.H @@ -54,6 +54,28 @@ namespace fapi MOD_THREAD_ACTIVATE = 0x0E, //@fixme RTC:42816 MOD_ATTR_GET_FUNCTIONAL = 0x0F, MOD_ATTR_GET_HB_TARGET = 0x10, + MOD_ATTR_PROC_MEMBASE_GET = 0x11, + MOD_ATTR_PROC_MIRRORBASE_GET = 0x12, + MOD_ATTR_PROC_FOREIGN_NEAR_BASE_GET = 0x13, + MOD_ATTR_PROC_FOREIGN_NEAR_SIZE_GET = 0x14, + MOD_ATTR_PROC_FOREIGN_FAR_BASE_GET = 0x15, + MOD_ATTR_PROC_FOREIGN_FAR_SIZE_GET = 0x16, + MOD_ATTR_PROC_HA_BASE_GET = 0x17, + MOD_ATTR_PROC_HA_SIZE_GET = 0x18, + MOD_ATTR_PROC_PSI_BRIDGE_BAR_ENABLE_GET = 0x19, + MOD_ATTR_PROC_PSI_BRIDGE_BAR_BASE_ADDR_GET = 0x1A, + MOD_ATTR_PROC_FSP_BAR_ENABLE_GET = 0x1B, + MOD_ATTR_PROC_FSP_BAR_BASE_ADDR_GET = 0x1C, + MOD_ATTR_PROC_FSP_BAR_SIZE_GET = 0x1D, + MOD_ATTR_PROC_FSP_MMIO_MASK_SIZE_GET = 0x1E, + MOD_ATTR_PROC_INTP_BAR_ENABLE_GET = 0x1F, + MOD_ATTR_PROC_INTP_BAR_BASE_ADDR_GET = 0x20, + MOD_ATTR_PROC_NX_MMIO_BAR_ENABLE_GET = 0x21, + MOD_ATTR_PROC_NX_MMIO_BAR_BASE_ADDR_GET = 0x22, + MOD_ATTR_PROC_NX_MMIO_BAR_SIZE_GET = 0x23, + MOD_ATTR_PROC_PCIE_BAR_ENABLE_GET = 0x24, + MOD_ATTR_PROC_PCIE_BAR_BASE_ADDR_GET = 0x25, + MOD_ATTR_PROC_PCIE_BAR_SIZE_GET = 0x26, }; /** @@ -80,12 +102,13 @@ namespace fapi RC_MIXED_PBUS_CONNECTION = HWPF_COMP_ID | 0x19, RC_SAME_CHIP_PBUS_CONNECTION = HWPF_COMP_ID | 0x1A, RC_CONFLICT_PBUS_CONNECTION = HWPF_COMP_ID | 0x1B, - RC_NO_MASTER_CORE_TARGET = HWPF_COMP_ID | 0x1C, + RC_NO_MASTER_CORE_TARGET = HWPF_COMP_ID | 0x1C, RC_THREAD_IN_WRONG_STATE = HWPF_COMP_ID | 0x1D, //@fixme RTC:42816 RC_THREAD_DID_NOT_START = HWPF_COMP_ID | 0x1E, //@fixme RTC:42816 RC_NULL_FAPI_TARGET = HWPF_COMP_ID | 0x1F, RC_UNEXPECTED_TARGET_TYPE = HWPF_COMP_ID | 0x20, RC_ATTR_UNKNOWN_TARGET_NAME = HWPF_COMP_ID | 0x21, + RC_ATTR_UNSUPPORTED_PROC_NUM = HWPF_COMP_ID | 0x22, }; /** diff --git a/src/include/util/impl/stlmap.H b/src/include/util/impl/stlmap.H index 1ab234ef2..97379e861 100644 --- a/src/include/util/impl/stlmap.H +++ b/src/include/util/impl/stlmap.H @@ -334,16 +334,9 @@ namespace Util { _Tree::node* n = NULL; - if (iv_tree.insert_by_value(makeSplayTreeValue(x), n)) - { - return make_pair(iterator(_TreeItr(&iv_tree, n)), - false); - } - else - { - return make_pair(iterator(_TreeItr(&iv_tree, n)), - true); - } + bool rc = iv_tree.insert_by_value(makeSplayTreeValue(x), n); + + return make_pair(iterator(_TreeItr(&iv_tree, n)), rc); } |

