diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/usr/initservice/initsvcstructs.H | 48 | ||||
-rw-r--r-- | src/include/usr/ipmi/ipmisensor.H | 20 | ||||
-rw-r--r-- | src/include/usr/isteps/istep06list.H | 5 | ||||
-rw-r--r-- | src/include/usr/isteps/istep10list.H | 5 | ||||
-rw-r--r-- | src/include/usr/isteps/istep15list.H | 5 | ||||
-rw-r--r-- | src/include/usr/isteps/istep18list.H | 5 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.C | 21 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/istepdispatcher.H | 12 | ||||
-rw-r--r-- | src/usr/ipmi/ipmisensor.C | 5 |
9 files changed, 78 insertions, 48 deletions
diff --git a/src/include/usr/initservice/initsvcstructs.H b/src/include/usr/initservice/initsvcstructs.H index d9e412973..a6cc270af 100644 --- a/src/include/usr/initservice/initsvcstructs.H +++ b/src/include/usr/initservice/initsvcstructs.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2014 */ +/* Contributors Listed Below - COPYRIGHT 2011,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -38,6 +38,7 @@ #include <sys/vfs.h> // VFS_MODULE_NAME_MAX #include <initservice/initsvcreasoncodes.H> +#include <initservice/initsvcstructs.H> // This constant has a corresponding entry in src/build/tools/listdeps.pl. #define MAX_DEPENDENT_MODULES 9 @@ -119,7 +120,28 @@ enum IplOpType NORMAL_IPL_OP = 0x01, MPIPL_OP = 0x02, }; - +/** + * @enum FirmwareProgressType + * - PHASE_NA -> No FW progress update. (All other isteps) + * - BASE_INITIALIZATION -> 6.3 + * - MEMORY_INIT -> 10.1 + * - SEC_PROCESSOR_INIT -> 15.1 + * - STARTING_OS -> 18.13 + * + * See Dean's BMC Function Requirements (R3.2-3.16) + * NOTE: The spec says we should update the progress code at the beginning + * of each of the step ranges. Here we are updating at specific + * substeps since the previous substeps are functionally HB no-ops. + * If these become functional, we will need to change this. + */ +enum firmwareProgressPhase +{ + PHASE_NA = 0x0, // Not applicable + MEMORY_INIT = 0x01, //< isteps 10->14 + SEC_PROCESSOR_INIT = 0x03, //< isteps 15->16 + STARTING_OS = 0x13, //< isteps 17->21 + BASE_INITIALIZATION = 0x14, //< isteps 6-> 9 +}; /** * @struct TaskFlags * @@ -130,16 +152,18 @@ enum IplOpType */ struct TaskFlags { - TaskType task_type; // task execution flags - ModuleType module_type; // BASE_IMAGE or EXT_IMAGE - uint8_t ipl_op; // bitmap of IplOpType enum - // indicating whether task - // is an op in certain IPL modes. - bool check_attn; // flag indicating whether to check - // for attentions and invoke PRD - // for analysis after executing - // the istep substep - // true = check for attentions + TaskType task_type; // -- Task execution flags + ModuleType module_type; // -- BASE_IMAGE or EXT_IMAGE + uint8_t ipl_op; // -- Bitmap of IplOpType enum + // indicating whether task + // is an op in certain IPL modes. + bool check_attn; // -- Flag indicating whether to check + // for attentions and invoke PRD + // for analysis after executing + // the istep substep + // true = check for attentions + firmwareProgressPhase fwprogtype; // -- Flag indicating current IPMI + // Boot Progress code }; diff --git a/src/include/usr/ipmi/ipmisensor.H b/src/include/usr/ipmi/ipmisensor.H index 4b266e1b5..7575024a9 100644 --- a/src/include/usr/ipmi/ipmisensor.H +++ b/src/include/usr/ipmi/ipmisensor.H @@ -31,6 +31,7 @@ * is used to handle setting the virtual sensors maintained by the BMC. */ +#include <initservice/initsvcstructs.H> #include <attributeenums.H> #include <targeting/common/target.H> #include <errl/errlentry.H> @@ -323,22 +324,6 @@ namespace SENSOR public: /** - * @enum firmwareProgressPhase - * - * Current firmware progress phase - * - */ - enum firmwareProgressPhase - { - MEMORY_INIT = 0x01, //< isteps 10->14 - SEC_PROCESSOR_INIT = 0x03, //< isteps 15->16 - STARTING_OS = 0x13, //< isteps 17->21 - BASE_INITIALIZATION = 0x14, //< isteps 6-> 9 - PHASE_NA = 0xFF, // Not applicable - - }; - - /** * @brief Constructor for the FirmwareProgressSensor * * The firmware progress sensor is used to update the BMC @@ -368,7 +353,8 @@ namespace SENSOR * @return Errorlog handle * */ - errlHndl_t setBootProgressPhase(firmwareProgressPhase i_phase); + errlHndl_t setBootProgressPhase( + INITSERVICE::firmwareProgressPhase i_phase); private: // @enum firmwareProgressOfsets diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H index 98ec2fd70..c77eb56fc 100644 --- a/src/include/usr/isteps/istep06list.H +++ b/src/include/usr/isteps/istep06list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -98,7 +98,8 @@ const TaskInfo g_istep06[] = { { ISTEPNAME(06,03,"host_init_fsi"), HWAS::host_init_fsi, - { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, false, + BASE_INITIALIZATION } }, { ISTEPNAME(06,04,"host_set_ipl_parms"), diff --git a/src/include/usr/isteps/istep10list.H b/src/include/usr/isteps/istep10list.H index cd40eea4f..1e365499c 100644 --- a/src/include/usr/isteps/istep10list.H +++ b/src/include/usr/isteps/istep10list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -88,7 +88,8 @@ const TaskInfo g_istep10[] = { { ISTEPNAME(10,01,"host_prd_hwreconfig"), HWAS::host_prd_hwreconfig, - { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, true, + MEMORY_INIT } }, { ISTEPNAME(10,02,"cen_sbe_tp_chiplet_init1"), diff --git a/src/include/usr/isteps/istep15list.H b/src/include/usr/isteps/istep15list.H index 9c0bc2e86..b982e2a64 100644 --- a/src/include/usr/isteps/istep15list.H +++ b/src/include/usr/isteps/istep15list.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -65,7 +65,8 @@ namespace INITSERVICE { ISTEPNAME(15,01,"host_build_winkle"), BUILD_WINKLE_IMAGES::call_host_build_winkle, - { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP | MPIPL_OP, true, + SEC_PROCESSOR_INIT } }, { ISTEPNAME(15,02,"proc_set_pore_bar"), diff --git a/src/include/usr/isteps/istep18list.H b/src/include/usr/isteps/istep18list.H index 3ce23445b..cd6745102 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,2014 */ +/* Contributors Listed Below - COPYRIGHT 2012,2015 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -127,7 +127,8 @@ namespace INITSERVICE { ISTEPNAME(18,13,"proc_tod_setup"), TOD::call_tod_setup, - { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false } + { START_FN, EXT_IMAGE, NORMAL_IPL_OP, false, + STARTING_OS } }, { ISTEPNAME(18,14,"proc_tod_init"), diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 722531b35..a46c671df 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -68,6 +68,7 @@ #include <ipmi/ipmiwatchdog.H> //IPMI watchdog timer #include <ipmi/ipmipowerstate.H> //IPMI System ACPI Power State #include <config.h> +#include <ipmi/ipmisensor.H> namespace ISTEPS_TRACE { @@ -621,6 +622,24 @@ errlHndl_t IStepDispatcher::doIstep(uint32_t i_istep, istepPauseSet(i_istep, i_substep); } +#ifdef CONFIG_BMC_IPMI + + if(theStep->taskflags.fwprogtype != PHASE_NA) + { + SENSOR::FirmwareProgressSensor l_progressSensor; + errlHndl_t err_fwprog = l_progressSensor.setBootProgressPhase( + theStep->taskflags.fwprogtype); + + if(err_fwprog) + { + TRACFCOMP(g_trac_initsvc, + "init: ERROR: Update FW Progress Phase Failed"); + errlCommit(err_fwprog, INITSVC_COMP_ID); + } + } + +#endif + err = InitService::getTheInstance().executeFn(theStep, NULL); // flush contTrace immediately after each i_istep/substep returns @@ -1682,8 +1701,8 @@ errlHndl_t IStepDispatcher::sendProgressCode(bool i_needsLock) "init: ERROR: reset IPMI watchdog Failed"); err_ipmi->collectTrace("INITSVC", 1024); errlCommit(err_ipmi, INITSVC_COMP_ID ); - } + #endif msg_t * myMsg = msg_allocate(); diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.H b/src/usr/initservice/istepdispatcher/istepdispatcher.H index 918d9a46d..5d941963c 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.H +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.H @@ -401,12 +401,12 @@ private: bool iv_progressThreadStarted; // Used in multiple threads, mutex protection needed - uint8_t iv_curIStep; // Current Step - uint8_t iv_curSubStep; // Current SubStep - msg_t* iv_pIstepMsg; // External Istep request message - timespec_t iv_lastProgressMsgTime; // Last time progress message sent - bool iv_shutdown; // Shutdown request has been received - // from the FSP + uint8_t iv_curIStep; // Current Step + uint8_t iv_curSubStep; // Current SubStep + msg_t* iv_pIstepMsg; // External Istep request message + timespec_t iv_lastProgressMsgTime; // Last time progress message sent + bool iv_shutdown; // Shutdown request has been received + // from the FSP bool iv_futureShutdown; uint8_t iv_istepToCompleteBeforeShutdown; uint8_t iv_substepToCompleteBeforeShutdown; diff --git a/src/usr/ipmi/ipmisensor.C b/src/usr/ipmi/ipmisensor.C index 4ee5bdc5d..c81c3871d 100644 --- a/src/usr/ipmi/ipmisensor.C +++ b/src/usr/ipmi/ipmisensor.C @@ -48,8 +48,6 @@ namespace SENSOR TARGETING::Target * i_target) :iv_name(i_name) ,iv_target(i_target) { - assert(i_target != NULL); - // allocate a new message structure to use with our sensors // this will be the payload for the IPMI send/sendrecv sensor message. iv_msg = new setSensorReadingRequest; @@ -485,12 +483,11 @@ namespace SENSOR }; - // // setBootProgressPhase - update the boot progress sensor of the BMC // errlHndl_t FirmwareProgressSensor::setBootProgressPhase( - firmwareProgressPhase phase ) + INITSERVICE::firmwareProgressPhase phase ) { // event data 2 holds the progress info iv_msg->iv_event_data[1] = phase; |