diff options
author | Roland Veloz <rveloz@us.ibm.com> | 2017-10-10 10:55:09 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2017-12-20 17:47:47 -0500 |
commit | a69cb64611f39c3320e71a025cc612690305926d (patch) | |
tree | debcc9b99e0c0f0fc5fafa47c9f0efbb20c38765 /src/include/usr | |
parent | f0db3bed83349756e9182077b02c1c73e473a569 (diff) | |
download | talos-hostboot-a69cb64611f39c3320e71a025cc612690305926d.tar.gz talos-hostboot-a69cb64611f39c3320e71a025cc612690305926d.zip |
Adding support for TOD RAS on FSP systems
Moved the TOD files from directory /hostboot/src/usr/isteps/istep18
into a new TOD directory - /hostboot/src/usr/isteps/tod. Created a tod
library from the files within the new TOD directory. Added a runtime
directory underneath the tod directory. Created the rt_todintf.C file
which contains the two newly added interfaces -
readTodProcDataFromFile and resetBackupTopology.
Change-Id: I68c9edcd8f59adf9a2cf1f1f3fff07fea2d94e99
RTC:171490
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/48188
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/include/usr')
-rw-r--r-- | src/include/usr/isteps/istep18list.H | 3 | ||||
-rw-r--r-- | src/include/usr/isteps/tod/TodTypes.H | 118 | ||||
-rw-r--r-- | src/include/usr/isteps/tod/runtime/rt_todintf.H | 77 | ||||
-rw-r--r-- | src/include/usr/isteps/tod_init_reasoncodes.H | 5 | ||||
-rw-r--r-- | src/include/usr/mbox/mbox_queues.H | 10 |
5 files changed, 208 insertions, 5 deletions
diff --git a/src/include/usr/isteps/istep18list.H b/src/include/usr/isteps/istep18list.H index 5d31c9048..81cd3b171 100644 --- a/src/include/usr/isteps/istep18list.H +++ b/src/include/usr/isteps/istep18list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2016 */ +/* Contributors Listed Below - COPYRIGHT 2012,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -142,6 +142,7 @@ namespace INITSERVICE const DepModInfo g_istep18Dependancies = { { #ifndef CONFIG_VPO_COMPILE + DEP_LIB(libtod.so), DEP_LIB(libistep18.so), #endif NULL diff --git a/src/include/usr/isteps/tod/TodTypes.H b/src/include/usr/isteps/tod/TodTypes.H new file mode 100644 index 000000000..66e3e3c33 --- /dev/null +++ b/src/include/usr/isteps/tod/TodTypes.H @@ -0,0 +1,118 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/isteps/tod/TodTypes.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ +/* [+] 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 TODTYPES_H +#define TODTYPES_H + +/** + * @file TodTypes.H + * + * @brief The file primarily conatins definition of data strucrtures that are + * required to share the tod topology register data between HB and HDAT. + * It also define the format of data that will be saved in file + * for persistency of TOD configuration data. + * + * HWP_IGNORE_VERSION_CHECK + * + */ + +namespace TOD +{ + +//------------------------------------------------------------------------------ +//Forward declarations +//------------------------------------------------------------------------------ +struct TodChipData; + +//------------------------------------------------------------------------------ +//Typedefs +//------------------------------------------------------------------------------ +typedef std::vector<TodChipData> TodChipDataContainer; + + /** + * Enums for the TodChipHeader->flags, These values are defined as per + * details provided by HDAT data structure details provided by HDAT + */ + enum + { + TOD_NONE = 0x00000000, + TOD_SEC_MDMT = 0x00000001, + TOD_PRI_MDMT = 0x00000002, + TOD_FUNC = 0x00000004, + TOD_NONFUNC = 0x00000008, + }; + + + /** + * Sub structure of TodChipData, Represents the Chip ID details required + * by HDAT + * + */ + struct TodChipHeader + { + uint32_t chipID; //Chip ID + uint32_t flags; //Flags + TodChipHeader(void) : chipID(0),flags(TOD_NONFUNC) {} + }__attribute__ ((packed)); + + /** + * Sub structure of TodChipData, That will contain the first 32 bits of + * all the TOD register values, that were populated during creation of the + * TOD topology. + * Out of the below register ipcr and ccr are required by HDAT. Others are + * there for persistancy + * + */ + struct TodRegs + { + uint32_t mpcr; //Master Path Control Register + uint32_t pcrp0; //Primary Configuration Register Port 0 + uint32_t pcrp1; //Primary Configuration Register Port 1 + uint32_t scrp0; //Secondary Configuration Register Port 0 + uint32_t scrp1; //Secondary Configuration Register Port 1 + uint32_t spcr; //Slave Path Control Register + uint32_t ipcr; //Internal Path Control Register + uint32_t psmscr; //Primary/Secondary Master/Slave Control Register + uint32_t ccr; //Chip Control Register + TodRegs(void) + : + mpcr(0),pcrp0(0),pcrp1(0),scrp0(0),scrp1(0), + spcr(0),ipcr(0),psmscr(0),ccr(0) + {} + }__attribute__ ((packed)); + + /** + * TOD Data for each chip that HDAT will communicate + * to PHYP. + */ + struct TodChipData + { + TodChipHeader header; + TodRegs regs; + TodChipData(void) : header(), regs() {} + }; + +} //end of namespace + +#endif diff --git a/src/include/usr/isteps/tod/runtime/rt_todintf.H b/src/include/usr/isteps/tod/runtime/rt_todintf.H new file mode 100644 index 000000000..b79e24c1c --- /dev/null +++ b/src/include/usr/isteps/tod/runtime/rt_todintf.H @@ -0,0 +1,77 @@ +/* IBM_PROLOG_BEGIN_TAG */ +/* This is an automatically generated prolog. */ +/* */ +/* $Source: src/include/usr/isteps/tod/runtime/rt_todintf.H $ */ +/* */ +/* OpenPOWER HostBoot Project */ +/* */ +/* Contributors Listed Below - COPYRIGHT 2014,2017 */ +/* [+] 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 __RUNTIME__TOD_INTERFACE_H +#define __RUNTIME__TOD_INTERFACE_H + +#include <errl/errlentry.H> // errlHndl_t +#include <targeting/common/target.H> // TARGETING::TargetHandleList +#include <isteps/tod/TodTypes.H> // TodChipDataContainer + +/** + * @file rt_todintf.H + * + * @brief TOD FSP interfaces + * + * + */ + +namespace TOD +{ + +/** + * @brief This interface creates a new backup TOD topology. This request + * is sent to the FSP for resetting the backup topology. + * + * @param[in] i_oscPos the ordinal ID of the failing OSC. Value of + * 0xFFFFFFFF means no OSC to avoid. + * @param[in] i_procOscTgt target of the processor with which the failing OSC + * is associated with. If ordinal ID is 0xFFFFFFFF then this should + * be NULL, otherwise provide a valid target. If ordinal ID is + * 0xFFFFFFFF, i_procOscTgt is ignored regardless of it's validity. + * @param[in] i_badChipList input list of targets. + * @param[in] i_informPhyp flag to inform the PHYP that it won't have a + * backup available for fail over while we are re-configuring it. + * + * @return Error log handle indicating the status of the request + */ +errlHndl_t resetBackupTopology( + uint32_t i_oscPos, + const TARGETING::TargetHandle_t& i_procOscTgt, + const TARGETING::TargetHandleList& i_badChipList, + bool i_informPhyp); + +/** + * @brief This interface returns the TOD topology data for analysis + * + * @param[out] o_todChipData container that holds the processor data + * + * @return Error log handle indicating the status of the request + */ +errlHndl_t readTodProcDataFromFile(TodChipDataContainer& o_todChipData); + +} // end namespace TOD + +#endif // end __RUNTIME__TOD_INTERFACE_H + diff --git a/src/include/usr/isteps/tod_init_reasoncodes.H b/src/include/usr/isteps/tod_init_reasoncodes.H index 9dc996a51..9580e890b 100644 --- a/src/include/usr/isteps/tod_init_reasoncodes.H +++ b/src/include/usr/isteps/tod_init_reasoncodes.H @@ -63,6 +63,8 @@ namespace TOD TOD_UTIL_MOD_GET_PARENT = 0x1C, TOD_MOD_LOG_UNSUPPORTED_BUSTYPE = 0x1D, TOD_IS_MPIPL = 0x1E, + TOD_RT_TOPOLOGY_RESET_BACKUP = 0x1F, + TOD_RT_TOPOLOGY_DATA = 0x20, }; enum TODReasonCode @@ -91,6 +93,9 @@ namespace TOD TOD_PARENT_NOT_FOUND = TOD_COMP_ID | 0x17, TOD_DRAWER_SET_MDMT = TOD_COMP_ID | 0x18, TOD_TOP_LEVEL_TARGET_NOT_FOUND = TOD_COMP_ID | 0x19, + TOD_RT_NULL_FIRMWARE_REQUEST_PTR = TOD_COMP_ID | 0x1A, + TOD_RT_TOPOLOGY_RESET_BACKUP_ERR = TOD_COMP_ID | 0x1B, + TOD_RT_TOPOLOGY_DATA_ERR = TOD_COMP_ID | 0x1C, }; enum TODUserDetailDataSubSection diff --git a/src/include/usr/mbox/mbox_queues.H b/src/include/usr/mbox/mbox_queues.H index 91600e964..1f211eaf8 100644 --- a/src/include/usr/mbox/mbox_queues.H +++ b/src/include/usr/mbox/mbox_queues.H @@ -73,6 +73,7 @@ namespace MBOX FSP_HWPF_ATTR_MSGQ = 0x8000000B, // HWPF Attribute override/sync FSP_VPD_MSGQ = 0x8000000C, FSP_PRD_SYNC_MSGQ_ID = 0x8000000D, + FSP_TOD_MSGQ = 0x8000000E, FSP_SBE_SYNC_MSGQ_ID = 0x8000000F, FSP_LID_MSGQ = FSP_ATTR_SYNC_MSGQ, @@ -80,8 +81,9 @@ namespace MBOX FSP_ECHO_MSGQ = 0xFFFFFFFF, // Fake FSP for test }; - // Message types are only unique with in each message queue. Each message queue can - // use the entire range limited only by the restrictions listed below. + // Message types are only unique with in each message queue. Each message + // queue can use the entire range limited only by the restrictions listed + // below. // // Each HB and FSP service will need it's own list of message types // Not sure where they belong. @@ -89,8 +91,8 @@ namespace MBOX // types 0x00000000 - 0x3FFFFFFF are considered secure messages // and are disabled when under SecureBoot environment // types 0x40000000 - 0x7FFFFFFF can be done at anytime - // types 0x80000000 - 0xFFFFFFFF are reserved on hostboot for kernel services - // This means hostboot services can't use them, but this is not a restriction + // types 0x80000000 - 0xFFFFFFFF are reserved on HB for kernel services + // This means HB services can't use them, but this is not a restriction // on FSP services enum { |