From f0ba9883033e21a52e0c8ecf554816832abdebc8 Mon Sep 17 00:00:00 2001 From: Dean Sanner Date: Thu, 16 Jun 2016 07:34:41 -0500 Subject: Host infrastructure for FAPI ATTR dump Change-Id: I4714564ccdf365916c2fd7ed52d00d3509af2d3d RTC:127348 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/25929 Tested-by: Jenkins Server Tested-by: FSP CI Jenkins Reviewed-by: Christian R. Geddes Reviewed-by: Richard J. Knight Reviewed-by: Daniel M. Crowell --- src/include/usr/fapi2/plat_attr_override_sync.H | 18 +++++ src/include/usr/fapi2/target.H | 96 +++++++++++++++++++++++++ 2 files changed, 114 insertions(+) (limited to 'src/include/usr/fapi2') diff --git a/src/include/usr/fapi2/plat_attr_override_sync.H b/src/include/usr/fapi2/plat_attr_override_sync.H index 9aa344139..acb2d26df 100644 --- a/src/include/usr/fapi2/plat_attr_override_sync.H +++ b/src/include/usr/fapi2/plat_attr_override_sync.H @@ -210,6 +210,24 @@ public: const uint32_t i_size, const void * i_pVal); + /** + * @brief This will force a sync of all FAPI attr to the FSP or the + * debug interface using the built in attribute sync tank + * + * This is called for ALL FAPI Attributes even if they are + * directly backed into HB targeting + * + * - The attribute is saved to be synced to debug interface (Cronus) + * + */ + void triggerAttrSync(); + + /** + * @brief This function actually sends the FAPI Sync tank attributes + * across the debug interface + */ + void sendFapiAttrSyncs(); + /** * @brief This function performs the actions required on an attribute set * diff --git a/src/include/usr/fapi2/target.H b/src/include/usr/fapi2/target.H index 790dd23a9..6c1bce702 100644 --- a/src/include/usr/fapi2/target.H +++ b/src/include/usr/fapi2/target.H @@ -244,6 +244,102 @@ inline TARGETING::TYPE convertFapi2TypeToTargeting(fapi2::TargetType i_T) return o_targetingType; } +/// +/// @brief This function takes in a TARGETING Type and returns the corresponding +/// FAPI::Target type +/// +/// @param[in] i_fapi2Type +/// +/// @returns TARGETTING::Type equivelent to fapi2 type +inline fapi2::TargetType convertTargetingTypeToFapi2(TARGETING::TYPE i_T) +{ + fapi2::TargetType o_targetingType = fapi2::TARGET_TYPE_NONE; + + switch (i_T) + { + case TARGETING::TYPE_NA: + o_targetingType = fapi2::TARGET_TYPE_NONE; + break; + case TARGETING::TYPE_SYS: + o_targetingType = fapi2::TARGET_TYPE_SYSTEM; + break; + case TARGETING::TYPE_DIMM: + o_targetingType = fapi2::TARGET_TYPE_DIMM; + break; + case TARGETING::TYPE_PROC: + o_targetingType = fapi2::TARGET_TYPE_PROC_CHIP; + break; + case TARGETING::TYPE_MEMBUF: + o_targetingType = fapi2::TARGET_TYPE_MEMBUF_CHIP; + break; + case TARGETING::TYPE_EX: + o_targetingType = fapi2::TARGET_TYPE_EX; + break; + case TARGETING::TYPE_MBA: + o_targetingType = fapi2::TARGET_TYPE_MBA; + break; + case TARGETING::TYPE_MCS: + o_targetingType = fapi2::TARGET_TYPE_MCS; + break; + case TARGETING::TYPE_XBUS: + o_targetingType = fapi2::TARGET_TYPE_XBUS; + break; + case TARGETING::TYPE_ABUS: + o_targetingType = fapi2::TARGET_TYPE_ABUS; + break; + case TARGETING::TYPE_L4: + o_targetingType = fapi2::TARGET_TYPE_L4; + break; + case TARGETING::TYPE_CORE: + o_targetingType = fapi2::TARGET_TYPE_CORE; + break; + case TARGETING::TYPE_EQ: + o_targetingType = fapi2::TARGET_TYPE_EQ; + break; + case TARGETING::TYPE_MCA: + o_targetingType = fapi2::TARGET_TYPE_MCA; + break; + case TARGETING::TYPE_MCBIST: + o_targetingType = fapi2::TARGET_TYPE_MCBIST; + break; + case TARGETING::TYPE_MI: + o_targetingType = fapi2::TARGET_TYPE_MI; + break; + case TARGETING::TYPE_CAPP: + o_targetingType = fapi2::TARGET_TYPE_CAPP; + break; + case TARGETING::TYPE_DMI: + o_targetingType = fapi2::TARGET_TYPE_DMI; + break; + case TARGETING::TYPE_OBUS: + o_targetingType = fapi2::TARGET_TYPE_OBUS; + break; + case TARGETING::TYPE_NV: + o_targetingType = fapi2::TARGET_TYPE_NV; + break; + case TARGETING::TYPE_SBE: + o_targetingType = fapi2::TARGET_TYPE_SBE; + break; + case TARGETING::TYPE_PPE: + o_targetingType = fapi2::TARGET_TYPE_PPE; + break; + case TARGETING::TYPE_PERV: + o_targetingType = fapi2::TARGET_TYPE_PERV; + break; + case TARGETING::TYPE_PEC: + o_targetingType = fapi2::TARGET_TYPE_PEC; + break; + case TARGETING::TYPE_PHB: + o_targetingType = fapi2::TARGET_TYPE_PHB; + break; + default: + o_targetingType = fapi2::TARGET_TYPE_NONE; + break; + } + + return o_targetingType; +} + /// /// @brief Get this target's immediate parent -- cgit v1.2.3