diff options
author | Andrew Geissler <andrewg@us.ibm.com> | 2016-07-12 15:11:27 -0500 |
---|---|---|
committer | Stephen Cprek <smcprek@us.ibm.com> | 2016-07-18 15:32:33 -0500 |
commit | 0adf362fa7d99c41d210dda0c6d8696320270163 (patch) | |
tree | 0339e72387c0dd5ae0fa7d4ec3432add7ad2c8f0 /src | |
parent | 4f2731371170a48d020ce11ad51e51e6eebabe3b (diff) | |
download | talos-hostboot-0adf362fa7d99c41d210dda0c6d8696320270163.tar.gz talos-hostboot-0adf362fa7d99c41d210dda0c6d8696320270163.zip |
Attribute override support in hostboot
This provides full attribute override support in Hostboot and
also adds in a required attribute for the reconfig loop testing.
Change-Id: I06a8213bc3b56d20b0817477a84014d89250ec25
RTC: 157097
CMVC-coreq: 999873
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/26923
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/fapi2/chip_ec_feature.H | 61 | ||||
-rwxr-xr-x | src/usr/fapi2/makefile | 2 | ||||
-rw-r--r-- | src/usr/fapi2/plat_attr_task.C | 86 | ||||
-rw-r--r-- | src/usr/initservice/extinitsvc/extinitsvctasks.H | 14 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 12 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/makefile | 9 | ||||
-rw-r--r-- | src/usr/targeting/attrPlatOverride.C | 10 | ||||
-rwxr-xr-x | src/usr/targeting/common/xmltohb/target_types.xml | 1 | ||||
-rw-r--r-- | src/usr/targeting/hostboot_common.mk | 8 | ||||
-rw-r--r-- | src/usr/targeting/makefile | 2 | ||||
-rw-r--r-- | src/usr/targeting/runtime/makefile | 5 |
11 files changed, 120 insertions, 90 deletions
diff --git a/src/include/usr/fapi2/chip_ec_feature.H b/src/include/usr/fapi2/chip_ec_feature.H deleted file mode 100644 index 801e0d962..000000000 --- a/src/include/usr/fapi2/chip_ec_feature.H +++ /dev/null @@ -1,61 +0,0 @@ -/* IBM_PROLOG_BEGIN_TAG */ -/* This is an automatically generated prolog. */ -/* */ -/* $Source: src/include/usr/fapi2/chip_ec_feature.H $ */ -/* */ -/* OpenPOWER HostBoot Project */ -/* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ -/* [+] International Business Machines Corp. */ -/* */ -/* */ -/* Licensed under the Apache License, Version 2.0 (the "License"); */ -/* you may not use this file except in compliance with the License. */ -/* You may obtain a copy of the License at */ -/* */ -/* http://www.apache.org/licenses/LICENSE-2.0 */ -/* */ -/* Unless required by applicable law or agreed to in writing, software */ -/* distributed under the License is distributed on an "AS IS" BASIS, */ -/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ -/* implied. See the License for the specific language governing */ -/* permissions and limitations under the License. */ -/* */ -/* IBM_PROLOG_END_TAG */ -#ifndef CHIPECFEATURE_H_ -#define CHIPECFEATURE_H_ - -#include <plat_chip_ec_feature.H> -#include <fapi2_chip_ec_feature.H> - -#include <stdint.h> -#include <target.H> -#include <return_code.H> - -namespace fapi2 -{ - -/// -/// @brief Platform implementation of querying chip ec feature -/// -/// This should only be called by FAPI during the processing of a FAPI_ATTR_GET -/// for a Chip EC Feature attribute -/// -/// @param[in] i_id Attribute ID of the Chip EC Feature -/// @param[in] i_pTarget Pointer to chip target -/// @param[out] o_hasFeature Set to 1 if chip has feature else 0 -/// @return ReturnCode. Zero on success, else platform specified error -/// -template< TargetType K > -ReturnCode queryChipEcFeature(AttributeId i_id, - const Target<K>& i_pTarget, - uint8_t & o_hasFeature) -{ - ReturnCode l_rc; - //@todo-RTC:128106 - return l_rc; -} - -} // end namespace - -#endif // CHIPECFEATURE_H_ diff --git a/src/usr/fapi2/makefile b/src/usr/fapi2/makefile index d6d9fd509..6c59f0de0 100755 --- a/src/usr/fapi2/makefile +++ b/src/usr/fapi2/makefile @@ -36,6 +36,8 @@ SUBDIRS += runtime.d include fapi2.mk +OBJS += plat_attr_task.o + include ${ROOTPATH}/config.mk vpath %.C ${GENDIR} diff --git a/src/usr/fapi2/plat_attr_task.C b/src/usr/fapi2/plat_attr_task.C new file mode 100644 index 000000000..d67a33392 --- /dev/null +++ b/src/usr/fapi2/plat_attr_task.C @@ -0,0 +1,86 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/usr/fapi2/plat_attr_task.C $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016 */ +/* [+] International Business Machines Corp. */ +/* */ +/* */ +/* Licensed under the Apache License, Version 2.0 (the "License"); */ +/* you may not use this file except in compliance with the License. */ +/* You may obtain a copy of the License at */ +/* */ +/* http://www.apache.org/licenses/LICENSE-2.0 */ +/* */ +/* Unless required by applicable law or agreed to in writing, software */ +/* distributed under the License is distributed on an "AS IS" BASIS, */ +/* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or */ +/* implied. See the License for the specific language governing */ +/* permissions and limitations under the License. */ +/* */ +/* IBM_PROLOG_END_TAG */ +/// +/// @file plat_attr_task.C +/// +/// @brief Starts task which will handle attribute overrides +/// + +//****************************************************************************** +// Includes +//****************************************************************************** +#include <initservice/taskargs.H> +#include <fapi2/plat_attr_override_sync.H> +#include <fapi2/plat_trace.H> + +namespace fapi2 +{ + +//****************************************************************************** +// Global Variables +//****************************************************************************** +// Defined in fapiPlatAttrOverrideSync.C +extern TARGETING::AttributeTank::AttributeHeader g_attrOverrideHeader; +extern uint8_t g_attrOverride[AttrOverrideSync::MAX_DIRECT_OVERRIDE_ATTR_SIZE_BYTES]; +extern uint8_t g_attrOverrideFapiTank; + +//****************************************************************************** +// This function monitors for FSP mailbox messages +//****************************************************************************** +void * platMonitorForFspMessages(void * i_pContext) +{ + FAPI_IMP("Starting platMonitorForFspMessages"); + fapi2::theAttrOverrideSync().monitorForFspMessages(); + return NULL; // Execution should never reach here +} + +//****************************************************************************** +// This function is run when the extended initservice loads the plat module +// +// It writes the global variables associated with direct attribute override to +// ensure they are paged and pinned in memory. These variables are used by a +// debug tool to override attributes +// +// It starts a task that monitors for FSP mailbox messages on the +// HB_HWPF_ATTR_MSGQ message queue +//****************************************************************************** +void platTaskEntry(errlHndl_t &io_errl) +{ + FAPI_IMP("Starting platTaskEntry"); + + // Write the global variables associated with direct attribute override + g_attrOverrideHeader.iv_attrId = 0; + g_attrOverride[0] = 0; + g_attrOverrideFapiTank = 0; + + // Start task that monitors for FSP mailbox messages + task_create(fapi2::platMonitorForFspMessages, NULL); +} + +} // End fapi2 namespace + +// Macro that creates the _start function +TASK_ENTRY_MACRO(fapi2::platTaskEntry); + diff --git a/src/usr/initservice/extinitsvc/extinitsvctasks.H b/src/usr/initservice/extinitsvc/extinitsvctasks.H index 57de54edb..02050f6b6 100644 --- a/src/usr/initservice/extinitsvc/extinitsvctasks.H +++ b/src/usr/initservice/extinitsvc/extinitsvctasks.H @@ -251,15 +251,15 @@ const TaskInfo g_exttaskinfolist[] = { } }, /** - * @brief fapi2 task, + * @brief fapi2 task, handles attribute override and fapi2 plat intf. */ { - "libfapi2.so" , // taskname - NULL, // no pointer to fn - { - INIT_TASK, // task type - EXT_IMAGE, // Extended Module - } + "libfapi2.so" , // taskname + NULL, // no pointer to fn + { + START_TASK, // task type + EXT_IMAGE, // Extended Module + } }, diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 7439da360..e74699d38 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -48,8 +48,7 @@ #include <initservice/taskargs.H> // TASK_ENTRY_MACRO #include <targeting/common/targetservice.H> #include <targeting/attrsync.H> -//@TODO RTC:128106 port to fapi2 plat attribute service -//#include <hwpf/plat/fapiPlatAttributeService.H> +#include <fapi2/plat_attr_override_sync.H> #include <mbox/mbox_queues.H> // HB_ISTEP_MSGQ #include <mbox/mboxif.H> // register mailbox #include <intr/interrupt.H> @@ -330,8 +329,7 @@ void IStepDispatcher::init(errlHndl_t &io_rtaskRetErrl) if (l_attrOverridesExist) { - //@TODO RTC:128106 port to fapi2 plat attribute service - //fapi::theAttrOverrideSync().getAttrOverridesFromFsp(); + fapi2::theAttrOverrideSync().getAttrOverridesFromFsp(); } // Start a new thread to handle non-IStep messages from the FSP @@ -353,8 +351,7 @@ void IStepDispatcher::init(errlHndl_t &io_rtaskRetErrl) // Attributes to sync to the FSP if(iv_spBaseServicesEnabled) { - //@TODO RTC:128106 port to fapi2 plat attribute service - //fapi::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); + fapi2::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); } } } while(0); @@ -1627,8 +1624,7 @@ void IStepDispatcher::handleIStepRequestMsg(msg_t * & io_pMsg) // Send the potentially modified set of Attribute overrides and any // Attributes to sync (to Cronus) to the FSP - //@TODO RTC:128106 port to fapi2 plat attribute service - //fapi::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); + fapi2::theAttrOverrideSync().sendAttrOverridesAndSyncsToFsp(); // Transfer ownership of the message pointer back from iv_pIstepMsg mutex_lock(&iv_mutex); diff --git a/src/usr/initservice/istepdispatcher/makefile b/src/usr/initservice/istepdispatcher/makefile index 9f47a6b8d..a478d6c51 100644 --- a/src/usr/initservice/istepdispatcher/makefile +++ b/src/usr/initservice/istepdispatcher/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2011,2015 +# Contributors Listed Below - COPYRIGHT 2011,2016 # [+] International Business Machines Corp. # # @@ -27,9 +27,10 @@ MODULE = istepdisp EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/establish_system_smp EXTRAINCDIR += ${ROOTPATH}/src/include/usr/ecmddatabuffer -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/plat -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/hwp + +# Next includes required for attribute override support +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ VPATH = ${ROOTPATH}/src/usr/initservice/bootconfig/ diff --git a/src/usr/targeting/attrPlatOverride.C b/src/usr/targeting/attrPlatOverride.C index 2b11fbd5e..b9af17f92 100644 --- a/src/usr/targeting/attrPlatOverride.C +++ b/src/usr/targeting/attrPlatOverride.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2014,2015 */ +/* Contributors Listed Below - COPYRIGHT 2014,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -23,8 +23,7 @@ /* */ /* IBM_PROLOG_END_TAG */ #include <targeting/attrPlatOverride.H> -//@TODO RTC:128106 -//#include <hwpf/plat/fapiPlatAttrOverrideSync.H> +#include <fapi2/plat_attr_override_sync.H> #include <targeting/common/trace.H> #include <targeting/common/targreasoncodes.H> #include <errl/errlmanager.H> @@ -50,9 +49,8 @@ errlHndl_t getAttrOverrides(PNOR::SectionInfo_t &i_sectionInfo, if (io_tanks == NULL) { // All indexes are -1 due to the first enum being TANK_LAYER_NONE, - //@TODO RTC:128106 - //l_overTanks[AttributeTank::TANK_LAYER_FAPI-1] = - // &fapi::theAttrOverrideSync().iv_overrideTank; + l_overTanks[AttributeTank::TANK_LAYER_FAPI-1] = + &fapi2::theAttrOverrideSync().iv_overrideTank; l_overTanks[AttributeTank::TANK_LAYER_TARG-1] = &Target::theTargOverrideAttrTank(); l_overTanks[AttributeTank::TANK_LAYER_PERM-1] = &l_PermTank; diff --git a/src/usr/targeting/common/xmltohb/target_types.xml b/src/usr/targeting/common/xmltohb/target_types.xml index 5d57bdf06..d667e71b4 100755 --- a/src/usr/targeting/common/xmltohb/target_types.xml +++ b/src/usr/targeting/common/xmltohb/target_types.xml @@ -587,6 +587,7 @@ <attribute><id>TEST_NEGATIVE_FCN</id></attribute> <!-- End max/min config attributes --> <attribute><id>RECONFIGURE_LOOP</id></attribute> + <attribute><id>RECONFIG_LOOP_TESTS</id></attribute> <attribute><id>MULTI_SCOM_BUFFER_MAX_SIZE</id></attribute> <attribute><id>ISTEP_PAUSE_ENABLE</id></attribute> <attribute><id>ISTEP_PAUSE_CONFIG</id></attribute> diff --git a/src/usr/targeting/hostboot_common.mk b/src/usr/targeting/hostboot_common.mk index 36f1342c5..7be1449d7 100644 --- a/src/usr/targeting/hostboot_common.mk +++ b/src/usr/targeting/hostboot_common.mk @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2015 +# Contributors Listed Below - COPYRIGHT 2013,2016 # [+] International Business Machines Corp. # # @@ -23,6 +23,8 @@ # # IBM_PROLOG_END_TAG +ROOTPATH=../../.. + COMMON_TARGETING_REL_PATH = ${TARGETING_REL_PATH}/common COMMON_TARGETING_MAKEFILE = ${COMMON_TARGETING_REL_PATH}/common.mk @@ -32,4 +34,8 @@ VPATH += ${TARGETING_REL_PATH}/adapters VPATH += ${COMMON_TARGETING_REL_PATH} VPATH += ${addprefix ${COMMON_TARGETING_REL_PATH}/, ${COMMON_TARGETING_SUBDIRS}} +# Next includes required for attribute override support +EXTRAINCDIR += ${ROOTPATH}/src/import/hwpf/fapi2/include/ +EXTRAINCDIR += ${ROOTPATH}/src/include/usr/fapi2/ + HOSTBOOT_RT_IPL_COMMON_OBJS += attrPlatOverride.o diff --git a/src/usr/targeting/makefile b/src/usr/targeting/makefile index fc721fe62..61dfb0a4d 100644 --- a/src/usr/targeting/makefile +++ b/src/usr/targeting/makefile @@ -34,12 +34,12 @@ ROOTPATH = ../../.. MODULE = targeting TARGETING_REL_PATH = . + include ${TARGETING_REL_PATH}/hostboot_common.mk ATTR_RP_OBJS += attrrp.o ATTR_RP_OBJS += attrsync.o ATTR_RP_OBJS += targplatutil.o -EXTRAINCDIR += ${ROOTPATH}/src/include/usr/hwpf/fapi ENTRY_POINT_OBJS += targetservicestart.o diff --git a/src/usr/targeting/runtime/makefile b/src/usr/targeting/runtime/makefile index 4dd9806d0..bcb741a66 100644 --- a/src/usr/targeting/runtime/makefile +++ b/src/usr/targeting/runtime/makefile @@ -5,7 +5,7 @@ # # OpenPOWER HostBoot Project # -# Contributors Listed Below - COPYRIGHT 2013,2015 +# Contributors Listed Below - COPYRIGHT 2013,2016 # [+] International Business Machines Corp. # # @@ -23,7 +23,6 @@ # # IBM_PROLOG_END_TAG HOSTBOOT_RUNTIME = 1 -ROOTPATH = ../../../.. MODULE = targeting_rt #@TODO RTC:132750 @@ -31,6 +30,8 @@ MODULE = targeting_rt TARGETING_REL_PATH = .. include ${TARGETING_REL_PATH}/hostboot_common.mk +ROOTPATH = ../../../.. + vpath %.C ${TARGETING_REL_PATH} HOSTBOOT_RUNTIME_SPECIFIC_OBJS += attrrp_rt.o |