diff options
author | vanlee <vanlee@us.ibm.com> | 2013-03-01 14:35:14 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2013-03-04 10:42:49 -0600 |
commit | 6e96f79fbadb624ef2aac82c6f2e4743291c5dd7 (patch) | |
tree | 3563e4484e1a8f30913f59389eb5420feb6e6f2d /src/usr/hwpf/plat/fapiPlatAttributeService.C | |
parent | 2520f5930ca9108b111b6ac0e71c9bd8330bfe53 (diff) | |
download | talos-hostboot-6e96f79fbadb624ef2aac82c6f2e4743291c5dd7.tar.gz talos-hostboot-6e96f79fbadb624ef2aac82c6f2e4743291c5dd7.zip |
PROC_xx_ENABLE and DMI_REFCLOCK_SWIZZLE FAPI attributes support update
- PROC_xx_ENABLE are mapped to platform function
- Patch to initial DMI_REFLCLOCK_SWIZZLE for Tuleta
Change-Id: Ifc29c454adb8f63a5d676b102dc62bf8aaef6268
DependsOn: I6ea44b24b27a833534e378fa552e1930a73759f5
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/3384
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Tested-by: Jenkins Server
Diffstat (limited to 'src/usr/hwpf/plat/fapiPlatAttributeService.C')
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatAttributeService.C | 48 |
1 files changed, 46 insertions, 2 deletions
diff --git a/src/usr/hwpf/plat/fapiPlatAttributeService.C b/src/usr/hwpf/plat/fapiPlatAttributeService.C index ec260b919..af4a17ef0 100644 --- a/src/usr/hwpf/plat/fapiPlatAttributeService.C +++ b/src/usr/hwpf/plat/fapiPlatAttributeService.C @@ -33,13 +33,12 @@ #include <hwpf/fapi/fapiTarget.H> #include <targeting/common/targetservice.H> +#include <targeting/common/utilFilter.H> #include <errl/errlentry.H> #include <hwpf/plat/fapiPlatAttributeService.H> #include <hwpf/hwpf_reasoncodes.H> #include <vpd/spdenums.H> #include <devicefw/driverif.H> -#include <hwas/common/hwas.H> -#include <hwas/common/hwasCommon.H> // The following file checks at compile time that all HWPF attributes are // handled by Hostboot. This is done to ensure that the HTML file listing @@ -1423,6 +1422,51 @@ fapi::ReturnCode fapiPlatGetProcPcieBarSize ( return l_fapirc; } +fapi::ReturnCode fapiPlatGetEnableAttr ( fapi::AttributeId i_id, + const fapi::Target * i_pTarget, uint8_t & o_enable ) +{ + fapi::ReturnCode l_rc; + TARGETING::Target * l_pTarget = NULL; + + // Get the Hostboot Target + l_rc = getHostbootTarget(i_pTarget, l_pTarget); + + if (l_rc.ok()) + { + TARGETING::TargetHandleList l_buses; + switch (i_id) + { + case fapi::ATTR_PROC_NX_ENABLE: + case fapi::ATTR_PROC_L3_ENABLE: + // The enable flag is based on the target's functional state + TARGETING::HwasState hwasState; + hwasState = l_pTarget->getAttr<TARGETING::ATTR_HWAS_STATE>(); + o_enable = hwasState.functional; + break; + case fapi::ATTR_PROC_PCIE_ENABLE: + // The enable flag is 1 if one of the pci target is functional + getChildChiplets( l_buses, l_pTarget, TARGETING::TYPE_PCI ); + o_enable = l_buses.size() ? 1 : 0; + break; + case fapi::ATTR_PROC_A_ENABLE: + // The enable flag is 1 if one of the abus target is functional + getChildChiplets( l_buses, l_pTarget, TARGETING::TYPE_ABUS ); + o_enable = l_buses.size() ? 1 : 0; + break; + case fapi::ATTR_PROC_X_ENABLE: + // The enable flag is 1 if one of the xbus target is functioanl + getChildChiplets( l_buses, l_pTarget, TARGETING::TYPE_XBUS ); + o_enable = l_buses.size() ? 1 : 0; + break; + default: + o_enable = 0; + break; + } + } + + return l_rc; +} + } // End platAttrSvc namespace } // End fapi namespace |