diff options
author | Richard J. Knight <rjknight@us.ibm.com> | 2012-10-26 12:34:46 -0500 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-11-15 09:57:35 -0600 |
commit | 7e9680f99f9dccf871b364f034f1eb19e9a1ae30 (patch) | |
tree | 259da5ff97d113ce61190923e1f231480d216195 /src/usr/hwpf/hwp | |
parent | b8d95068b788c0f1b1587996ef2852df7d338f37 (diff) | |
download | talos-hostboot-7e9680f99f9dccf871b364f034f1eb19e9a1ae30.tar.gz talos-hostboot-7e9680f99f9dccf871b364f034f1eb19e9a1ae30.zip |
Updates to IPL flow to match doc v1.18
Change-Id: I9fe83e777fde516b6ddbadd2eea4969b87e601fa
RTC: 50424
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/2167
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Tested-by: Jenkins Server
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/usr/hwpf/hwp')
17 files changed, 524 insertions, 267 deletions
diff --git a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C index a796d69e9..5180bf7e3 100644 --- a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C @@ -70,12 +70,9 @@ using namespace TARGETING; using namespace EDI_EI_INITIALIZATION; using namespace fapi; - - -// -// Wrapper function to call 09.1 : -// proc_build_smp -// +//****************************************************************************** +// wrapper funciton to call step 9.01 - proc_build_smp +//****************************************************************************** void* call_proc_build_smp( void *io_pArgs ) { @@ -224,5 +221,22 @@ void* call_proc_build_smp( void *io_pArgs ) return l_StepError.getErrorHandle(); } +//****************************************************************************** +// wrapper function to call step 9.02 - host_slave_sbe_update +//****************************************************************************** +void * call_host_slave_sbe_update( void * io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_update entry" ); + + // call p8_customize_image.C + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_update exit" ); + + return l_errl; +} }; // end namespace diff --git a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H index 19215788d..bb7a19fcc 100644 --- a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H @@ -75,8 +75,20 @@ namespace ACTIVATE_POWERBUS * return any error logs to istep * */ -void* call_proc_build_smp( void *io_pArgs ); +void* call_proc_build_smp( void *io_pArgs ); +/** + * @brief host_slave_sbe_update + * + * 09.2 : : Placeholder for secureboot where Hostboot must update + * SEEPROM because FSP cannot. + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + * + */ +void* call_host_slave_sbe_update( void * io_pArgs ); }; // end namespace diff --git a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C index a3b4e45c7..7fc304142 100644 --- a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C +++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C @@ -82,6 +82,7 @@ using namespace TARGETING; using namespace fapi; using namespace DeviceFW; + // @@@@@ CUSTOM BLOCK: @@@@@ /** @@ -603,19 +604,18 @@ void* call_proc_set_pore_bar( void *io_pArgs ) return l_stepError.getErrorHandle(); } - // // Wrapper function to call 15.3 : -// proc_poreslw_init +// p8_poreslw_init // -void* call_proc_poreslw_init( void *io_pArgs ) +void* call_p8_poreslw_init( void *io_pArgs ) { errlHndl_t l_errl = NULL; ISTEP_ERROR::IStepError l_stepError; TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_poreslw_init entry" ); + "call_p8_poreslw_init entry" ); // @@@@@ CUSTOM BLOCK: @@@@@ @@ -681,7 +681,7 @@ void* call_proc_poreslw_init( void *io_pArgs ) TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_proc_poreslw_init exit" ); + "call_p8_poreslw_init exit" ); // end task, returning any errorlogs to IStepDisp return l_stepError.getErrorHandle(); diff --git a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H index 077021be1..a032774c4 100644 --- a/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H +++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H @@ -76,7 +76,6 @@ namespace BUILD_WINKLE_IMAGES { - /** * @brief host_build_winkle * @@ -106,7 +105,7 @@ void* call_proc_set_pore_bar( void *io_pArgs ); /** - * @brief proc_poreslw_init + * @brief p8_poreslw_init * * 15.3 : : Initialize the PORE-SLW engine * @@ -115,8 +114,7 @@ void* call_proc_set_pore_bar( void *io_pArgs ); * return any error logs to istep * */ -void* call_proc_poreslw_init( void *io_pArgs ); - +void* call_p8_poreslw_init( void *io_pArgs ); }; // end namespace diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C index 9c2d0667a..edffb9420 100644 --- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C @@ -87,8 +87,6 @@ using namespace TARGETING; using namespace EDI_EI_INITIALIZATION; using namespace fapi; - - // // Wrapper function to call 14.1 : // host_startPRD_dram @@ -183,6 +181,30 @@ void* call_mss_extent_setup( void *io_pArgs ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : mss_extent_setup completed ok" ); + + // call mss_memdiag + l_errl = call_mss_memdiag(io_pArgs); + + if( l_errl ) + { + /*@ + * @errortype + * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED + * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid ISTEP_MSS_MEMDIAG + * @userdata1 bytes 0-1: plid identifying first error + * bytes 2-3: reason code of first error + * @userdata2 bytes 0-1: total number of elogs included + * bytes 2-3: N/A + * @devdesc call to mss_memdiag has failed, see error log + * identified by the plid in user data + */ + l_stepError.addErrorDetails(ISTEP_DRAM_INITIALIZATION_FAILED, + ISTEP_MSS_MEMDIAG, + l_errl ); + + errlCommit( l_errl, HWPF_COMP_ID ); + } } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, @@ -193,17 +215,14 @@ void* call_mss_extent_setup( void *io_pArgs ) } // -// Wrapper function to call 14.3 : -// mss_memdiag +// Wrapper function to call mss_memdiag // -void* call_mss_memdiag( void *io_pArgs ) +errlHndl_t call_mss_memdiag( void *io_pArgs ) { using namespace MDIA; errlHndl_t l_errl = NULL; - IStepError l_stepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_memdiag entry" ); @@ -236,38 +255,17 @@ void* call_mss_memdiag( void *io_pArgs ) } while (0); - if( l_errl ) - { - /*@ - * @errortype - * @reasoncode ISTEP_DRAM_INITIALIZATION_FAILED - * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE - * @moduleid ISTEP_MSS_MEMDIAG - * @userdata1 bytes 0-1: plid identifying first error - * bytes 2-3: reason code of first error - * @userdata2 bytes 0-1: total number of elogs included - * bytes 2-3: N/A - * @devdesc call to mss_memdiag has failed, see error log - * identified by the plid in user data - */ - l_stepError.addErrorDetails(ISTEP_DRAM_INITIALIZATION_FAILED, - ISTEP_MSS_MEMDIAG, - l_errl ); - - errlCommit( l_errl, HWPF_COMP_ID ); - } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_memdiag exit" ); // end task, returning any errorlogs to IStepDisp - return l_stepError.getErrorHandle(); + return l_errl; } - // -// Wrapper function to call 14.4 : +// Wrapper function to call 14.3 : // mss_scrub // void* call_mss_scrub( void *io_pArgs ) @@ -320,7 +318,7 @@ void* call_mss_scrub( void *io_pArgs ) // -// Wrapper function to call 14.5 : +// Wrapper function to call 14.4 : // mss_thermal_init // void* call_mss_thermal_init( void *io_pArgs ) @@ -373,7 +371,7 @@ void* call_mss_thermal_init( void *io_pArgs ) // -// Wrapper function to call 14.6 : +// Wrapper function to call 14.5 : // proc_setup_bars // void* call_proc_setup_bars( void *io_pArgs ) @@ -600,7 +598,7 @@ void* call_proc_setup_bars( void *io_pArgs ) // -// Wrapper function to call 14.7 : +// Wrapper function to call 14.6 : // proc_pcie_config // void* call_proc_pcie_config( void *io_pArgs ) @@ -653,7 +651,7 @@ void* call_proc_pcie_config( void *io_pArgs ) // -// Wrapper function to call 14.8 : +// Wrapper function to call 14.7 : // proc_exit_cache_contained // void* call_proc_exit_cache_contained( void *io_pArgs ) @@ -747,4 +745,22 @@ void* call_proc_exit_cache_contained( void *io_pArgs ) } +// +// Wrapper function to call 14.8 : +// call_host_mpipl_service +// +void* call_host_mpipl_service( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_mpipl_service entry" ); + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_mpipl_service exit" ); + + return l_errl; + +} + }; // end namespace diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.H b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.H index c9c6c98a6..04f3206b8 100644 --- a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.H +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.H @@ -24,6 +24,8 @@ #ifndef __DRAM_INITIALIZATION_DRAM_INITIALIZATION_H #define __DRAM_INITIALIZATION_DRAM_INITIALIZATION_H +#include <errl/errlentry.H> + /** * @file dram_initialization.H * @@ -101,7 +103,6 @@ namespace DRAM_INITIALIZATION { - /** * @brief host_startPRD_dram * @@ -115,7 +116,6 @@ namespace DRAM_INITIALIZATION void* call_host_startPRD_dram( void *io_pArgs ); - /** * @brief mss_extent_setup * @@ -128,26 +128,22 @@ void* call_host_startPRD_dram( void *io_pArgs ); */ void* call_mss_extent_setup( void *io_pArgs ); - - /** * @brief mss_memdiag * - * 14.3 : Mainstore Pattern Testing + * Mainstore Pattern Testing * * param[in,out] - pointer to any arguments, usually NULL * * return pointer to any errlogs * */ -void* call_mss_memdiag( void *io_pArgs ); - - +errlHndl_t call_mss_memdiag( void *io_pArgs ); /** * @brief mss_scrub * - * 14.4 : : Start background scrub + * 14.3 : : Start background scrub * * param[in,out] - pointer to any arguments, usually NULL * @@ -161,7 +157,7 @@ void* call_mss_scrub( void *io_pArgs ); /** * @brief mss_thermal_init * - * 14.5 : : Initialize the thermal sensor + * 14.4 : : Initialize the thermal sensor * * param[in,out] - pointer to any arguments, usually NULL * @@ -175,7 +171,7 @@ void* call_mss_thermal_init( void *io_pArgs ); /** * @brief proc_setup_bars * - * 14.6 : : Setup Memory BARs + * 14.5 : : Setup Memory BARs * * param[in,out] - pointer to any arguments, usually NULL * @@ -189,7 +185,7 @@ void* call_proc_setup_bars( void *io_pArgs ); /** * @brief proc_pcie_config * - * 14.7 : : Configure the PHBs + * 14.6 : : Configure the PHBs * * param[in,out] - pointer to any arguments, usually NULL * @@ -203,7 +199,7 @@ void* call_proc_pcie_config( void *io_pArgs ); /** * @brief proc_exit_cache_contained * - * 14.8 : : Allow execution from memory + * 14.7 : : Allow execution from memory * * param[in,out] - pointer to any arguments, usually NULL * @@ -213,6 +209,18 @@ void* call_proc_pcie_config( void *io_pArgs ); void* call_proc_exit_cache_contained( void *io_pArgs ); +/** + * @brief host_mpipl_service + * + * 14.8 : : Perform MPIPL tasks + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return pointer to any errlogs + * + */ +void* call_host_mpipl_service( void *io_pArgs); + }; // end namespace #endif diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.C b/src/usr/hwpf/hwp/dram_training/dram_training.C index 6a31ad17f..b160a04c2 100644 --- a/src/usr/hwpf/hwp/dram_training/dram_training.C +++ b/src/usr/hwpf/hwp/dram_training/dram_training.C @@ -152,10 +152,24 @@ void* call_host_disable_vddr( void *io_pArgs ) return l_err; } +// +// Wrapper function to call 13.2 : mem_pll_initf +// +void* call_mem_pll_initf( void *io_pArgs ) +{ + errlHndl_t l_err = NULL; + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_initf entry" ); + + // call cen_mem_pll_initf.C + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mem_pll_initf exit" ); + + return l_err; +} // -// Wrapper function to call 13.2 : mem_pll_setup +// Wrapper function to call 13.3 : mem_pll_setup // void* call_mem_pll_setup( void *io_pArgs ) { @@ -267,10 +281,8 @@ void* call_mem_pll_setup( void *io_pArgs ) return l_err; } - - // -// Wrapper function to call 13.3 : mem_startclocks +// Wrapper function to call 13.4 : mem_startclocks // void* call_mem_startclocks( void *io_pArgs ) { @@ -351,7 +363,7 @@ void* call_mem_startclocks( void *io_pArgs ) // -// Wrapper function to call 13.4 : host_enable_vddr +// Wrapper function to call 13.5 : host_enable_vddr // void* call_host_enable_vddr( void *io_pArgs ) { @@ -412,7 +424,7 @@ void* call_host_enable_vddr( void *io_pArgs ) // -// Wrapper function to call 13.5 : mss_scominit +// Wrapper function to call 13.6 : mss_scominit // void* call_mss_scominit( void *io_pArgs ) { @@ -487,7 +499,7 @@ void* call_mss_scominit( void *io_pArgs ) } // -// Wrapper function to call 13.6 : mss_ddr_phy_reset +// Wrapper function to call 13.7 : mss_ddr_phy_reset // void* call_mss_ddr_phy_reset( void *io_pArgs ) { @@ -572,7 +584,7 @@ void* call_mss_ddr_phy_reset( void *io_pArgs ) // -// Wrapper function to call 13.7 : mss_draminit +// Wrapper function to call 13.8 : mss_draminit // void* call_mss_draminit( void *io_pArgs ) { @@ -659,7 +671,7 @@ void* call_mss_draminit( void *io_pArgs ) // -// Wrapper function to call 13.8 : mss_draminit_training +// Wrapper function to call 13.9 : mss_draminit_training // void* call_mss_draminit_training( void *io_pArgs ) { @@ -746,7 +758,7 @@ void* call_mss_draminit_training( void *io_pArgs ) } // -// Wrapper function to call 13.9 : mss_draminit_trainadv +// Wrapper function to call 13.10 : mss_draminit_trainadv // void* call_mss_draminit_trainadv( void *io_pArgs ) { @@ -805,7 +817,7 @@ void* call_mss_draminit_trainadv( void *io_pArgs ) } // -// Wrapper function to call 13.10 : mss_draminit_mc +// Wrapper function to call 13.11 : mss_draminit_mc // void* call_mss_draminit_mc( void *io_pArgs ) { diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.H b/src/usr/hwpf/hwp/dram_training/dram_training.H index e7039c5f7..9e256036e 100644 --- a/src/usr/hwpf/hwp/dram_training/dram_training.H +++ b/src/usr/hwpf/hwp/dram_training/dram_training.H @@ -115,8 +115,6 @@ namespace DRAM_TRAINING { - - /** * @brief host_disable_vddr * @@ -129,12 +127,22 @@ namespace DRAM_TRAINING */ void* call_host_disable_vddr( void * io_pArgs ); - +/** + * @brief mem_pll_pll_initf + * + * 13.2 : : PLL init file for MBAs + * + * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * or NULL. + * return any errlogs to istep + * + */ +void* call_mem_pll_initf( void * io_pArgs ); /** * @brief mem_pll_setup * - * 13.2 : : Setup PLL for MBAs + * 13.3 : : Setup PLL for MBAs * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -148,7 +156,7 @@ void* call_mem_pll_setup( void * io_pArgs ); /** * @brief mem_startclocks * - * 13.3 : : Start clocks on MBAs + * 13.4 : : Start clocks on MBAs * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -162,7 +170,7 @@ void* call_mem_startclocks( void * io_pArgs ); /** * @brief host_enable_vddr * - * 13.4 : : Enable the VDDR3 Voltage Rail + * 13.5 : : Enable the VDDR3 Voltage Rail * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -177,7 +185,7 @@ void* call_host_enable_vddr( void * io_pArgs ); /** * @brief mss_scominit * - * 13.5 : : Perform scom inits to MC and PHY + * 13.6 : : Perform scom inits to MC and PHY * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -191,7 +199,7 @@ void* call_mss_scominit( void * io_pArgs ); /** * @brief mss_ddr_phy_reset * - * 13.6 : : Soft reset of DDR PHY macros + * 13.7 : : Soft reset of DDR PHY macros * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -205,7 +213,7 @@ void* call_mss_ddr_phy_reset( void * io_pArgs ); /** * @brief mss_draminit * - * 13.7 : : Dram initialize + * 13.8 : : Dram initialize * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -218,7 +226,7 @@ void* call_mss_draminit( void * io_pArgs ); /** * @brief mss_draminit_training * - * 13.8 : : Dram training + * 13.9 : : Dram training * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -232,7 +240,7 @@ void* call_mss_draminit_training( void * io_pArgs ); /** * @brief mss_draminit_trainadv * - * 13.9 : : Advanced dram training + * 13.10 : : Advanced dram training * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -246,7 +254,7 @@ void* call_mss_draminit_trainadv( void * io_pArgs ); /** * @brief mss_draminit_mc * - * 13.10 : : Hand off control to MC + * 13.11 : : Hand off control to MC * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. diff --git a/src/usr/hwpf/hwp/mc_config/mc_config.C b/src/usr/hwpf/hwp/mc_config/mc_config.C index 05e6e0835..f3bd67b63 100644 --- a/src/usr/hwpf/hwp/mc_config/mc_config.C +++ b/src/usr/hwpf/hwp/mc_config/mc_config.C @@ -90,68 +90,46 @@ void* call_host_collect_dimm_spd( void *io_pArgs ) { errlHndl_t l_err = NULL; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_collect_dimm_spd entry" ); + IStepError l_StepError; -#if 0 - // @@@@@ CUSTOM BLOCK: @@@@@ - // figure out what targets we need - // customize any other inputs - // set up loops to go through all targets (if parallel, spin off a task) + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_collect_dimm_spd entry" ); - // print call to hwp and dump physical path of the target(s) - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== host_collect_dimm_spd HWP(? ? ? )", - ? - ? - ? ); - // dump physical path to targets - EntityPath l_path; - l_path = l_@targetN_target->getAttr<ATTR_PHYS_PATH>(); - l_path.dump(); - - // cast OUR type of target to a FAPI type of target. - const fapi::Target l_fapi_@targetN_target( - TARGET_TYPE_MEMBUF_CHIP, - reinterpret_cast<void *> - (const_cast<TARGETING::Target*>(l_@targetN_target)) ); - - // call the HWP with each fapi::Target - l_fapirc = host_collect_dimm_spd( ? , ?, ? ); + l_err = call_mss_volt( io_pArgs ); - // process return code. - if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) - { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : host_collect_dimm_spd HWP(? ? ? )" ); - } - else + if( l_err ) { - /** - * @todo fapi error - just print out for now... + /*@ + * @errortype + * @reasoncode ISTEP_MC_CONFIG_FAILED + * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE + * @moduleid ISTEP_HOST_COLLECT_DIMM_SPD + * @userdata1 bytes 0-1: plid identifying first error + * bytes 2-3: reason code of first error + * @userdata2 bytes 0-1: total number of elogs included + * bytes 2-3: N/A + * @devdesc call to mss_volt has failed + * */ - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: host_collect_dimm_spd HWP(? ? ?) ", - static_cast<uint32_t>(l_fapirc) ); - } - // @@@@@ END CUSTOM BLOCK: @@@@@ -#endif + l_StepError.addErrorDetails(ISTEP_MC_CONFIG_FAILED, + ISTEP_HOST_COLLECT_DIMM_SPD, + l_err ); + errlCommit( l_err, HWPF_COMP_ID ); + + } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_collect_dimm_spd exit" ); return l_err; } - // -// Wrapper function to call 12.2 : mss_volt +// Wrapper function to call mss_volt // -void* call_mss_volt( void *io_pArgs ) +errlHndl_t call_mss_volt( void *io_pArgs ) { errlHndl_t l_err = NULL; - IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt entry" ); TARGETING::TargetHandleList l_membufTargetList; @@ -192,23 +170,6 @@ void* call_mss_volt( void *io_pArgs ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X: mss_volt HWP( ) ", l_err->reasonCode()); - /*@ - * @errortype - * @reasoncode ISTEP_MC_CONFIG_FAILED - * @severity ERRORLOG::ERRL_SEV_UNRECOVERABLE - * @moduleid ISTEP_MSS_VOLT - * @userdata1 bytes 0-1: plid identifying first error - * bytes 2-3: reason code of first error - * @userdata2 bytes 0-1: total number of elogs included - * bytes 2-3: N/A - * @devdesc call to mss_volt has failed - * - */ - l_StepError.addErrorDetails(ISTEP_MC_CONFIG_FAILED, - ISTEP_MSS_VOLT, - l_err ); - - errlCommit( l_err, HWPF_COMP_ID ); } else @@ -219,11 +180,11 @@ void* call_mss_volt( void *io_pArgs ) TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_mss_volt exit" ); - return l_StepError.getErrorHandle(); + return l_err; } // -// Wrapper function to call 12.3 : mss_freq +// Wrapper function to call 12.2 : mss_freq // void* call_mss_freq( void *io_pArgs ) { @@ -375,7 +336,7 @@ errlHndl_t call_mss_eff_grouping() } // -// Wrapper function to call 12.4 : mss_eff_config +// Wrapper function to call 12.3 : mss_eff_config // void* call_mss_eff_config( void *io_pArgs ) { diff --git a/src/usr/hwpf/hwp/mc_config/mc_config.H b/src/usr/hwpf/hwp/mc_config/mc_config.H index 5108eb706..4326619bc 100644 --- a/src/usr/hwpf/hwp/mc_config/mc_config.H +++ b/src/usr/hwpf/hwp/mc_config/mc_config.H @@ -75,7 +75,7 @@ // Includes /******************************************************************************/ #include <stdint.h> - +#include <errl/errlentry.H> namespace MC_CONFIG { @@ -98,21 +98,21 @@ void* call_host_collect_dimm_spd( void * io_pArgs ); /** * @brief mss_volt * - * 12.2 : : Calc dimm voltage + * Calc dimm voltage * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. * return any error logs to istep * */ -void* call_mss_volt( void * io_pArgs ); +errlHndl_t call_mss_volt( void * io_pArgs ); /** * @brief mss_freq * - * 12.3 : : Calc dimm frequency + * 12.2 : : Calc dimm frequency * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. @@ -126,7 +126,7 @@ void* call_mss_freq( void * io_pArgs ); /** * @brief mss_eff_config * - * 12.4 : : Determine effective config + * 12.3 : : Determine effective config * * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, * or NULL. diff --git a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C index beb512982..40791be2a 100644 --- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C +++ b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.C @@ -59,7 +59,8 @@ // -- prototype includes -- // Add any customized routines that you don't want overwritten into -// "start_clocks_on_nest_chiplets_custom.C" and include the prototypes here. +// "start_clocks_on_nest_chiplets_custom.C" and include +// the prototypes here. // #include "nest_chiplets_custom.H" #include "nest_chiplets.H" #include "proc_start_clocks_chiplets/proc_start_clocks_chiplets.H" @@ -77,44 +78,45 @@ using namespace ERRORLOG; using namespace TARGETING; using namespace fapi; - - -// -// Wrapper function to call 07.1 : -// proc_a_x_pci_dmi_pll_setup -// -void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) +//***************************************************************************** +// wrapper function to call step 7.01 - proc_a_x_pci_dmi_pll_initf +//***************************************************************************** +void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_a_x_pci_dmi_pll_setup entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_initf entry" ); //TODO - Enable this procedure in SIMICs when RTC 46643 is done. // For now, only run this procedure in VPO. if ( !(TARGETING::is_vpo()) ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "WARNING: proc_a_x_pci_dmi_pll_setup HWP is disabled in SIMICS run!"); + "WARNING: proc_a_x_pci_dmi_pll_initf HWP" + " is disabled in SIMICS run!"); // end task return l_err ; } uint8_t l_cpuNum = 0; + TARGETING::TargetHandleList l_cpuTargetList; + getAllChips(l_cpuTargetList, TYPE_PROC); for ( l_cpuNum=0; l_cpuNum < l_cpuTargetList.size(); l_cpuNum++ ) { const TARGETING::Target* l_cpu_target = l_cpuTargetList[l_cpuNum]; const fapi::Target l_fapi_proc_target( - TARGET_TYPE_PROC_CHIP, - reinterpret_cast<void *> - ( const_cast<TARGETING::Target*>(l_cpu_target) ) ); + TARGET_TYPE_PROC_CHIP, + reinterpret_cast<void *> + ( const_cast<TARGETING::Target*>(l_cpu_target) ) ); TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Running proc_a_x_pci_dmi_pll_setup HWP on..."); + "Running proc_a_x_pci_dmi_pll_initf HWP"); EntityPath l_path; l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); l_path.dump(); @@ -130,7 +132,8 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) if (l_err) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X: proc_a_x_pci_dmi_pll_initf HWP returns error", + "ERROR 0x%.8X: proc_a_x_pci_dmi_pll_initf" + " HWP returns error", l_err->reasonCode()); ErrlUserDetailsTarget myDetails(l_cpu_target); @@ -155,13 +158,60 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) errlCommit( l_err, HWPF_COMP_ID ); - break; + break; } else { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS: proc_a_x_pci_dmi_pll_initf HWP( )" ); } + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_initf exit" ); + return l_err; +} + +//***************************************************************************** +// wrapper function to call step 7.02 - proc_a_x_pci_dmi_pll_setup +//***************************************************************************** +void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) +{ + errlHndl_t l_err = NULL; + + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_setup entry" ); + + //TODO - Enable this procedure in SIMICs when RTC 46643 is done. + // For now, only run this procedure in VPO. + if ( !(TARGETING::is_vpo()) ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "WARNING: proc_a_x_pci_dmi_pll_setup HWP " + "is disabled in SIMICS run!"); + // end task + return l_err ; + } + + uint8_t l_procNum = 0; + TARGETING::TargetHandleList l_procTargetList; + getAllChips(l_procTargetList, TYPE_PROC); + + for ( l_procNum=0; l_procNum < l_procTargetList.size(); l_procNum++ ) + { + const TARGETING::Target* l_proc_target = l_procTargetList[l_procNum]; + const fapi::Target l_fapi_proc_target( + TARGET_TYPE_PROC_CHIP, + reinterpret_cast<void *> + ( const_cast<TARGETING::Target*>(l_proc_target) ) ); + + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_a_x_pci_dmi_pll_setup HWP on..."); + EntityPath l_path; + l_path = l_proc_target->getAttr<ATTR_PHYS_PATH>(); + l_path.dump(); // call proc_a_x_pci_dmi_pll_setup FAPI_INVOKE_HWP(l_err, proc_a_x_pci_dmi_pll_setup, @@ -178,7 +228,7 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) HWP returns error", l_err->reasonCode()); - ErrlUserDetailsTarget myDetails(l_cpu_target); + ErrlUserDetailsTarget myDetails(l_proc_target); // capture the target data in the elog myDetails.addToLog(l_err ); @@ -209,25 +259,24 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ) } } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_a_x_pci_dmi_pll_setup exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_setup exit" ); // end task, returning any errorlogs to IStepDisp return l_StepError.getErrorHandle(); } - - -// -// Wrapper function to call 07.2 : -// proc_startclock_chiplets -// +//***************************************************************************** +// wrapper function to call step 7.03 - proc_startclock_chiplets +//***************************************************************************** void* call_proc_startclock_chiplets( void *io_pArgs ) { errlHndl_t l_err = NULL; IStepError l_StepError; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_startclock_chiplets entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_startclock_chiplets entry" ); uint8_t l_cpuNum = 0; @@ -243,7 +292,8 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) ( const_cast<TARGETING::Target*>(l_cpu_target) ) ); - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "Running proc_startclock_chiplets HWP on..." ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "Running proc_startclock_chiplets HWP on..." ); // dump physical path to targets EntityPath l_path; l_path = l_cpu_target->getAttr<ATTR_PHYS_PATH>(); @@ -257,8 +307,10 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) true); // pcie if (l_err) { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "ERROR 0x%.8X : proc_startclock_chiplets HWP returns error", - l_err->reasonCode()); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR 0x%.8X : proc_startclock_chiplets HWP " + "returns error", + l_err->reasonCode()); ErrlUserDetailsTarget myDetails(l_cpu_target); @@ -286,44 +338,45 @@ void* call_proc_startclock_chiplets( void *io_pArgs ) } else { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : proc_startclock_chiplets HWP( )" ); + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_startclock_chiplets HWP( )" ); } } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_startclock_chiplets exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_startclock_chiplets exit" ); // end task, returning any errorlogs to IStepDisp return l_StepError.getErrorHandle(); } - -// -// Wrapper function to call 07.3 : -// proc_chiplet_scominit -// +//****************************************************************************** +// wrapper function ito call step 7.04 - proc_chiplet_scominit +//****************************************************************************** void* call_proc_chiplet_scominit( void *io_pArgs ) { errlHndl_t l_err = NULL; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_chiplet_scominit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_scominit entry" ); // proc_chiplet_scominit will be called when there are initfiles to execute - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_chiplet_scominit exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_scominit exit" ); return l_err; } - -// -// Wrapper function to call 07.4 : -// proc_pcie_scominit -// +//***************************************************************************** +// wrapper function to call step 7.05 - proc_pcie_scominit +//****************************************************************************** void* call_proc_pcie_scominit( void *io_pArgs ) { errlHndl_t l_errl = NULL; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_pcie_scominit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_pcie_scominit entry" ); #if 0 // @@@@@ CUSTOM BLOCK: @@@@@ @@ -370,18 +423,16 @@ void* call_proc_pcie_scominit( void *io_pArgs ) // @@@@@ END CUSTOM BLOCK: @@@@@ #endif - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_pcie_scominit exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_pcie_scominit exit" ); // end task, returning any errorlogs to IStepDisp return l_errl; } - - -// -// Wrapper function to call 07.5 : -// proc_scomoverride_chiplets -// +//***************************************************************************** +// wrapper function to call step 7.06 - proc_scomoverride_chiplets +//***************************************************************************** void* call_proc_scomoverride_chiplets( void *io_pArgs ) { errlHndl_t l_errl = NULL; @@ -396,7 +447,8 @@ void* call_proc_scomoverride_chiplets( void *io_pArgs ) if (l_errl) { TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR 0x%.8X : proc_scomoverride_chiplets HWP returns error", + "ERROR 0x%.8X : proc_scomoverride_chiplets " + "HWP returns error", l_errl->reasonCode()); /*@ * @errortype @@ -417,11 +469,12 @@ void* call_proc_scomoverride_chiplets( void *io_pArgs ) } else { - TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, "SUCCESS : proc_scomoverride_chiplets HWP"); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : proc_scomoverride_chiplets HWP"); } - - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_proc_scomoverride_chiplets exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_scomoverride_chiplets exit" ); // end task, returning any errorlogs to IStepDisp return l_StepError.getErrorHandle(); diff --git a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H index 915a23f0d..c600273a3 100644 --- a/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H +++ b/src/usr/hwpf/hwp/nest_chiplets/nest_chiplets.H @@ -88,11 +88,22 @@ namespace NEST_CHIPLETS { +/** + * @brief proc_a_x_pci_dmi_pll_initf + * + * 07.1 : : PLL init file for A, X, PCIe, DMI + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + * + */ +void* call_proc_a_x_pci_dmi_pll_initf( void *io_pArgs ); /** * @brief proc_a_x_pci_dmi_pll_setup * - * 07.1 : : Setup PLL for A, X, PCIe, DMI + * 07.2 : : Setup PLL for A, X, PCIe, DMI * * param[in,out] - pointer to any arguments, usually NULL * @@ -106,7 +117,7 @@ void* call_proc_a_x_pci_dmi_pll_setup( void *io_pArgs ); /** * @brief proc_startclock_chiplets * - * 07.2 : : Start clocks on A, X, PCIe chiplets + * 07.3 : : Start clocks on A, X, PCIe chiplets * * param[in,out] - pointer to any arguments, usually NULL * @@ -134,7 +145,7 @@ void* call_proc_chiplet_scominit( void *io_pArgs ); /** * @brief proc_pcie_scominit * - * 07.4 : : Apply scom inits to PCIe chiplets + * 07.5 : : Apply scom inits to PCIe chiplets * * param[in,out] - pointer to any arguments, usually NULL * @@ -148,7 +159,7 @@ void* call_proc_pcie_scominit( void *io_pArgs ); /** * @brief proc_scomoverride_chiplets * - * 07.5 : : Apply sequenced scom inits + * 07.6 : : Apply sequenced scom inits * * param[in,out] - pointer to any arguments, usually NULL * diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C index 3db1c23a7..9888d549f 100644 --- a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C +++ b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.C @@ -70,6 +70,7 @@ using namespace TARGETING; using namespace fapi; using namespace vsbe; + // // Wrapper function to call step 10 : sbe_centaur_init // diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C index 98979db12..b340e2089 100644 --- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C +++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.C @@ -61,10 +61,10 @@ using namespace ERRORLOG; namespace SLAVE_SBE { -// -// Wrapper function to call 6.8 : -// proc_revert_sbe_mcs_setup -// + +//****************************************************************************** +// call_proc_revert_sbe_mcs_setup function (step 6.08) +//****************************************************************************** void* call_proc_revert_sbe_mcs_setup(void *io_pArgs) { errlHndl_t l_errl = NULL; @@ -110,7 +110,6 @@ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs) l_errl ); errlCommit( l_errl, HWPF_COMP_ID ); - } else { @@ -126,11 +125,45 @@ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs) } -// -// Wrapper function to call 6.9 : -// proc_check_slave_sbe_seeprom_complete -// -void* call_proc_check_slave_sbe_seeprom_complete(void *io_pArgs) +//****************************************************************************** +// call_host_slave_sbe function (step 6.09) +//****************************************************************************** +void* call_host_slave_sbe_config(void *io_pArgs) +{ + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_config entry" ); + + errlHndl_t l_err = NULL; + + // $TODO RTC: Story 41184 implement slave_sbe_config + // call proc_read_nest_freq.C + // call proc_setup_sbe_config.C + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_slave_sbe_config exit" ); + + return l_err; + +} + +//****************************************************************************** +// call_host_sbe_start function (step 6.10) +//****************************************************************************** +void* call_host_sbe_start( void *io_pArgs ) +{ + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_sbe_start entry" ); + errlHndl_t errl = NULL; + + // call proc_sbe_start.C + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_host_sbe_start exit" ); + + return errl; +} +//****************************************************************************** +// call_proc_check_slave_sbe_seeprom_complete function (step 6.11) +//****************************************************************************** +void* call_proc_check_slave_sbe_seeprom_complete( void *io_pArgs ) { errlHndl_t l_errl = NULL; @@ -231,5 +264,23 @@ void* call_proc_check_slave_sbe_seeprom_complete(void *io_pArgs) return l_errl ; } +//****************************************************************************** +// call_proc_xmit_sbe (step 6.12) +//****************************************************************************** +void* call_proc_xmit_sbe(void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_xmit_sbe entry" ); + + // call proc_xmit_sbe.C + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_xmit_sbe exit" ); + + return l_errl; +} + } diff --git a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H index a2cd1dbc4..6067dce78 100644 --- a/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H +++ b/src/usr/hwpf/hwp/slave_sbe/slave_sbe.H @@ -69,18 +69,51 @@ namespace SLAVE_SBE */ void* call_proc_revert_sbe_mcs_setup(void *io_pArgs); +/** + * @brief host_slave_sbe_config + * + * 6.9 : : + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + */ +void* call_host_slave_sbe_config(void *io_pArgs); /** - * brief proc_check_slave_sbe_seeprom_complete + * @brief host_sbe_start * - * 6.9 : Check Slave SBE Complete + * 6.10 : : * * param[in,out] - pointer to any arguments, usually NULL * - * return any error logs to istep + * return any error logs to istep + */ +void* call_host_sbe_start(void *io_pArgs); + +/** + * @brief proc_check_slave_sbe_seeprom_complete + * + * 6.11 : : + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep */ void* call_proc_check_slave_sbe_seeprom_complete(void *io_pArgs); +/** + * @brief proc_xmit_sbe + * + * 6.12 : : + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + */ +void* call_proc_xmit_sbe(void *io_pArgs); + + }; // end namespace #endif diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C index fe6c351b7..d7bd14adb 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.C +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -53,6 +53,7 @@ #include <mbox/mboxif.H> #include <initservice/isteps_trace.H> +#include <hwpisteperror.H> // targeting support #include <targeting/common/commontargeting.H> @@ -73,6 +74,7 @@ namespace START_PAYLOAD using namespace TARGETING; using namespace fapi; using namespace ISTEP; +using namespace ISTEP_ERROR; /** * @brief This function will call the Initservice interface to shutdown @@ -98,61 +100,107 @@ errlHndl_t callShutdown ( void ); errlHndl_t notifyFsp ( bool i_istepModeFlag, TARGETING::SpFunctions i_spFuncs ); - // // Wrapper function to call 21.1 : -// host_start_payload +// host_runtime_setup // -void* call_host_start_payload( void *io_pArgs ) +void* call_host_runtime_setup( void *io_pArgs ) { - errlHndl_t l_errl = NULL; TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_start_payload entry" ); + "call_host_runtime_setup entry" ); + + errlHndl_t l_err = NULL; + + IStepError l_StepError; + + // Need to wait here until Fsp tells us go + INITSERVICE::waitForSyncPoint(); do { - // Need to wait here until Fsp tells us go - INITSERVICE::waitForSyncPoint(); - // Need to load up the runtime module if it isn't already loaded if ( !VFS::module_is_loaded( "libruntime.so" ) ) { - l_errl = VFS::module_load( "libruntime.so" ); - if ( l_errl ) + l_err = VFS::module_load( "libruntime.so" ); + + if ( l_err ) { // load module returned with errl set TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "Could not load runtime module" ); - - // break out of do block + "Could not load runtime module" ); + // break from do loop if error occured break; } } - // Host Start Payload procedure, per documentation from Patrick. - // - Verify target image - // - TODO - Done via call to Secure Boot ROM. - // - Will be done in future sprints + // Write the HostServices attributes into mainstore + l_err = RUNTIME::populate_attributes(); - // - Update HDAT with updated SLW images - // - TODO - Once we know where they go in the HDAT + // - Update HDAT with tpmd logs - //@todo : Move this to new sub-step with RTC:49501 - // Write the HostServices attributes into mainstore - l_errl = RUNTIME::populate_attributes(); - if( l_errl ) - { - break; - } + } while(0); - // - Run CXX testcases - l_errl = INITSERVICE::executeUnitTests(); + if( l_err ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "istep start_payload_failed see plid 0x%x", l_err->plid()); - if( l_errl ) - { - break; - } + l_StepError.addErrorDetails(ISTEP_START_PAYLOAD_FAILED, + ISTEP_HOST_RUNTIME_SETUP, l_err ); + + errlCommit(l_err, ISTEP_COMP_ID); + + } + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_runtime_setup exit" ); + + return l_StepError.getErrorHandle(); +} + +// +// Wrapper function to call 21.2 : +// host_start_payload +// +void* call_host_verify_hdat( void *io_pArgs ) +{ + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_verify_hdat entry" ); + + errlHndl_t l_err = NULL; + + // Host Start Payload procedure, per documentation from Patrick. + // - Verify target image + // - TODO - Done via call to Secure Boot ROM. + // - Will be done in future sprints + + // stub for now.. + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_verify_hdat exit" ); + + return l_err; +} +// +// Wrapper function to call 21.3 : +// host_start_payload +// +void* call_host_start_payload( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + IStepError l_StepError; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_start_payload entry" ); + + + // - Run CXX testcases + l_errl = INITSERVICE::executeUnitTests(); + + if( l_errl == NULL ) + { // - Call shutdown using payload base, and payload entry. // - base/entry will be from system attributes @@ -160,17 +208,25 @@ void* call_host_start_payload( void *io_pArgs ) // NOTE: this call will not return if successful. l_errl = callShutdown(); - if( l_errl ) - { - break; - } - } while( 0 ); + }; + + if( l_errl ) + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "istep start_payload_failed see plid 0x%x", l_errl->plid()); + + l_StepError.addErrorDetails(ISTEP_START_PAYLOAD_FAILED, + ISTEP_HOST_START_PAYLOAD, l_errl ); + + errlCommit(l_errl, ISTEP_COMP_ID); + + } TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "call_host_start_payload exit" ); + "call_host_start_payload exit" ); // end task, returning any errorlogs to IStepDisp - return l_errl; + return l_StepError.getErrorHandle(); } diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.H b/src/usr/hwpf/hwp/start_payload/start_payload.H index b4f620842..036efe967 100644 --- a/src/usr/hwpf/hwp/start_payload/start_payload.H +++ b/src/usr/hwpf/hwp/start_payload/start_payload.H @@ -59,12 +59,34 @@ namespace START_PAYLOAD { +/** + * @brief host_runtime_setup + * + * 21.1 : : Host Runtime Setup + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + * + */ +void* call_host_runtime_setup( void *io_pArgs ); +/** + * @brief host_verify_hdat + * + * 21.2 : : Secureboot verification of PHYP/AVP image load + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return any error logs to istep + * + */ +void* call_host_verify_hdat( void *io_pArgs ); /** * @brief host_start_payload * - * 21.1 : : Start Payload + * 21.3 : : Start Payload * * param[in,out] - pointer to any arguments, usually NULL * @@ -74,6 +96,7 @@ namespace START_PAYLOAD void* call_host_start_payload( void *io_pArgs ); + }; // end namespace #endif |