diff options
-rwxr-xr-x | src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H | 9 | ||||
-rw-r--r-- | src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C | 31 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 30 |
3 files changed, 65 insertions, 5 deletions
diff --git a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H index 13b1ed96e..4298db541 100755 --- a/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H +++ b/src/include/usr/hwpf/plat/fapiPlatAttrOverrideSync.H @@ -90,6 +90,7 @@ public: MSG_SET_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x10, // FSP<->Hb MSG_CLEAR_ALL_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x11, // FSP<->Hb MSG_SET_SYNC_ATTS = MBOX::FIRST_UNSECURE_MSG + 0x12, // FSP<--Hb + MSG_GET_OVERRIDES = MBOX::FIRST_UNSECURE_MSG + 0x13, // FSP<--Hb }; /** @@ -120,6 +121,14 @@ public: void sendAttrOverridesAndSyncsToFsp(); /** + * @brief Gets Attribute Overrides and Syncs from the FSP + * + * This is called at the start of a normal (non-istep) IPL if an attribute + * is set indicating that the FSP has attribute overrides in place + */ + void getAttrOverridesFromFsp(); + + /** * @brief This function gets any Attribute Override on an attribute get * * This is called for those FAPI Attributes that do not map to Targeting diff --git a/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C b/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C index 4b3989029..98a59e2e7 100644 --- a/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C +++ b/src/usr/hwpf/plat/fapiPlatAttrOverrideSync.C @@ -347,10 +347,7 @@ void AttrOverrideSync::sendAttrOverridesAndSyncsToFsp() } } } - } - if (!l_pErr) - { // Send Hostboot Attributes to Sync to the FSP for (uint32_t i = TARGETING::AttributeTank::TANK_LAYER_FAPI; i <= TARGETING::AttributeTank::TANK_LAYER_TARG; i++) @@ -406,6 +403,34 @@ void AttrOverrideSync::sendAttrOverridesAndSyncsToFsp() } //****************************************************************************** +void AttrOverrideSync::getAttrOverridesFromFsp() +{ + FAPI_IMP("Requesting Attribute Overrides from the FSP"); + + errlHndl_t l_pErr = NULL; + + msg_t * l_pMsg = msg_allocate(); + l_pMsg->type = MSG_GET_OVERRIDES; + l_pMsg->data[0] = 0; + l_pMsg->data[1] = 0; + l_pMsg->extra_data = NULL; + + // Send the message and wait for a response, the response message is not + // read, it just ensures that the code waits until the FSP is done sending + // attribute overrides + l_pErr = MBOX::sendrecv(MBOX::FSP_HWPF_ATTR_MSGQ, l_pMsg); + + if (l_pErr) + { + FAPI_ERR("getAttrOverridesFromFsp: Error sending to FSP"); + errlCommit(l_pErr, HWPF_COMP_ID); + } + + msg_free(l_pMsg); + l_pMsg = NULL; +} + +//****************************************************************************** bool AttrOverrideSync::getAttrOverride(const fapi::AttributeId i_attrId, const fapi::Target * const i_pTarget, void * o_pVal) const diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index d09bb46b0..6cdaa7ac4 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -213,6 +213,28 @@ void IStepDispatcher::init ( errlHndl_t &io_rtaskRetErrl ) TRACFCOMP( g_trac_initsvc, "IStep run all" ); + // Read the attribute indicating if the FSP has attribute overrides + // and get the overrides if it does + uint8_t l_attrOverridesExist = 0; + TARGETING::Target* l_pTopLevelTarget = NULL; + TARGETING::targetService().getTopLevelTarget(l_pTopLevelTarget); + + if (l_pTopLevelTarget == NULL) + { + TRACFCOMP(g_trac_initsvc, + "init: ERROR: Top level target not found"); + } + else + { + l_attrOverridesExist = l_pTopLevelTarget-> + getAttr<TARGETING::ATTR_PLCK_IPL_ATTR_OVERRIDES_EXIST>(); + } + + if (l_attrOverridesExist) + { + fapi::theAttrOverrideSync().getAttrOverridesFromFsp(); + } + // Execute all Isteps sequentially in 'normal' mode err = executeAllISteps(); @@ -233,6 +255,10 @@ void IStepDispatcher::init ( errlHndl_t &io_rtaskRetErrl ) break; } + + // Send the potentially modified set of Attribute overrides and any + // Attributes to sync to the FSP + fapi::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); } } while( 0 ); @@ -812,8 +838,8 @@ void IStepDispatcher::handleMoreWorkNeededMsg ( bool i_first ) iv_Msg->data[1], iv_Msg->extra_data ); - // Send the potentially modified set of HWPF Attribute overrides and any - // HWPF Attributes to sync to the FSP + // Send the potentially modified set of Attribute overrides and any + // Attributes to sync to the FSP fapi::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); msg_respond( iv_msgQ, |