diff options
| author | Mark Wenning <wenning@us.ibm.com> | 2012-04-02 17:27:57 -0500 |
|---|---|---|
| committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2012-04-17 11:34:02 -0500 |
| commit | b97e806c5c044abd0cc12cbca41c8358c67eade1 (patch) | |
| tree | 6f16776b8247eec8c6be8465e1ffd1daad65534b | |
| parent | b3c9d1540732ead1232098cf3c5c1ebcbc89e573 (diff) | |
| download | talos-hostboot-b97e806c5c044abd0cc12cbca41c8358c67eade1.tar.gz talos-hostboot-b97e806c5c044abd0cc12cbca41c8358c67eade1.zip | |
Add IStep Stubs for all ISteps in IPL Flow Document
Add stubs for all remaining ISteps, based on
HostBoot_IPL_Flow_v1.01.odt document. Task 39253
1 -5 Not applicable, performed by SBE
6 - Save SBE (HWAS) ALL, Brian is moving some of them from 4
7 - Start Clocks on Nest Chiplets ALL
8 - EDI, EI init ALL
9 - Activate PowerBus ALL
10 - Centaur Init already implemented
11 - DMI Training already implemented
12 - MC Init already Implemented
13 - Dram Training already Implemented
14 - Dram Initialization ALL
15 - Build Winkle Images ALL
16 - Core Activate ALL
17 - Init PSI marked FSP, not implemented
18 - Establish System SMP 18.8, 9, 10 only, the rest are marked FSP
19 - Build and Load Host Image marked FSP, not implemented
20 - Load Payload ALL
21 - Start Payload ALL
RTC: 38196
Change-Id: I4e853f58caafe7dd472d57b42883724eaaa2e8a3
Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/826
Tested-by: Jenkins Server
Reviewed-by: Brian H. Horton <brianh@linux.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
54 files changed, 6002 insertions, 792 deletions
diff --git a/src/build/simics/hb-simdebug.py b/src/build/simics/hb-simdebug.py index 3aa72445c..e0c9a0a38 100755 --- a/src/build/simics/hb-simdebug.py +++ b/src/build/simics/hb-simdebug.py @@ -278,16 +278,20 @@ def get_istep_list( inList ): def print_istep_list( inList ): + hdrflag = 1 print "IStep\tSubStep\tName" print "---------------------------------------------------" for i in range(0,len(inList)) : - if ( inList[i][0] != None ) : - print "-- %d"%(i) for j in range( 0, len(inList[i])) : # print "%d %d"%(i,j) if ( inList[i][j] != None ) : + if ( hdrflag ) : + print "-- %d"%(i) + hdrflag = 0 ## print "%d\t%d\t%s"%( i,j, inList[i][j] ) print "%s"%( inList[i][j] ) + + hdrflag = 1 print " " @@ -333,6 +337,8 @@ def runIStep( istep, substep, inList ): print "Istep %d.%d FAILED to launch, task status is %d"%( stsIStep, stsSubstep, taskStatus ) else: print "Istep %d.%d returned Status: 0x%x"%( stsIStep, stsSubstep, istepStatus ) + if ( istepStatus == 0xa ) : + print " (not supported yet)" print "-------------------------------------------------------------- %d"%(g_SeqNum) return @@ -406,21 +412,14 @@ def resume_istep(): def sCommand( inList, scommand ) : i = int(scommand) - j = 0 - - # sanity check - if ( inList[i][0] == None ) : - print "IStep %d.0 does not exist."%( i ) - return # execute all the substeps in the IStep - for substep in inList[i] : + for j in range( 0, len(inList[i]) ) : ## print "-----------------" - ##print "run IStep %d %s ..."%(i, substep) + ## print "$$$$ run IStep %d %d ..."%(i, j) ##print "-----------------" if ( inList[i][j] != None ) : runIStep( i, j, inList ) - j = j+1 return @@ -558,9 +557,11 @@ def istepHB( symsFile, str_arg1 ): print( "Invalid substep %s"%(ss_list[1] ) ) return + ## @todo - this does not work correctly across istep boundaries for x in range( istepM, istepN+1 ) : for y in range( substepM, substepN+1 ) : - runIStep( x, y, inList ) + if ( inList[x][y] != None ) : + runIStep( x, y, inList ) return diff --git a/src/build/tools/genIStep.pl b/src/build/tools/genIStep.pl index cd22aad14..fe5c97b05 100755 --- a/src/build/tools/genIStep.pl +++ b/src/build/tools/genIStep.pl @@ -39,56 +39,79 @@ # ( or have your perlscript do it from the tag block ) # # Make up a new directory src/usr/hwpf/hwp/<@istepname> -# cd to that directory. +# cd to that directory. # -# Make up a blank file src/usr/hwpf/hwp/<@istepname>/<@istepname.H> +# Make up a blank file src/usr/hwpf/hwp/<@istepname>/<@istepname.H> # (use src/usr/hwpf/hwp/template.H as a template) -# - add the tag block file detailed below. +# - add the tag block file example detailed below. +# - note that each substep is enclosed by "@{ @}" delimiters # -# 1. [x] Update the src/usr/hwpf/hwp/<@istepname>/<@istepname.H> +# +# /* @tag isteplist +# * @docversion +# * @istepname +# * @istepnum +# * @istepdesc +# * +# * @{ +# * @substepnum 1 +# * @substepname +# * @substepdesc +# * @target_sched serial +# * @} +# * +# * ... +# * +# * @{ +# * @substepnum N +# * @substepname +# * @substepdesc +# * @target_sched serial +# * +# * @} +# */ +# +# Checklist for building a new Istep: ( [x] means done by this script ) +## +# 1. [x] Update the src/usr/hwpf/hwp/<@istepname>/<@istepname.H> # with the prototypes, etc. from the istep/substep. -# -# 2. [x] Create a new file src/usr/hwpf/hwp/<@istepname>/<@istepname.C> +# +# 2. [x] Create a new file src/usr/hwpf/hwp/<@istepname>/<@istepname.C> # (use src/usr/hwpf/hwp/template.C as a template) # -# 3. [ ] Make a new istep<@istepnum>list.H file in /usr/include/isteps/ -# Add the new istep<@istepnum>list.H file to -# src/include/usr/istepmasterlist.H in the correct place in the +# 3. [x] Make a new istep<@istepnum>list.H file in /usr/include/isteps/ +# Add the new istep<@istepnum>list.H file to +# src/include/usr/istepmasterlist.H in the correct place in the # master istep list. # -# 4. [ ]Make up new makefile src/usr/hwpf/hwp/<@istepname>/makefile to compile -# the HWP and wrapper -# Add makefile support for the new HWP: -# - Scan src/usr/hwpf/hwp/@substepname/makefile for the line: -# ## NOTE: add a new EXTRAINCDIR when you add a new HWP -# - Add new line just after it: -# EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/@istepname/@substepname -# - Scan further for the line: -# ## NOTE: add a new directory onto the vpaths when you add a new HWP -# - Add new line just after it: -# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/@istepname/@substepname -# - Scan further for the line: -# OBJS = ?? -# - Append $substepname.o on to the end of it. May have to wrap at 80 chars +# 3.1 [ ] TODO: if istepnum's are not contiguous, pad out the isteplist +# with { NULL, 0, NULL } +# 3.2 [ ] TODO: make sure there are no tabs in output +# +# 3.3 [x] TODO: use correct istep #'s in ISTEPNUM() macro $$$$$$$ # -# Make sure you add the lines -# ## pointer to common HWP files -# EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include -# to the makefiles. +# 3.4.[ ] TODO: check mode - check files (numbering,etc) against tag blocks # -# * Update all the other makefiles: +# 3.5 [ ] TODO: fix mode - rewrite just one type of file: .H, .C, +# makefile, etc. +# useful for updating H and list files without messing up +# code that has been added to C files. +# +# 4. [x] Make up new makefile src/usr/hwpf/hwp/<@istepname>/makefile to +# compile the HWP and wrapper +# +# 5. [ ] Update all the other makefiles: # src/usr/hwpf/hwp/makefile ( add SUBDIR ) -# src/usr/hwpf/makefile ( add to HWP_ERROR_XML_FILES, see below ) -# src/usr/makefile ( add to EXTENDED_MODULES ) +# src/makefile ( add to EXTENDED_MODULES ) +# # - # Make a new istep<@istepnum>list.H file in /usr/include/isteps/ # Add the new istep<@istepnum>list.H file to src/include/usr/istepmasterlist.H # in the correct place in the master istep list. # # Create a tag block, usually in src/usr/hwpf/hwp/<@istepname>/<@istepname.H> -# At present this is optional, but the (coming) genIstep.pl script will -# not be able to maintain your istep without it. +# At present this is optional, but the (coming) genIstep.pl script will +# not be able to maintain your istep without it. # # The tag block keywords, with explanations, are as follows: # * @tag isteplist @@ -128,9 +151,9 @@ # - Go to the Gerrit page where the HWP is, and select the line to generate # a patch # - run this line and pipe it to a file. -# - then run: - git apply --directory=src/usr/hwpf/hwp/@istepname/@substepname <file> -# +# - then run: +# git apply --directory=src/usr/hwpf/hwp/@istepname/@substepname <file> +# # Example: istep 12.2, mss_eff_config: # ## cutNpaste the patch comand from Gerrit and pipe to a file: # git fetch ssh://wenning@gfw160.austin.ibm.com:29418/hwp_review_centaur refs/changes/63/663/3 && git format-patch -1 --stdout FETCH_HEAD > mss_eff_config.patch @@ -138,6 +161,7 @@ # git apply --directory=src/usr/hwpf/hwp/mc_init/mss_eff_config mss_eff_config.patch # # Add makefile support for the new HWP: +# - src/usr/hwpf/makefile ( add to HWP_ERROR_XML_FILES ) # - Scan src/usr/hwpf/hwp/@substepname/makefile for the line: # ## NOTE: add a new EXTRAINCDIR when you add a new HWP # - Add new line just after it: @@ -148,8 +172,9 @@ # VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/@istepname/@substepname # - Scan further for the line: # OBJS = ?? -# - Append $substepname.o on to the end of it. May have to wrap at 80 chars -# +# - Append $substepname.o on to the end of it. May have to wrap at 80 chars + +# # Part of the HWP source should (may??) be a <@substep>.xml file . # - Update hwpf/makefile to process the xml file in the # Source XML files section: @@ -193,6 +218,7 @@ sub storeTagInHash; sub createIstepHFile; sub createIstepCFile; sub createIstepListFile; +sub createMakefile; #------------------------------------------------------------------------------ # Globals @@ -221,9 +247,8 @@ my $templateHFileHdr = * */ -/*@ -\@tag_block - */ + \@tag_block + /******************************************************************************/ // Includes /******************************************************************************/ @@ -244,15 +269,16 @@ my $templateHFileSubStep = * * \@istepnum.\@substepnum : \@substepdesc * - * param[in,out] io_pArgs - (normally) a pointer to any args, or NULL. + * param[in,out] - pointer to any arguments, usually NULL + * * return none * */ -void call_\@substepname( void * io_pArgs ); +void call_\@substepname( void *io_pArgs ); "; ##### end templateHFileSubStep ############################# ##################################################################### - + ##################################################################### ##### begin templateHFileTrailer ############################## @@ -269,11 +295,11 @@ my $templateHFileTrailer = ##################################################################### ##### begin templateCFileHdr ################################# my $templateCFileHdr = -" +" /** - * \@file \@istepname.C + * \@file \@istepname.C * - * Support file for IStep: \@istepname + * Support file for IStep: \@istepname * \@istepdesc * * ***************************************************************** @@ -307,30 +333,24 @@ my $templateCFileHdr = #include <fapi.H> #include <fapiPlatHwpInvoker.H> +#include \"\@istepname.H\" -// -- prototype includes -- -// Add any customized routines that you don't want overwritten into -// \"\@istepname_custom.C\" and include the prototypes here. -// #include \"\@istepname_custom.H\" - -#include \"\@istepname.H\" - // Uncomment these files as they become available: "; ##### end templateCFileHdr ##################################### ##################################################################### -##################################################################### +##################################################################### ##### begin templateCFileNSHdr ##################################### my $templateCFileNSHdr = " -namespace \@\@istepname +namespace \@\@istepname { using namespace TARGETING; using namespace fapi; -"; +"; ##### end templateCFileNSHdr ##################################### ##################################################################### @@ -340,72 +360,63 @@ using namespace fapi; my $templateCFileSubStep = " // -// Wrapper function to call \@istepnum.\@substepnum : \@substepname +// Wrapper function to call \@istepnum.\@substepnum : +// \@substepname // -void call_\@substepname( void *io_pArgs ) +void call_\@substepname( void *io_pArgs ) { - fapi::ReturnCode l_fapirc; errlHndl_t l_errl = NULL; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, \"call_\@substepname entry\" ); - + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + \"call_\@substepname entry\" ); + #if 0 - // \@\@\@\@\@ CUSTOM BLOCK: \@\@\@\@\@ + // \@\@\@\@\@ 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) - - // print call to hwp and dump physical path of the target(s) - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - \"===== \@substepname HWP(? ? ? )\", - ? - ? - ? ); + // dump physical path to targets EntityPath l_path; l_path = l_\@targetN_target->getAttr<ATTR_PHYS_PATH>(); l_path.dump(); - TRACFCOMP( g_trac_mc_init, \"===== \" ); - // cast OUR type of target to a FAPI type of target. + // 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 = \@substepname( ? , ?, ? ); - // process return code. - if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) + // call the HWP with each fapi::Target + FAPI_INVOKE_HWP( l_errl, \@substepname, _args_...); + if ( l_errl ) { - TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - \"SUCCESS : \@substepname HWP(? ? ? )\" ); + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + \"ERROR : ..........\" ); + errlCommit( l_errl, HWPF_COMP_ID ); } else { - /** - * \@todo fapi error - just print out for now... - */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - \"ERROR %d: \@substepname HWP(? ? ?) \", - static_cast<uint32_t>(l_fapirc) ); + \"SUCCESS : ..........\" ); } - // \@\@\@\@\@ END CUSTOM BLOCK: \@\@\@\@\@ + // \@\@\@\@\@ END CUSTOM BLOCK: \@\@\@\@\@ #endif - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, \"call_\@substepname exit\" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + \"call_\@substepname exit\" ); - task_end2( reinterpret_cast<void*>( l_errl ) ); + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); } "; -##### end templateCFileSubStep ################################# +##### end templateCFileSubStep ################################# ##################################################################### ##################################################################### ##### begin templateCfileTrailer ############################# -my $templateCFileTrailer = +my $templateCFileTrailer = " }; // end namespace "; @@ -416,7 +427,7 @@ my $templateCFileTrailer = ##################################################################### ##### begin templateListFileHdr1 ############################# -my $templateListFileHdr1 = +my $templateListFileHdr1 = " #ifndef __ISTEPS_ISTEP\@istepnumLIST_H #define __ISTEPS_ISTEP\@istepnumLIST_H @@ -431,10 +442,10 @@ my $templateListFileHdr1 = ##### end templateListFileHdr1 ############################# ##################################################################### - + ##################################################################### ##### begin templateListFileHdr2 ############################# - my $templateListFileHdr2 = +my $templateListFileHdr2 = " * * ***************************************************************** * THIS FILE WAS GENERATED ON \@timestamp @@ -454,7 +465,16 @@ my $templateListFileHdr1 = namespace INITSERVICE { const TaskInfo g_istep\@istepnum[] = { - // NOTE: IStep indexes start with 0 + + { + + \"\", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, "; ##### end templateListFileHdr2 ############################# ##################################################################### @@ -462,16 +482,32 @@ namespace INITSERVICE ##################################################################### ##### begin templateListFileSS ################################# -my $templateListFileSS = +my $templateListFileSS1 = " { - ISTEPNAME(\@istepnum,\@-substepnum,\"\@substepname\"), + ISTEPNAME(\@istepnum,\@substepnum,\"\@substepname\"), \@\@istepname::call_\@substepname, { START_FN, EXT_IMAGE, } - }, -"; + }, +"; +##### end templateListFileSS ############################# +##################################################################### + + +##################################################################### +##### begin templateListFileSS ################################# +my $templateListFileSS2 = +" { + \"\@substepname\", + NULL, + { + NONE, + EXT_IMAGE, + } + }, +"; ##### end templateListFileSS ############################# ##################################################################### @@ -479,7 +515,7 @@ my $templateListFileSS = ##################################################################### ##### begin templateListFileTrailer ############################ my $templateListFileTrailer = -" +" // END OF LIST! }; @@ -497,6 +533,47 @@ const ExtTaskInfo g_istep\@istepnumTaskList = { ##### end templateListFileTrailer ############################# ##################################################################### +##################################################################### +##### begin templateMakeFile ################################### +my $templateMakeFile = +" +ROOTPATH = ../../../../.. + +MODULE = \@istepname + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += \${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += \${ROOTPATH}/src/usr/hwpf/hwp/\@istepname + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += \${ROOTPATH}/src/usr/hwpf/hwp/\@istepname/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = \@istepname.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += \${ROOTPATH}/src/usr/hwpf/hwp/\@istepname/<HWP_dir> + + +include \${ROOTPATH}/config.mk +"; +##### end templateMakeFile ############################# +##################################################################### + + #============================================================================== # MAIN @@ -526,43 +603,33 @@ my $opt_dry_run = 0; my $opt_debug = 0; my $istepDir = ""; my $istepListDir = "src/include/usr/isteps"; +my $opt_gen_C = 0; -##### -## This should work, but doesn't. -## my %optHash = ( 'help|?' => \$opt_help, -## 'tag-file=s' => \$opt_tag_file, -## 'dry-run' => \$opt_dry_run, -## 'debug' => \$opt_debug, -## ); -## GetOptionsFromArray( \%optHash, \@ARGV, -## 'help|?', -## 'debug', -## 'tag-file=s', -## 'dry-run' -## ); -##### GetOptions( 'help|?' => \$opt_help, 'tag-file=s' => \$opt_tag_file, 'istep-dir=s' => \$istepDir, - 'istep-list-dir=s' => \$istepListDir, + 'istep-list-dir=s' => \$istepListDir, + 'gen-C' => \$opt_gen_C, 'dry-run' => \$opt_dry_run, 'debug' => \$opt_debug, ); - + if ( $opt_debug ) { print STDERR "help = $opt_help\n"; print STDERR "debug = $opt_debug\n"; print STDERR "tag-file = $opt_tag_file\n"; print STDERR "dry-run = $opt_dry_run\n"; + print STDERR "gen-C = $opt_gen_C\n"; print STDERR "istepDir = $istepDir\n"; + } ## check for required options if ( $opt_tag_file eq "" ) -{ +{ print STDOUT "No tag file specified\n"; printUsage(); exit ERR_NO_TAG_FILE; @@ -603,88 +670,98 @@ if ( ( ! -e $istepListDir ) } ## extract tag block -if ( extractTagBlock( $opt_tag_file ) != 0 ) +if ( extractTagBlock( $opt_tag_file ) != 0 ) { print STDOUT "No Tag block in $opt_tag_file.\n"; exit ERR_NO_TAG_BLOCK; } +## save the original to re-insert in the H file +my $Extracted_Tag_Block = $Tag_Block; + + ## strip comment junk from Tag Block $Tag_Block =~ s/^(\*|\s)*//gmo; ## split cleaned up lines from Tag_block into an array my @tag_lines = split /^/, $Tag_Block; - -## print STDERR "@tag_lines"; - -## check to make sure this is the correct tag file -if ( $opt_debug ) { print "--$tag_lines[0]\n"; } -if ( ( !defined $tag_lines[0] ) - || ( ! ($tag_lines[0] =~ m/^(\*|\s)*\@.*tag\s+isteplist/) ) - ) -{ - print STDOUT "ERROR: The first line of the tag block MUST be \"\@tag isteplist\"\n"; - exit ERR_INVALID_START_TAG; -} - + +## print STDERR ">>>@tag_lines<<<\n"; + ## OK, start storing tag values while ( $_ = shift( @tag_lines ) ) { - if ( ! defined $_ ) - { + if ( ! defined $_ ) + { if ( $opt_debug ) { print STDERR "Done.\n"; } - last; + last; } - + ## strip junk at the beginning s/^(\*|\s)*//; - + chomp; - if ( $opt_debug ) { print "-$_\n"; } - + if ( $opt_debug ) { print "-$_\n"; } + if ( m/\@\{/ ) { ## process the tag block - processBlock( \@tag_lines ); - } - + processBlock( \@tag_lines ); + } + if ( m/\@docversion/ ) { s/^\@docversion\s+//; storeTagInHash( "docversion", $_ ); } - + if ( m/\@istepname/ ) - { + { s/^\@istepname\s+//; storeTagInHash( "istepname", $_ ); } - + if ( m/\@istepnum/ ) { s/^\@istepnum\s+//; storeTagInHash( "istepnum", $_ ); } - + if ( m/\@istepdesc/ ) - { + { s/^\@istepdesc\s+//; - storeTagInHash( "istepdesc", $_ ); + storeTagInHash( "istepdesc", $_ ); } } ## ----- Begin writing the files. --------------------------------- -# Make up (or modify) src/usr/hwpf/hwp/<@istepname>/<@istepname.H> +# Make up (or modify) src/usr/hwpf/hwp/<@istepname>/<@istepname.H> # (use src/usr/hwpf/hwp/template.H as a template) createIstepHFile( ); +## The rest of the files can pretty safely be changed; the C file +## possibly (probably) contains modifications. +## Thus this flag - default is to NOT generate a new C file. +# # Make up a new file src/usr/hwpf/hwp/<@istepname>/<@istepname.C> # (use src/usr/hwpf/hwp/template.C as a template) -createIstepCFile( ); - +if ( $opt_gen_C ) +{ + createIstepCFile( ); +} + +# Make a new istep<@istepnum>list.H file in /usr/include/isteps/ +# Add the new istep<@istepnum>list.H file to +# src/include/usr/istepmasterlist.H in the correct place in the +# master istep list. createIstepListFile( ); - + +# Make up new makefile src/usr/hwpf/hwp/<@istepname>/makefile to compile +# the HWP and wrapper +createMakefile(); + + print STDOUT "Done.\n"; #============================================================================== @@ -693,15 +770,16 @@ print STDOUT "Done.\n"; ## ## Print the usage (help) message -## +## sub printUsage() { print STDOUT "genIStep.pl\n"; print STDOUT " --tag-file <path> ( required: file containing tag block )\n"; print STDOUT " --istep-dir <path> ( required: directory where istep code will be generated )\n"; - - print STDOUT " [ --istep-list-dir <path> ] ( directory where istepNlist.H will be generated\n"; + + print STDOUT " [ --istep-list-dir <path> ] ( directory where istepNlist.H will be generated\n"; print STDOUT " ( this is usually src/include/usr/isteps )\n"; + print STDOUT " [ --gen-C ( generate the stub C file. Default is to NOT do this.\n"; print STDOUT " [ --help ] ( prints usage message )\n"; ## print STDOUT " [ --dry-run ] ( prints all steps without doing anything )\n"; } @@ -714,7 +792,7 @@ sub extractTagBlock( $ ) { my ( $in_tag_file ) = @_; my $data = ""; - + open( TAGFH, "< $in_tag_file") or die " $? : can't open $in_tag_file : $!"; read( TAGFH, $data, -s TAGFH ) or die "Error reading $in_tag_file: $!"; close TAGFH; @@ -728,36 +806,35 @@ sub extractTagBlock( $ ) # */ # =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= ## Extract Tag block - while ($data =~ /\/\*\@((.|\n)+?)\*\//mgo ) + while ($data =~ /(\/\*\s*\@tag\s+isteplist)((.|\n)+?)(\*\/)/mgo ) { - $Tag_Block = $1; - } - + ## $Tag_Block = "$2"; + $Tag_Block = "$1$2$4"; + } + if ( $Tag_Block eq "" ) { return 1; } - - - if ( $opt_debug ) - { - print STDERR "debug: Extracted Tag Block: \n$Tag_Block\n"; + if ( $opt_debug ) + { + print STDERR "debug: Extracted Tag Block: \n$Tag_Block\n"; } - + return 0; } ## ## Store a tag in the hash table, given a key and value ## @param $key - key -## @param $value - value +## @param $value - value ## sub storeTagInHash( $$ ) { my ( $key, $value ) = @_; my $rc = 0; - + if ( exists $Hash{ $key } ) { print STDOUT "ERROR: duplicate tag \"$key\" \n"; @@ -767,23 +844,23 @@ sub storeTagInHash( $$ ) { $Hash{ $key } = $value; } - + if ( $opt_debug ) { print STDERR "storetag: $key = $Hash{ $key }\n"; } - + return $rc; -} +} ## ## process a tag block from the caller -## Note that this is passed a reference to the -## original array so that we can shift the array +## Note that this is passed a reference to the +## original array so that we can shift the array ## as we use up lines. sub processBlock( $ ) { my (@tag_block) = @{$_[0]}; # this is actually a copy my %localhash = (); - + while ( $_ = shift( @{$_[0]} ) ) ##@tag_block) ) { chomp; @@ -793,52 +870,52 @@ sub processBlock( $ ) if ( $opt_debug ) { print "$_ : done.\n"; } last; } - + if ( m/\@substepnum/ ) { s/^\@substepnum\s+//; #storeTagInHash( \%localhash, "substepnum", $_ ); $localhash{'substepnum'} = $_; } - + if ( m/\@substepname/ ) { s/^\@substepname\s+//; #storeTagInHash( \%localhash, "substepname", $_ ); $localhash{'substepname'} = $_; - } - + } + if ( m/\@substepdesc/ ) { s/^\@substepdesc\s+//; #storeTagInHash( \%localhash, "substepdesc", $_ ); $localhash{'substepdesc'} = $_; - } - - + } + + if ( m/\@target_sched/ ) { s/^\@target_sched\s+//; #storeTagInHash( \%localhash, "target_sched", $_ ); $localhash{'target_sched'} = $_; - } + } } - + ## Store results in %Hash using keys like "<key>:<substepnum>" - ## Keep it easy and flat. + ## Keep it easy and flat. if ( ( exists $localhash{'substepname'} ) && ( exists $localhash{'substepnum' } ) ) { - my $num = sprintf( "%2.2d", int($localhash{'substepnum'}) ); + my $num = sprintf( "%2.2d", int($localhash{'substepnum'}) ); $Hash{ "substepname:$num"}= $localhash{'substepname'}; $Hash{ "substepnum:$num"}= $localhash{'substepnum'}; - + if (exists $localhash{'substepdesc'} ) { $Hash{ "substepdesc:$num"}= $localhash{'substepdesc'}; } - + if (exists $localhash{'target_sched'} ) { $Hash{ "target_sched:$num"}= $localhash{'target_sched'}; @@ -847,8 +924,8 @@ sub processBlock( $ ) else { print STDOUT "Incomplete tag block for $localhash{'substepname'}\n"; - - } + + } } ## @@ -857,23 +934,23 @@ sub processBlock( $ ) sub backupOldFile( $ ) { my $backupFileName = shift; - - if ( $opt_debug ) - { - print STDERR "backing up $backupFileName, if necessary...\n"; + + if ( $opt_debug ) + { + print STDERR "backing up $backupFileName, if necessary...\n"; } - + if ( -e $backupFileName ) { my $ts = `date +%Y-%m-%d.%H%M`; chomp $ts; my $old_file = "$backupFileName.org_$ts"; - print STDOUT " $backupFileName exists, renaming to $old_file\n"; + print STDOUT " $backupFileName exists, renaming to $old_file\n"; rename( $backupFileName, "$old_file" ); } } -## +## ## Apply all the tags that belong to the istep to a multiline string ## @docversion ## @istepname @@ -885,28 +962,28 @@ sub backupOldFile( $ ) ## Assumes that the istep tag values stored in the correct place in %Hash ## sub applyIstepTags -{ +{ my $str_ref = shift; - my $istepname = $Hash{'istepname'}; + my $istepname = $Hash{'istepname'}; my $istepnum = $Hash{'istepnum'}; my $docversion = $Hash{'docversion'}; my $istepdesc = $Hash{'istepdesc'}; my $upCaseistepname = toupper( $istepname ); my $timestamp = `date +%Y-%m-%d:%H%M`; chomp $timestamp; - + ${$str_ref} =~ s/\@timestamp/$timestamp/gmo; # replace "@@istepname" ${$str_ref} =~ s/\@\@istepname/$upCaseistepname/gmo; # replace "@istepname" ${$str_ref} =~ s/\@istepname/$istepname/gmo; # replace "istepnum" - ${$str_ref} =~ s/\@istepnum/$istepnum/gmo; + ${$str_ref} =~ s/\@istepnum/$istepnum/gmo; # replace "@istepdesc" - ${$str_ref} =~ s/\@istepdesc/$istepdesc/gmo; + ${$str_ref} =~ s/\@istepdesc/$istepdesc/gmo; # replace "@docversion" - ${$str_ref} =~ s/\@docversion/$docversion/gmo; - + ${$str_ref} =~ s/\@docversion/$docversion/gmo; + } ## @@ -919,57 +996,58 @@ sub createIstepHFile( ) { my $istepname = $Hash{'istepname'}; my $istepHfile = "$istepDir/$istepname.H"; - + print STDOUT "Create file $istepHfile...\n"; - + ## @todo sanity check - $istepDir should be src/usr/hwpf/hwp/<@istepname>/ - + backupOldFile( $istepHfile ); - + open( HFH, "> $istepHfile") or die " $? : can't open $istepHfile : $!"; - + ## apply all the istep tags to the header applyIstepTags( \$templateHFileHdr ); - + ## add the original tag block as comments. - my $cleaned_up_tag_block = $Tag_Block; - chomp $cleaned_up_tag_block; - $cleaned_up_tag_block =~ s/^/ * /gmo; - $templateHFileHdr =~ s/\@tag_block/$cleaned_up_tag_block/gmo; - + ## my $cleaned_up_tag_block = $Tag_Block; + ## chomp $cleaned_up_tag_block; + ## $cleaned_up_tag_block =~ s/^/ * /gmo; + ## $templateHFileHdr =~ s/\@tag_block/$cleaned_up_tag_block/gmo; + $templateHFileHdr =~ s/\@tag_block/$Extracted_Tag_Block/gmo; + print HFH "$templateHFileHdr\n"; - + ## generate substeps my @substepnames = sort grep /substepname/, ( keys %Hash ); - my @substepnums = sort grep /substepnum/, ( keys %Hash ); - my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); + my @substepnums = sort grep /substepnum/, ( keys %Hash ); + my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); if ( $opt_debug ) { - + print "$istepname.H file: @substepnames\n"; print STDERR "substeps last index = $#substepnames.\n"; } - - ## write each substep section - for ( my $i=0; $i<=$#substepnames; $i++ ) + + ## write each substep section + for ( my $i=0; $i<=$#substepnames; $i++ ) { ## make a local copy to modify my $templateHSS = $templateHFileSubStep; applyIstepTags( \$templateHSS ); - + # replace "@substepname" $templateHSS =~ s/\@substepname/$Hash{$substepnames[$i]}/gmo; # replace "substepnum" - $templateHSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; + $templateHSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; # replace "@substepdesc" - $templateHSS =~ s/\@substepdesc/$Hash{$substepdescs[$i]}/gmo; - + $templateHSS =~ s/\@substepdesc/$Hash{$substepdescs[$i]}/gmo; + print HFH "\n$templateHSS\n"; } - - print HFH "$templateHFileTrailer\n"; - - + + print HFH "$templateHFileTrailer\n"; + + close HFH; } @@ -981,142 +1059,162 @@ sub createIstepHFile( ) ## Instead, it will rename the old file to <file>.org_YYYY.MM.DD:HHDD ## sub createIstepCFile( ) -{ - my $istepname = $Hash{'istepname'}; +{ + my $istepname = $Hash{'istepname'}; my $istepCfile = "$istepDir/$istepname.C"; - - print STDOUT "Create file $istepCfile...\n"; - + + print STDOUT "Create file $istepCfile...\n"; + ## sanity check - $istepDir should be src/usr/hwpf/hwp/<@istepname>/ - + backupOldFile( $istepCfile ); open( CFH, "> $istepCfile") or die " $? : can't open $istepCfile : $!"; - + applyIstepTags( \$templateCFileHdr ); print CFH "$templateCFileHdr"; - + ## generate substeps my @substepnames = sort grep /substepname/, ( keys %Hash ); - my @substepnums = sort grep /substepnum/, ( keys %Hash ); - my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); + my @substepnums = sort grep /substepnum/, ( keys %Hash ); + my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); if ( $opt_debug ) { - + print "$istepname.C file: @substepnames\n"; print STDERR "substeps last index = $#substepnames\n"; } - + ## Write the lines to include the hwp h file - for ( my $i=0; $i<=$#substepnames; $i++ ) + for ( my $i=0; $i<=$#substepnames; $i++ ) { ## Write the line to include the hwp h file - print CFH "// #include \"$Hash{$substepnames[$i]}/$Hash{$substepnames[$i]}.H\"\n"; - } - + print CFH "// #include \"$Hash{$substepnames[$i]}/$Hash{$substepnames[$i]}.H\"\n"; + } + applyIstepTags( \$templateCFileNSHdr ); - print CFH "$templateCFileNSHdr\n"; - - ## write each substep section - for ( my $i=0; $i<=$#substepnames; $i++ ) + print CFH "$templateCFileNSHdr\n"; + + ## write each substep section + for ( my $i=0; $i<=$#substepnames; $i++ ) { ## make a local copy to modify my $templateCSS = $templateCFileSubStep; applyIstepTags( \$templateCSS ); - + # replace "@substepname" $templateCSS =~ s/\@substepname/$Hash{$substepnames[$i]}/gmo; # replace "substepnum" - $templateCSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; + $templateCSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; # replace "@substepdesc" - $templateCSS =~ s/\@substepdesc/$Hash{$substepdescs[$i]}/gmo; - + $templateCSS =~ s/\@substepdesc/$Hash{$substepdescs[$i]}/gmo; + print CFH "\n$templateCSS\n"; } - + print CFH "$templateCFileTrailer"; - + close( CFH ); } ## -## 3. [ ] Make a new istep<@istepnum>list.H file in /usr/include/isteps/ -## Add the new istep<@istepnum>list.H file to -## src/include/usr/istepmasterlist.H in the correct place in the -## master istep list. +## Make a new istep<@istepnum>list.H file in /usr/include/isteps/ +## Add the new istep<@istepnum>list.H file to +## src/include/usr/istepmasterlist.H in the correct place in the +## master istep list. ## sub createIstepListFile( ) { my $istepname = $Hash{'istepname'}; - my $istepnum = $Hash{'istepnum'}; + my $istepnum = $Hash{'istepnum'}; my $istepLfile = $istepListDir . "/istep" . $istepnum . "list.H"; - - print STDOUT "Create file $istepLfile...\n"; - + + print STDOUT "Create file $istepLfile...\n"; + ## sanity check - $istepListDir should be src/include/usr/isteps - + backupOldFile( $istepLfile ); - + open( LFH, "> $istepLfile") or die " $? : can't open $istepLfile : $!"; - + applyIstepTags( \$templateListFileHdr1 ); print LFH "$templateListFileHdr1"; - + ## generate substeps my @substepnames = sort grep /substepname/, ( keys %Hash ); - my @substepnums = sort grep /substepnum/, ( keys %Hash ); - my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); + my @substepnums = sort grep /substepnum/, ( keys %Hash ); + my @substepdescs = sort grep /substepdesc/, ( keys %Hash ); if ( $opt_debug ) { - + print "$istepname.C file: @substepnames\n"; print STDERR "substeps last index = $#substepnames\n"; } - + ## write the documentation lines in the istepNlist file - for ( my $i=0; $i<=$#substepnames; $i++ ) + for ( my $i=0; $i<=$#substepnames; $i++ ) { - print LFH " * $istepnum.$Hash{$substepnums[$i]}\t $Hash{$substepnames[$i]}\n"; - print LFH " * \t$Hash{$substepdescs[$i]}\n"; + print LFH " * $istepnum.$Hash{$substepnums[$i]} $Hash{$substepnames[$i]}\n"; + print LFH " * $Hash{$substepdescs[$i]}\n"; } - + applyIstepTags( \$templateListFileHdr2 ); print LFH "$templateListFileHdr2"; - - - ## write each substep section - for ( my $i=0; $i<=$#substepnames; $i++ ) + + + ## write each substep section + for ( my $i=0; $i<=$#substepnames; $i++ ) { ## make a local copy to modify - my $templateLSS = $templateListFileSS; + ## @todo check for @internal tag and use templateListFileSS2 + my $templateLSS = $templateListFileSS1; applyIstepTags( \$templateLSS ); - + # replace "@substepname" $templateLSS =~ s/\@substepname/$Hash{$substepnames[$i]}/gmo; - # replace "substepnum" - $templateLSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; + # replace "substepnum" with 2 digits & leading 0's + my $pad_substep = sprintf( "%02d", $Hash{$substepnums[$i]} ); + ## $templateLSS =~ s/\@substepnum/$Hash{$substepnums[$i]}/gmo; + $templateLSS =~ s/\@substepnum/$pad_substep/gmo; # replace "@substepdesc" $templateLSS =~ s/\@substepdesc/$Hash{$substepdescs[$i]}/gmo; - - ## @todo - the substep indices have to start with 0, but of course - ## the substeps start at 1. We have to compensate for this - ## with a special tag... - ## This needs to be fixed by modifying lookupTask, etc., in the - ## istepDispatcher - # replace "@-substepnum" - my $hackedSSnum = $Hash{$substepnums[$i]} - 1; - $templateLSS =~ s/\@-substepnum/$hackedSSnum/gmo; - + print LFH "\n$templateLSS\n"; } - + applyIstepTags( \$templateListFileTrailer ); print LFH "$templateListFileTrailer"; - - + + close LFH; } +## +## Make up new makefile src/usr/hwpf/hwp/<@istepname>/makefile to +## compile the HWP and wrapper +## +sub createMakefile( ) +{ + my $istepname = $Hash{'istepname'}; + my $istepMakefile = "$istepDir/makefile"; + + print STDOUT "Create file $istepMakefile...\n"; + + ## @todo sanity check - $istepDir should be src/usr/hwpf/hwp/<@istepname>/ + + backupOldFile( $istepMakefile ); + + open( MFH, "> $istepMakefile") or die " $? : can't open $istepMakefile : $!"; + + ## apply all the istep tags to the header + applyIstepTags( \$templateMakeFile ); + + print MFH "$templateMakeFile\n"; + + close MFH; +} + + __END__ diff --git a/src/build/vpo/VBU_Cacheline.pm b/src/build/vpo/VBU_Cacheline.pm index 596e7fcde..af9a502a1 100755 --- a/src/build/vpo/VBU_Cacheline.pm +++ b/src/build/vpo/VBU_Cacheline.pm @@ -22,13 +22,13 @@ # # IBM_PROLOG_END # -# Name: hb-modify-cacheline.pm +# Name: src/build/vpo/VBU_Cacheline.pm # -# Purpose: routines for reading and writing a 64-bit value into L3 in an +# Purpose: routines for reading and writing a 64-bit value into L3 in an # AWAN session. Accepts an address into L3, and 64-bit data hex word # (write). -# VBU can only read/write to memory in 128-byte cachelines, so if -# we want to write a memory location we must read in the entire +# VBU can only read/write to memory in 128-byte cachelines, so if +# we want to write a memory location we must read in the entire # cacheline, modify the correct byte(s) and then write it back. # Called from shell script do_p8vbu_script_hbi* # Written in perl because that is what is being used for the debug @@ -43,7 +43,7 @@ require Exporter; our @ISA = qw( Exporter ); our @EXPORT = qw( CLread CLwrite RunClocks P8_Ins_Start P8_Ins_Stop P8_Ins_Query SetFlags); - + #------------------------------------------------------------------------------ # Specify perl modules to use #------------------------------------------------------------------------------ @@ -76,17 +76,17 @@ my $curDir = getcwd(); my $CLfile = "$curDir/istepmodereg.dma"; my $CORE = "-c3"; -## my $SIM_CLOCKS = "4000000"; -## my $SIM_CLOCKS = "2000000"; -my $SIM_CLOCKS = "3000000"; +## my $SIM_CLOCKS = "4000000"; +## my $SIM_CLOCKS = "2000000"; +my $SIM_CLOCKS = "3000000"; ############################################# ## Internal Globals ############################################# my $CLdebug = 0; -my $CLtest = 0; +my $CLtest = 0; -## flushed Flag, if 0, it means the L2 cache has not been flushed. +## flushed Flag, if 0, it means the L2 cache has not been flushed. ## It must be flushed once before doing L3 reads my $L2_Flushed = 0; @@ -106,72 +106,72 @@ my $FLUSHQUERY = "$vbuToolsDir/p8_check_l3"; my $RUNCLKSCMD = "simclock"; ## @todo $$$$$ -## NOTE: need to be able to specify thread (-t ) and core (-c ), they -## should not be hardwired -##my $QUERYCMD = "$vbuToolsDir/proc_thread_control.x86 -query $CORE -t0"; +## NOTE: need to be able to specify thread (-t ) and core (-c ), they +## should not be hardwired +##my $QUERYCMD = "$vbuToolsDir/proc_thread_control.x86 -query $CORE -t0"; ##my $STOPCMD = "$vbuToolsDir/proc_thread_control.x86 -stop $CORE -tall"; ##my $STARTCMD = "$vbuToolsDir/proc_thread_control.x86 -start $CORE -tall"; ## Jim McGuire's older versions. -my $QUERYCMD = "/gsa/pokgsa/home/m/c/mcguirej/public/auto/rel/P8bin/p8_ins_query"; +my $QUERYCMD = "/gsa/pokgsa/home/m/c/mcguirej/public/auto/rel/P8bin/p8_ins_query"; my $STOPCMD = "/gsa/pokgsa/home/m/c/mcguirej/public/auto/rel/P8bin/p8_ins_stop"; my $STARTCMD = "/gsa/pokgsa/home/m/c/mcguirej/public/auto/rel/P8bin/p8_ins_start"; my $RESETCMD = "$vbuToolsDir/proc_thread_control.x86 -sreset_auto $CORE"; -## +## #============================================================================== # SUBROUTINES #============================================================================== ## -## Read the cacheline at addr from L3 and dump it to a binary file. -## Assumes that the input address is a binary addr on a 128 byte boundary +## Read the cacheline at addr from L3 and dump it to a binary file. +## Assumes that the input address is a binary addr on a 128 byte boundary ## sub readcacheline( $ ) { - my ( $addr ) = @_; + my ( $addr ) = @_; my $cmd; ## my $hexaddr = sprintf( "0x%x", $addr ); - my $hexaddr = sprintf( "%x", $addr ); - + my $hexaddr = sprintf( "%x", $addr ); + if ( $CLdebug ) { print STDERR __LINE__, "-- Read cacheline at $hexaddr...\n"; } - + ## Stop simulation so we can read L3 properly - P8_Ins_Stop(); - + ## $$ P8_Ins_Stop(); + ## flush L2 if necessary - P8_Flush_L2(); - + ## $$ P8_Flush_L2(); + $cmd = "$DUMPCMD $hexaddr 1 -f $CLfile -b $CORE"; - if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } - ( system( $cmd ) == 0 ) + if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } + ( system( $cmd ) == 0 ) or die "$cmd failed $? : $! \n"; - - ## Start simulation back up. - ## P8_Ins_Start(); - + + ## Start simulation back up. + ## P8_Ins_Start(); + } ## ## derived from Perl Cookbook, 8.13 ## pack/unpack format is unsigned big endian 32-bit hi, lo -## however, the input data from getopts still assumes that perl is compiled +## however, the input data from getopts still assumes that perl is compiled ## for 64-bit #s ## sub modifycacheline( $$ ) { my ( $offset, $data ) = @_; - + my $typedef = 'N N'; # 2 32-bit network order my $sizeof = length( pack($typedef,() ) ); my $filesize = -s $CLfile; my $buffer; - + open( FH, "+< $CLfile") or die "can't open $CLfile : $!"; - binmode FH; ## not really necessary, but.... + binmode FH; ## not really necessary, but.... seek( FH, $offset, SEEK_SET) or die "seek $CLfile failed: $!"; read( FH, $buffer, $sizeof) == $sizeof or die "read failed: $!"; @@ -186,13 +186,13 @@ sub modifycacheline( $$ ) seek( FH, -$sizeof, SEEK_CUR) or die "seek $CLfile failed: $!"; print FH $buffer; - - close( FH ) or die "close $CLfile failed: $!"; -} + + close( FH ) or die "close $CLfile failed: $!"; +} ## ## Write modified file back to L3 cacheline. -## This assumes that addr has already been converted to binary addr on a +## This assumes that addr has already been converted to binary addr on a ## 128 byte boundary ## sub writecacheline( $ ) @@ -200,20 +200,20 @@ sub writecacheline( $ ) my ( $addr ) = @_; my $cmd; ## my $hexaddr = sprintf( "0x%x", $addr ); - my $hexaddr = sprintf( "%x", $addr ); + my $hexaddr = sprintf( "%x", $addr ); ## Stop simulation so we can write L3 P8_Ins_Stop(); - + $cmd = "$LOADCMD -o $hexaddr -f $CLfile -b $CORE"; - if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } - ( system( $cmd ) == 0 ) + if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } + ( system( $cmd ) == 0 ) or die "$cmd failed, $? : $! \n"; - + ## Start sim back up ## P8_Ins_Start(); - -} + +} ## @@ -223,20 +223,20 @@ sub P8_Ins_Query() { my $cmd = "$QUERYCMD"; my $retstr = ""; - - if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } - + + if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } + ## execute it with backticks so we can get the output. - $retstr = `$cmd`; + $retstr = `$cmd`; if ( $? != 0 ) { die "$cmd failed $? : $! \n"; } - + if ( ($retstr =~ m/Quiesced/) || ($retstr =~ m/STOPPED/) - ) + ) { return "STOPPED"; } - elsif ( ($retstr =~ m/Running/) + elsif ( ($retstr =~ m/Running/) ||($retstr =~ m/RUNNING/) ) { @@ -245,7 +245,7 @@ sub P8_Ins_Query() else { die "invalid string \"$retstr\" from P8_Ins_Query\n"; - } + } } @@ -255,26 +255,26 @@ sub P8_Ins_Query() sub P8_Ins_Start() { my $cmd = "$STARTCMD"; - + if ( P8_Ins_Query() eq "STOPPED" ) { - if ( !$CLdebug ) + if ( !$CLdebug ) { $cmd .= " -quiet"; } else - { print STDERR __LINE__, "-- run $cmd ...\n"; } + { print STDERR __LINE__, "-- run $cmd ...\n"; } - ( system( $cmd ) == 0 ) + ( system( $cmd ) == 0 ) or die "$cmd failed $? : $! \n"; - + ## reset the flushFlag, need to flush again before a read. $L2_Flushed = 0; } else { if ($CLdebug) { print STDERR __LINE__, "-- P8_Ins_Start: already RUNNING\n"; } - } - + } + } @@ -284,31 +284,31 @@ sub P8_Ins_Start() sub P8_Ins_Stop() { my $cmd = "$STOPCMD"; - + if ( P8_Ins_Query() eq "RUNNING" ) - { + { if ( ! $CLdebug ) { $cmd .= " -quiet"; } else { print STDERR __LINE__, "-- run $cmd ...\n"; } - - ( system( $cmd ) == 0 ) + + ( system( $cmd ) == 0 ) or die "$cmd failed $? : $! \n"; - + } else { if ($CLdebug) { print STDERR __LINE__, "-- P8_Ins_Stop: already STOPPED\n"; } - } - + } + } ## -## Check if cache is flushed. +## Check if cache is flushed. ## $TODO -## p8_check_L3 will scan the L3 directory for unfilled cachelines and +## p8_check_L3 will scan the L3 directory for unfilled cachelines and ## return a string: -## $ p8_check_l3 100 4 -c3 -f $labhome/foo -x -o +## $ p8_check_l3 100 4 -c3 -f $labhome/foo -x -o ## p8_check_l3 - address (0x100) not found in L3 directory. ## ## $ p8_check_l3 100 4 -c3 -f $labhome/foo -x -o @@ -320,41 +320,41 @@ sub P8_Check_Flushed my $tmpfile = "./tmpflush"; my $cmd = "$FLUSHQUERY"; my $rc = 0; - + ## execute it with backticks so we can get the output. - my $retstr = `$cmd $CORE -f $tmpfile -x -o`; + my $retstr = `$cmd $CORE -f $tmpfile -x -o`; if ( $? != 0 ) { die "$cmd failed $? : $! \n"; } - + chomp( $retstr ); - + if ( $retstr =~ /^.*.all addresses.*/ ) { $rc = 1; } - + return $rc; } ## ## Flush L2 Cache -## This only needs to be done once after the clock is stopped, +## This only needs to be done once after the clock is stopped, ## thus the toggle flag ## sub P8_Flush_L2() { my $cmd = "$FLUSHCMD"; - - if ( !$L2_Flushed ) - { - if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } - ( system( $cmd ) == 0 ) + + ## if ( !$L2_Flushed ) + ##{ + if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } + ( system( $cmd ) == 0 ) or die "$cmd failed $? : $! \n"; - - ## mark the CPU as flushed. - $L2_Flushed = 1; - } - if ($CLdebug) { print STDERR __LINE__, "-- P8_FLush_L2 : $L2_Flushed\n"; } + ## ## mark the CPU as flushed. + ## $L2_Flushed = 1; + ## } + ## + ##if ($CLdebug) { print STDERR __LINE__, "-- P8_FLush_L2 : $L2_Flushed\n"; } } @@ -365,26 +365,26 @@ sub P8_Flush_L2() sub RunClocks() { my $cmd = 0; - + if ( $CLdebug ) { printf STDERR __LINE__, "-- RunClocks()\n"; } - + ## Check, and start instructions if necessary if ( P8_Ins_Query( ) ne "RUNNING" ) { - + P8_Ins_Start(); } $cmd = "$RUNCLKSCMD $SIM_CLOCKS -quiet"; - if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } - ( system( $cmd ) == 0 ) - or die "$cmd failed, $? : $! \n"; - -} + if ( $CLdebug ) { print STDERR __LINE__, "-- run $cmd ...\n"; } + ( system( $cmd ) == 0 ) + or die "$cmd failed, $? : $! \n"; + +} ## -## Read a 64-bit value from L3 at hex addr. +## Read a 64-bit value from L3 at hex addr. ## Input is expected to be a hex ascii string ## sub CLread( $ ) @@ -394,9 +394,9 @@ sub CLread( $ ) my $CLbase = ( hex($addr) & 0xffffff80); my $CLoffset = ( hex($addr) & (~0xffffff80) ); my $result = 0; ## 64-bit hex - + if ( $CLdebug ) { printf STDERR __LINE__, "-- CLread( %s ) : CLbase=0x%x, CLoffset=0x%x\n", $addr, $CLbase, $CLoffset } - + readcacheline( $CLbase ); ## extract quadword from cacheline file @@ -405,24 +405,24 @@ sub CLread( $ ) my $filesize = -s $CLfile; my $buffer; open( FH, "+< $CLfile") or die "can't open $CLfile : $!"; - binmode FH; ## not really necessary, but.... + binmode FH; ## not really necessary, but.... seek( FH, $CLoffset, SEEK_SET) or die "seek $CLfile failed: $!"; read( FH, $buffer, $sizeof) == $sizeof or die "read failed: $!"; - close( FH ) or die "close $CLfile failed: $!"; - + close( FH ) or die "close $CLfile failed: $!"; + ## unpack and reassemble as big-endian - ( my $hi, my $lo ) = unpack($typedef, $buffer); + ( my $hi, my $lo ) = unpack($typedef, $buffer); $result = ( ( ( $hi << 32 ) & 0xffffffff00000000 ) | $lo ); - - if ( $CLdebug ) - { - printf STDERR __LINE__, "-- CLread( %s ) = 0x%lx ", $addr, $result; + + if ( $CLdebug ) + { + printf STDERR __LINE__, "-- CLread( %s ) = 0x%lx ", $addr, $result; dumpcacheline(" " ); } - return ( $result ); + return ( $result ); } - + ## ## Write command byte to cacheline ## Inputs are expected to be hex ascii strings @@ -434,8 +434,8 @@ sub CLwrite( $$ ) my $CLoffset = ( hex($addr) & (~0xffffff80) ); my $CLdata = hex($data); my $result = 0; - - if ( $CLdebug ) { printf STDERR __LINE__, "-- CLwrite( %s, %s ) : CLbase=0x%x, CLoffset=0x%x, CLdata=0x%lx\n", + + if ( $CLdebug ) { printf STDERR __LINE__, "-- CLwrite( %s, %s ) : CLbase=0x%x, CLoffset=0x%x, CLdata=0x%lx\n", $addr, $data, $CLbase, $CLoffset, $CLdata; } ## clear the cacheline file @@ -445,49 +445,49 @@ sub CLwrite( $$ ) readcacheline( $CLbase ); ## dumpcacheline( "after read", $CLfile ); - + ## modify the cacheline file modifycacheline( $CLoffset, $data ); ## dumpcacheline( "after modify", $CLfile ); ## write the cacheline back to L3 - writecacheline( $CLbase ); + writecacheline( $CLbase ); if ( $CLdebug ) { ## check, clear the cacheline file and read again system( "rm -f $CLfile" ); readcacheline( $CLbase ); - dumpcacheline( "Readback", $CLfile ); - } - + dumpcacheline( "Readback", $CLfile ); + } + } sub dumpcacheline() { my ( $comment ) = @_; - - if ( $CLdebug ) - { - print STDERR __LINE__, "-- $comment, dump cache file :\n"; - system( "xxd $CLfile" ); - } - + + if ( $CLdebug ) + { + print STDERR __LINE__, "-- $comment, dump cache file :\n"; + system( "xxd $CLfile" ); + } + } sub SetFlags( $$ ) { my ( $debug, $test ) = @_; - + $CLdebug = $debug; $CLtest = $test; - - if ( $CLdebug ) - { - print STDERR __LINE__, "-- CLdebug=$CLdebug, CLtest=$CLtest\n"; - } + + if ( $CLdebug ) + { + print STDERR __LINE__, "-- CLdebug=$CLdebug, CLtest=$CLtest\n"; + } } diff --git a/src/build/vpo/hb-istep b/src/build/vpo/hb-istep index 38ba578f9..6f586feac 100755 --- a/src/build/vpo/hb-istep +++ b/src/build/vpo/hb-istep @@ -87,6 +87,9 @@ use constant SPLESS_SINGLE_ISTEP_CMD => 0x00; use constant SPLESS_RESUME_ISTEP_CMD => 0x01; use constant SPLESS_CLEAR_TRACE_CMD => 0x02; +use constant MAX_ISTEPS => 25; +use constant MAX_SUBSTEPS => 25; + #------------------------------------------------------------------------------ # Globals @@ -103,11 +106,11 @@ my $opt_cmdfile = 0; ## batchmode, later my $opt_setup = ""; ## run Jim's script to start up the model my @inList; -$inList[10][10] = (); +$inList[MAX_ISTEPS][MAX_SUBSTEPS] = (); ## initialize inList to "undefined" -for( my $i = 0; $i <= $#inList; $i++) +for( my $i = 0; $i < MAX_ISTEPS; $i++) { - for(my $j = 0; $j <= $#inList; $j++) + for(my $j = 0; $j < MAX_SUBSTEPS; $j++) { undef( $inList[$i][$j] ); } @@ -222,8 +225,7 @@ if ( $opt_debug ) print STDERR "shutdownflag reg = $shutdownflag\n"; print STDERR "shutdownsts reg = $shutdownsts\n"; - VBU_Cacheline::SetFlags( 1, 0 ); - + VBU_Cacheline::SetFlags( 1, 0 ); } if ( $opt_help ) @@ -265,6 +267,7 @@ sub main() { print STDOUT "Setting P8 Instructions to STOPPED.\n"; VBU_Cacheline::P8_Ins_Stop(); + VBU_Cacheline::P8_Flush_L2(); } ( my $flag, my $sts ) = getShutDownStatus(); @@ -340,9 +343,9 @@ sub printUsage() print STDOUT " [--command <foo>..<bar>] (run named isteps \"foo\" through \"bar\")\n" ; print STDOUT " [--resume] (resume an istep that is at a break point)\n" ; print STDOUT "\n" ; + print STDOUT " [--clear-trace] (clear trace buffers before starting)\n"; ## print STDOUT " [--cmdfile] (get commands from a batchfile)\n"; ## print STDOUT " [--setup] (bring up AWAN and wait for further commands)\n"; -## print STDOUT " [--clear-trace] (clear trace buffers before starting)\n"; ## print STDOUT "\n" ; } @@ -374,9 +377,13 @@ sub get_istep_list() chomp; ( $istep, $substep, $name) = split( ",", $_ ); + chomp $name; ## print STDERR "$_, $istep, $substep, $name\n" ; - $inList[$istep][$substep] = $name; + if ( defined($name) && ( $name ne "" ) ) + { + $inList[$istep][$substep] = $name; + } } close( FH ); @@ -393,12 +400,12 @@ sub print_istep_list( ) print STDOUT " IStep Name\n"; print STDOUT "---------------------------------------------------\n"; - for(my $i = 4; $i <= $#inList; $i++) + for(my $i = 0; $i < MAX_ISTEPS; $i++) { - for(my $j = 0; $j <= $#inList; $j++) + for(my $j = 0; $j < MAX_SUBSTEPS; $j++) { - ## print all substeps - # print "==$inList[$i][$j] \n"; + + ## print "==$i.$j $inList[$i][$j] \n"; if ( defined( $inList[$i][$j] ) ) { if ( $hdrflag ) @@ -422,9 +429,9 @@ sub find_in_inList( $ ) { my ( $substepname ) = @_; - for(my $i = 0; $i <= $#inList; $i++) + for(my $i = 0; $i < MAX_ISTEPS; $i++) { - for(my $j = 0; $j <= $#inList; $j++) + for(my $j = 0; $j < MAX_SUBSTEPS; $j++) { ## if ( defined($inList[$i][$j]) ) { print ".$inList[$i][$j]?$substepname. \n"; } @@ -436,7 +443,7 @@ sub find_in_inList( $ ) } } - return ( $#inList, $#inList, 0 ) + return ( MAX_ISTEPS, MAX_SUBSTEPS, 0 ) } ## @@ -466,23 +473,46 @@ sub getSyncStatus( ) my $count = 1000; my $result = 0; my $seqnum = 0; + my $running = 0; ## get response. sendCmd() should have bumped g_SeqNum, so we will sit ## here for a reasonable amount of time waiting for the correct sequence ## number to come back. while(1) { + + ## advance HostBoot code by a certain # of cycles, then check the ## sequence number to see if it has changed. rinse and repeat. + ## Note: RunClocks will start instructions VBU_Cacheline::RunClocks(); + + ## Stop instructions, flush L2 + VBU_Cacheline::P8_Ins_Stop(); + VBU_Cacheline::P8_Flush_L2(); + ## dump printk similar to the Jim McGuire's script ## NOPE, CRASHES AWAN dumpPrintk(); - $result = VBU_Cacheline::CLread( $statusreg ); - $seqnum = ( ( $result & 0x3f00000000000000 ) >> 56 ); - if ( $seqnum == $g_SeqNum ) + ## check for system crash + my ( $flag, $status ) = getShutDownStatus(); + if ( $flag ) + { + print STDOUT "HostBoot has shut down with status $status"; + return -1; + } + + $result = VBU_Cacheline::CLread( $statusreg ); + + printf STDERR "===== count=%d, result=0x%lx\n", $count, $result ; + + $seqnum = ( ( $result & 0x3f00000000000000 ) >> 56 ); + $running = ( ( $result & 0x8000000000000000 ) >> 63 ); + ## if ( ( $running == 0 ) + ## && ( $seqnum == $g_SeqNum ) + if ( $seqnum == $g_SeqNum ) { return $result; } @@ -552,9 +582,18 @@ sub runIStep( $$ ) } else { - printf STDOUT "Istep %d.%d returned Status: 0x%x\n", $stsIStep, $stsSubstep, $istepStatus ; + printf STDOUT "Istep %d.%d returned Status: 0x%x", $stsIStep, $stsSubstep, $istepStatus ; + if ( $istepStatus == 0xa ) + { + printf STDOUT ": not implemented yet.\n"; + } + else + { + printf STDOUT "\n"; + } } - print STDOUT "-----------------------------------------------------------------\n"; + + print STDOUT "-------------------------------------------------------------- $g_SeqNum\n"; } } @@ -568,13 +607,6 @@ sub sCommand( $ ) my $i = $scommand; my $j = 0; - # sanity check - if ( !defined($inList[$i][0]) ) - { - printf STDOUT "IStep %d.0 does not exist.\n", $i; - return -1; - } - # execute all the substeps in the IStep for( $j=0; $j<$#inList; $j++ ) { @@ -658,7 +690,10 @@ sub parse_command( $ ) for( my $y=$substepM; $y<$substepN+1; $y++ ) { ## print STDOUT "run $x $y $inList[$x][$y]\n"; - runIStep( $x, $y ); + if ( defined( $inList[$x][$y] ) ) + { + runIStep( $x, $y ); + } } } @@ -709,6 +744,20 @@ sub setMode( $ ) ## advance HostBoot code by a certain # of cycles, then check the ## sequence number to see if it has changed. rinse and repeat. VBU_Cacheline::RunClocks(); + + ## Stop instructions, flush L2 + VBU_Cacheline::P8_Ins_Stop(); + VBU_Cacheline::P8_Flush_L2(); + + + + ## check for system crash + my ( $flag, $status ) = getShutDownStatus(); + if ( $flag ) + { + print STDOUT "HostBoot has shut down with status $status"; + return -1; + } $result = VBU_Cacheline::CLread( $statusreg ); diff --git a/src/include/usr/isteps/istep06list.H b/src/include/usr/isteps/istep06list.H index cdcb8b8dc..b2cfe7328 100644 --- a/src/include/usr/isteps/istep06list.H +++ b/src/include/usr/isteps/istep06list.H @@ -57,33 +57,79 @@ namespace INITSERVICE * */ const TaskInfo g_istep06[] = { + { + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + { + ISTEPNAME(06,01,"host_setup"), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + { + ISTEPNAME(06,02,"host_istep_enable"), + NULL, + { + NONE, + EXT_IMAGE, + } + }, - // @ todo isteps are numbered wrong to match up with hb-istep - - // need to add stubs for the other substeps { - ISTEPNAME(06,00,"host_init_fsi"), // substep name - HWAS::host_init_fsi, // pointer to fn + ISTEPNAME(06,03,"host_init_fsi"), // substep name + HWAS::host_init_fsi, // pointer to fn { - START_FN, // task type - EXT_IMAGE, // Extended Module + START_FN, // task type + EXT_IMAGE, // Extended Module } }, { - ISTEPNAME(06,01,"host_discover_targets"), // substep name - HWAS::host_discover_targets, // pointer to fn + ISTEPNAME(06,04,"set_ipl_parms"), + NULL, { - START_FN, // task type - EXT_IMAGE, // Extended Module + NONE, + EXT_IMAGE, } }, { - ISTEPNAME(06,02, "host_gard"), // substep name + ISTEPNAME(06,05,"host_discover_targets"), // substep name + HWAS::host_discover_targets, // pointer to fn + { + START_FN, // task type + EXT_IMAGE, // Extended Module + } + }, + { + ISTEPNAME(06,06, "host_gard"), // substep name HWAS::host_gard, // pointer to fn { START_FN, // task type EXT_IMAGE, // Extended Module } }, + { + ISTEPNAME(06,07,"host_cancontinue_clear"), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + { + ISTEPNAME(06,08,"proc_check_slave_sbe_seeprom_complete"), + NULL, + { + NONE, + EXT_IMAGE, + } + }, // END OF LIST! }; diff --git a/src/include/usr/isteps/istep07list.H b/src/include/usr/isteps/istep07list.H new file mode 100644 index 000000000..02e54670e --- /dev/null +++ b/src/include/usr/isteps/istep07list.H @@ -0,0 +1,123 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep07list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP07LIST_H +#define __ISTEPS_ISTEP07LIST_H + +/** + * @file istep07list.H + * + * IStep 07 Start Clocks On Nest Chiplets + * IPL FLow Doc v1.01 (03/26/12) + * + * 07.1 proc_a_x_pci_dmi_pll_setup + * : Setup PLL for A, X, PCIe, DMI + * 07.2 proc_startclock_chiplets + * : Start clocks on A, X, PCIe chiplets + * 07.3 proc_chiplet_scominit + * : Apply scom inits to chiplets + * 07.4 proc_scomoverride_chiplets + * : Apply sequenced scom inits + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1605 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep07[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(07,01,"proc_a_x_pci_dmi_pll_setup"), + START_CLOCKS_ON_NEST_CHIPLETS::call_proc_a_x_pci_dmi_pll_setup, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(07,02,"proc_startclock_chiplets"), + START_CLOCKS_ON_NEST_CHIPLETS::call_proc_startclock_chiplets, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(07,03,"proc_chiplet_scominit"), + START_CLOCKS_ON_NEST_CHIPLETS::call_proc_chiplet_scominit, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(07,04,"proc_scomoverride_chiplets"), + START_CLOCKS_ON_NEST_CHIPLETS::call_proc_scomoverride_chiplets, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep07TaskList = { + &(g_istep07[0]), + ( sizeof(g_istep07)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep08list.H b/src/include/usr/isteps/istep08list.H new file mode 100644 index 000000000..efe8104d9 --- /dev/null +++ b/src/include/usr/isteps/istep08list.H @@ -0,0 +1,147 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep08list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP08LIST_H +#define __ISTEPS_ISTEP08LIST_H + +/** + * @file istep08list.H + * + * IStep 08 EDI, EI Initialization + * IPL FLow Doc v1.01 (03/26/12) + * + * 08.1 fabric_erepair + * : Restore Fabric/EDI Bus eRepair data + * 08.2 fabric_io_dccal + * : Calibrate Fabric/EDI interfaces + * 08.3 fabric_io_run_training + * : Run training on internal buses + * 08.4 host_startPRD_pbus + * : Load PRD for powerbus domain + * 08.5 host_attnlisten_proc + * : Start listening for attentions + * 08.6 proc_fab_iovalid + * : Lower functional fences on local SMP + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1606 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep08[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(08,01,"fabric_erepair"), + EDI_EI_INITIALIZATION::call_fabric_erepair, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(08,02,"fabric_io_dccal"), + EDI_EI_INITIALIZATION::call_fabric_io_dccal, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(08,03,"fabric_io_run_training"), + EDI_EI_INITIALIZATION::call_fabric_io_run_training, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(08,04,"host_startPRD_pbus"), + EDI_EI_INITIALIZATION::call_host_startPRD_pbus, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(08,05,"host_attnlisten_proc"), + EDI_EI_INITIALIZATION::call_host_attnlisten_proc, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(08,06,"proc_fab_iovalid"), + EDI_EI_INITIALIZATION::call_proc_fab_iovalid, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep08TaskList = { + &(g_istep08[0]), + ( sizeof(g_istep08)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep09list.H b/src/include/usr/isteps/istep09list.H new file mode 100644 index 000000000..37b7190e2 --- /dev/null +++ b/src/include/usr/isteps/istep09list.H @@ -0,0 +1,87 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep09list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP09LIST_H +#define __ISTEPS_ISTEP09LIST_H + +/** + * @file istep09list.H + * + * IStep 09 Activate PowerBus + * IPL FLow Doc v1.01 (03/26/12) + * + * 09.1 proc_build_smp + * : Integrate PgP Islands into SMP + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1607 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/activate_powerbus/activate_powerbus.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep09[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(09,01,"proc_build_smp"), + ACTIVATE_POWERBUS::call_proc_build_smp, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep09TaskList = { + &(g_istep09[0]), + ( sizeof(g_istep09)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep10list.H b/src/include/usr/isteps/istep10list.H index fb3e9cb19..3c1a79e8c 100644 --- a/src/include/usr/isteps/istep10list.H +++ b/src/include/usr/isteps/istep10list.H @@ -29,7 +29,7 @@ * @file istep10list.H * * Step 10 Hostboot SBE Centaur Init - * IPL FLow Doc v0.99 (02/10/12) + * IPL FLow Doc v1.01 (03/26/12) * * Please see the note in initsvcstructs.H for description of * the ISTEPNAME macro. @@ -50,7 +50,15 @@ namespace INITSERVICE const TaskInfo g_istep10[] = { { - ISTEPNAME(10,00,"cen_sbe_tp_chiplet_init1"), + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + { + ISTEPNAME(10,01,"cen_sbe_tp_chiplet_init1"), SBE_CENTAUR_INIT::call_cen_sbe_tp_chiplet_init1, { START_FN, @@ -58,15 +66,15 @@ const TaskInfo g_istep10[] = { } }, { - ISTEPNAME( 10, 01, "cen_sbe_tp_arrayinit"), - SBE_CENTAUR_INIT::call_cen_sbe_tp_arrayinit, + ISTEPNAME( 10,02, "cen_sbe_npll_initf"), + SBE_CENTAUR_INIT::call_cen_sbe_npll_initf, { START_FN, EXT_IMAGE, } }, { - ISTEPNAME(10,02,"cen_sbe_tp_chiplet_init2"), + ISTEPNAME(10,03,"cen_sbe_tp_chiplet_init2"), SBE_CENTAUR_INIT::call_cen_sbe_tp_chiplet_init2, { START_FN, @@ -74,39 +82,40 @@ const TaskInfo g_istep10[] = { } }, { - ISTEPNAME(10,03,"cen_sbe_tp_chiplet_init3"), - SBE_CENTAUR_INIT::call_cen_sbe_tp_chiplet_init3, + ISTEPNAME(10,04,"cen_sbe_tp_arrayinit"), + SBE_CENTAUR_INIT::call_cen_sbe_tp_arrayinit, { START_FN, EXT_IMAGE, } }, { - ISTEPNAME(10,04,"cen_sbe_chiplet_init"), - SBE_CENTAUR_INIT::call_cen_sbe_chiplet_init, + ISTEPNAME(10,05,"cen_sbe_tp_chiplet_init3"), + SBE_CENTAUR_INIT::call_cen_sbe_tp_chiplet_init3, { START_FN, EXT_IMAGE, } }, { - ISTEPNAME(10,05,"cen_sbe_arrayinit"), - SBE_CENTAUR_INIT::call_cen_sbe_arrayinit, + ISTEPNAME(10,06,"cen_sbe_chiplet_init"), + SBE_CENTAUR_INIT::call_cen_sbe_chiplet_init, { START_FN, EXT_IMAGE, } }, + { - ISTEPNAME(10,06,"cen_sbe_pll_initf"), - SBE_CENTAUR_INIT::call_cen_sbe_pll_initf, + ISTEPNAME(10,07,"cen_sbe_arrayinit"), + SBE_CENTAUR_INIT::call_cen_sbe_arrayinit, { START_FN, EXT_IMAGE, } }, { - ISTEPNAME(10,07,"cen_sbe_dts_init"), + ISTEPNAME(10,08,"cen_sbe_dts_init"), SBE_CENTAUR_INIT::call_cen_sbe_dts_init, { START_FN, @@ -114,7 +123,7 @@ const TaskInfo g_istep10[] = { } }, { - ISTEPNAME(10,08,"cen_sbe_initf"), + ISTEPNAME(10,09,"cen_sbe_initf"), SBE_CENTAUR_INIT::call_cen_sbe_initf, { START_FN, @@ -122,7 +131,7 @@ const TaskInfo g_istep10[] = { } }, { - ISTEPNAME(10,09,"cen_sbe_do_manual_inits"), + ISTEPNAME(10,10,"cen_sbe_do_manual_inits"), SBE_CENTAUR_INIT::call_cen_sbe_do_manual_inits, { START_FN, @@ -130,15 +139,15 @@ const TaskInfo g_istep10[] = { } }, { - ISTEPNAME(10,10,"cen_sbe_startclocks"), - SBE_CENTAUR_INIT::call_cen_sbe_startclocks, + ISTEPNAME(10,11,"cen_sbe_nest_startclocks"), + SBE_CENTAUR_INIT::call_cen_sbe_nest_startclocks, { START_FN, EXT_IMAGE, } }, { - ISTEPNAME(10,11,"cen_sbe_scominits"), + ISTEPNAME(10,12,"cen_sbe_scominits"), SBE_CENTAUR_INIT::call_cen_sbe_scominits, { START_FN, diff --git a/src/include/usr/isteps/istep11list.H b/src/include/usr/isteps/istep11list.H index 9b57c3681..50e3b0f3d 100644 --- a/src/include/usr/isteps/istep11list.H +++ b/src/include/usr/isteps/istep11list.H @@ -67,7 +67,15 @@ namespace INITSERVICE const TaskInfo g_istep11[] = { { - ISTEPNAME(11,00,"dmi_scominit"), // substep name + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + { + ISTEPNAME(11,01,"dmi_scominit"), // substep name DMI_TRAINING::call_dmi_scominit, // pointer to fn { START_FN, // task type @@ -75,7 +83,7 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,01,"dmi_erepair"), // substep name + ISTEPNAME(11,02,"dmi_erepair"), // substep name DMI_TRAINING::call_dmi_erepair, // pointer to fn { START_FN, // task type @@ -83,7 +91,7 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,02,"dmi_io_dccal"), // substep name + ISTEPNAME(11,03,"dmi_io_dccal"), // substep name DMI_TRAINING::call_dmi_io_dccal, // pointer to fn { START_FN, // task type @@ -91,7 +99,7 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,03,"dmi_io_run_training"), // substep name + ISTEPNAME(11,04,"dmi_io_run_training"), // substep name DMI_TRAINING::call_dmi_io_run_training, // pointer to fn { START_FN, // task type @@ -99,7 +107,7 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,04,"host_startPRD_dmi"), // substep name + ISTEPNAME(11,05,"host_startPRD_dmi"), // substep name DMI_TRAINING::call_host_startPRD_dmi, // pointer to fn { START_FN, // task type @@ -107,17 +115,15 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,05,"host_attnlisten_cen"), // substep name + ISTEPNAME(11,06,"host_attnlisten_cen"), // substep name DMI_TRAINING::call_host_attnlisten_cen, // pointer to fn { START_FN, // task type EXT_IMAGE, // Extended Module } }, - - { - ISTEPNAME(11,06,"proc_cen_framelock"), // substep name + ISTEPNAME(11,07,"proc_cen_framelock"), // substep name DMI_TRAINING::call_proc_cen_framelock, // pointer to fn { START_FN, // task type @@ -125,7 +131,7 @@ const TaskInfo g_istep11[] = { } }, { - ISTEPNAME(11,07,"cen_set_inband_addr"), // substep name + ISTEPNAME(11,08,"cen_set_inband_addr"), // substep name DMI_TRAINING::call_cen_set_inband_addr, // pointer to fn { START_FN, // task type diff --git a/src/include/usr/isteps/istep12list.H b/src/include/usr/isteps/istep12list.H index 357722be4..cd24350dc 100644 --- a/src/include/usr/isteps/istep12list.H +++ b/src/include/usr/isteps/istep12list.H @@ -56,49 +56,50 @@ namespace INITSERVICE { - const TaskInfo g_istep12[] = { - // NOTE: IStep indexes start with 0 +const TaskInfo g_istep12[] = { { - ISTEPNAME(12,0,"host_collect_dimm_spd"), + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(12,01,"host_collect_dimm_spd"), MC_INIT::call_host_collect_dimm_spd, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(12,1,"mss_volt"), + ISTEPNAME(12,02,"mss_volt"), MC_INIT::call_mss_volt, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(12,2,"mss_freq"), + ISTEPNAME(12,03,"mss_freq"), MC_INIT::call_mss_freq, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(12,3,"mss_eff_config"), + ISTEPNAME(12,4,"mss_eff_config"), MC_INIT::call_mss_eff_config, { START_FN, EXT_IMAGE, } - }, + }, - // END OF LIST! }; diff --git a/src/include/usr/isteps/istep13list.H b/src/include/usr/isteps/istep13list.H index 8014c1904..54cb27f29 100644 --- a/src/include/usr/isteps/istep13list.H +++ b/src/include/usr/isteps/istep13list.H @@ -70,119 +70,107 @@ namespace INITSERVICE { - const TaskInfo g_istep13[] = { - // NOTE: IStep indexes start with 0 +const TaskInfo g_istep13[] = { { - ISTEPNAME(13,0,"host_disable_vddr"), + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(13,01,"host_disable_vddr"), DRAM_TRAINING::call_host_disable_vddr, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,1,"mc_pll_setup"), + ISTEPNAME(13,02,"mc_pll_setup"), DRAM_TRAINING::call_mc_pll_setup, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,2,"mba_startclocks"), + ISTEPNAME(13,03,"mba_startclocks"), DRAM_TRAINING::call_mba_startclocks, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,3,"host_enable_vddr"), + ISTEPNAME(13,04,"host_enable_vddr"), DRAM_TRAINING::call_host_enable_vddr, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,4,"mss_initf"), + ISTEPNAME(13,05,"mss_initf"), DRAM_TRAINING::call_mss_initf, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,5,"mss_ddr_phy_reset"), + ISTEPNAME(13,06,"mss_ddr_phy_reset"), DRAM_TRAINING::call_mss_ddr_phy_reset, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,6,"mss_draminit"), + ISTEPNAME(13,07,"mss_draminit"), DRAM_TRAINING::call_mss_draminit, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,7,"mss_restore_dram_repair"), + ISTEPNAME(13,08,"mss_restore_dram_repair"), DRAM_TRAINING::call_mss_restore_dram_repair, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,8,"mss_draminit_training"), + ISTEPNAME(13,09,"mss_draminit_training"), DRAM_TRAINING::call_mss_draminit_training, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,9,"mss_draminit_trainadv"), + ISTEPNAME(13,10,"mss_draminit_trainadv"), DRAM_TRAINING::call_mss_draminit_trainadv, { START_FN, EXT_IMAGE, } - }, - - + }, { - ISTEPNAME(13,10,"mss_draminit_mc"), + ISTEPNAME(13,11,"mss_draminit_mc"), DRAM_TRAINING::call_mss_draminit_mc, { START_FN, EXT_IMAGE, } - }, + }, + - // END OF LIST! }; diff --git a/src/include/usr/isteps/istep14list.H b/src/include/usr/isteps/istep14list.H new file mode 100644 index 000000000..715b13ee8 --- /dev/null +++ b/src/include/usr/isteps/istep14list.H @@ -0,0 +1,171 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep14list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP14LIST_H +#define __ISTEPS_ISTEP14LIST_H + +/** + * @file istep14list.H + * + * IStep 14 Dram Initialization + * IPL FLow Doc v1.01 (03/26/12) + * + * 14.1 host_startPRD_dram + * : Load PRD for DRAM domain + * 14.2 mss_extent_setup + * MSS Extent Setup + * 14.3 mss_memdiag + * Mainstore Pattern Testing + * 14.4 mss_scrub + * : Start background scrub + * 14.5 mss_thermal_init + * : Initialize the thermal sensor + * 14.6 proc_setup_bars + * : Setup Memory BARs + * 14.7 proc_pbus_epsilon + * : Set runtime epsilons + * 14.8 proc_exit_cache_contained + * : Allow execution from memory + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/dram_initialization/dram_initialization.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep14[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(14,01,"host_startPRD_dram"), + DRAM_INITIALIZATION::call_host_startPRD_dram, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,02,"mss_extent_setup"), + DRAM_INITIALIZATION::call_mss_extent_setup, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,03,"mss_memdiag"), + DRAM_INITIALIZATION::call_mss_memdiag, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,04,"mss_scrub"), + DRAM_INITIALIZATION::call_mss_scrub, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,05,"mss_thermal_init"), + DRAM_INITIALIZATION::call_mss_thermal_init, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,06,"proc_setup_bars"), + DRAM_INITIALIZATION::call_proc_setup_bars, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,07,"proc_pbus_epsilon"), + DRAM_INITIALIZATION::call_proc_pbus_epsilon, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(14,08,"proc_exit_cache_contained"), + DRAM_INITIALIZATION::call_proc_exit_cache_contained, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep14TaskList = { + &(g_istep14[0]), + ( sizeof(g_istep14)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep15list.H b/src/include/usr/isteps/istep15list.H new file mode 100644 index 000000000..8ff4d474b --- /dev/null +++ b/src/include/usr/isteps/istep15list.H @@ -0,0 +1,99 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep15list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP15LIST_H +#define __ISTEPS_ISTEP15LIST_H + +/** + * @file istep15list.H + * + * IStep 15 Build Winkle Images + * IPL FLow Doc v1.01 (03/26/12) + * + * 15.1 host_build_winkle + * : Build runtime winkle images + * 15.2 proc_set_pore_bar + * : Place winkle images in memory + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/build_winkle_images/build_winkle_images.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep15[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(15,01,"host_build_winkle"), + BUILD_WINKLE_IMAGES::call_host_build_winkle, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(15,02,"proc_set_pore_bar"), + BUILD_WINKLE_IMAGES::call_proc_set_pore_bar, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep15TaskList = { + &(g_istep15[0]), + ( sizeof(g_istep15)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep16list.H b/src/include/usr/isteps/istep16list.H new file mode 100644 index 000000000..28a1d8de5 --- /dev/null +++ b/src/include/usr/isteps/istep16list.H @@ -0,0 +1,111 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep16list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP16LIST_H +#define __ISTEPS_ISTEP16LIST_H + +/** + * @file istep16list.H + * + * IStep 16 Core Activate + * IPL FLow Doc v1.01 (03/26/12) + * + * 16.1 host_activate_master + * : Activate master core + * 16.2 host_activate_slave_cores + * : Activate slave cores + * 16.3 host_ipl_complete + * : Notify FSP drawer ipl complete + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1609 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/core_activate/core_activate.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep16[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(16,01,"host_activate_master"), + CORE_ACTIVATE::call_host_activate_master, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(16,02,"host_activate_slave_cores"), + CORE_ACTIVATE::call_host_activate_slave_cores, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(16,03,"host_ipl_complete"), + CORE_ACTIVATE::call_host_ipl_complete, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep16TaskList = { + &(g_istep16[0]), + ( sizeof(g_istep16)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep18list.H b/src/include/usr/isteps/istep18list.H new file mode 100644 index 000000000..1ef4428bd --- /dev/null +++ b/src/include/usr/isteps/istep18list.H @@ -0,0 +1,175 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep18list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP18LIST_H +#define __ISTEPS_ISTEP18LIST_H + +/** + * @file istep18list.H + * + * IStep 18 Establish System SMP + * IPL FLow Doc v1.01 (03/26/12) + * + * 18.8 host_coalesce_host + * : Create single host image + * 18.9 proc_tod_setup + * : Setup TOD + * 18.10 proc_tod_init + * : Init TOD + * + * ***************************************************************** + * THIS FILE WAS PARTIALLY GENERATED ON 2012-04-11:1611 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/establish_system_smp/establish_system_smp.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep18[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,01,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,02,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,03,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + + ISTEPNAME(18,04,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,05,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,06,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,07,""), + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(18,08,"host_coalesce_host"), + ESTABLISH_SYSTEM_SMP::call_host_coalesce_host, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(18,09,"proc_tod_setup"), + ESTABLISH_SYSTEM_SMP::call_proc_tod_setup, + { + START_FN, + EXT_IMAGE, + } + }, + + + { + ISTEPNAME(18,10,"proc_tod_init"), + ESTABLISH_SYSTEM_SMP::call_proc_tod_init, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep18TaskList = { + &(g_istep18[0]), + ( sizeof(g_istep18)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep20list.H b/src/include/usr/isteps/istep20list.H new file mode 100644 index 000000000..d7a86d57b --- /dev/null +++ b/src/include/usr/isteps/istep20list.H @@ -0,0 +1,87 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep20list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP20LIST_H +#define __ISTEPS_ISTEP20LIST_H + +/** + * @file istep20list.H + * + * IStep 20 Load Payload + * IPL FLow Doc v1.01 (03/26/12) + * + * 20.1 host_load_payload + * : Load payload + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1612 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/load_payload/load_payload.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep20[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(20,01,"host_load_payload"), + LOAD_PAYLOAD::call_host_load_payload, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep20TaskList = { + &(g_istep20[0]), + ( sizeof(g_istep20)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istep21list.H b/src/include/usr/isteps/istep21list.H new file mode 100644 index 000000000..e3418ddb8 --- /dev/null +++ b/src/include/usr/isteps/istep21list.H @@ -0,0 +1,87 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/include/usr/isteps/istep21list.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ISTEPS_ISTEP21LIST_H +#define __ISTEPS_ISTEP21LIST_H + +/** + * @file istep21list.H + * + * IStep 21 Start Payload + * IPL FLow Doc v1.01 (03/26/12) + * + * 21.1 host_start_payload + * : Start Payload + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1613 + * ***************************************************************** + * + * Please see the note in initsvcstructs.H for description of + * the ISTEPNAME macro. + * + */ + +#include <initservice/initsvcstructs.H> +#include <initservice/initsvcreasoncodes.H> + +// include prototypes file +#include "../../../usr/hwpf/hwp/start_payload/start_payload.H" + +namespace INITSERVICE +{ + const TaskInfo g_istep21[] = { + + { + + "", // dummy, index 0 + NULL, + { + NONE, + EXT_IMAGE, + } + }, + + { + ISTEPNAME(21,01,"host_start_payload"), + START_PAYLOAD::call_host_start_payload, + { + START_FN, + EXT_IMAGE, + } + }, + + + // END OF LIST! +}; + +// make a struct from the above with the number of items included +const ExtTaskInfo g_istep21TaskList = { + &(g_istep21[0]), + ( sizeof(g_istep21)/sizeof(TaskInfo) ), + NULL // later, depModules struct +}; + +}; // end namespace + +#endif diff --git a/src/include/usr/isteps/istepmasterlist.H b/src/include/usr/isteps/istepmasterlist.H index 2ce020c08..4d01074cb 100644 --- a/src/include/usr/isteps/istepmasterlist.H +++ b/src/include/usr/isteps/istepmasterlist.H @@ -56,13 +56,25 @@ #include <initservice/initsvcstructs.H> // ----- istep include files ----- -#include "istep06list.H" +// isteps 1-5 run before hostboot + +#include "istep06list.H" +#include "istep07list.H" +#include "istep08list.H" +#include "istep09list.H" #include "istep10list.H" #include "istep11list.H" #include "istep12list.H" #include "istep13list.H" - +#include "istep14list.H" +#include "istep15list.H" +#include "istep16list.H" +// istep 17, FSP only +#include "istep18list.H" +// istep 19, FSP only +#include "istep20list.H" +#include "istep21list.H" namespace INITSERVICE { @@ -76,26 +88,29 @@ const ExtTaskInfo g_isteps[] = { { NULL, 0, NULL }, // dummy IStep 4 { NULL, 0, NULL }, // dummy IStep 5 INITSERVICE::g_istep06TaskList, // HWAS IStep 6 - { NULL, 0, NULL }, // dummy IStep 7 - { NULL, 0, NULL }, // dummy IStep 8 - { NULL, 0, NULL }, // dummy IStep 9 - INITSERVICE::g_istep10TaskList, // SBE_CENTAUR_INIT - INITSERVICE::g_istep11TaskList, // DMI_TRAINING - INITSERVICE::g_istep12TaskList, // MC_INIT - INITSERVICE::g_istep13TaskList, // DRAM_TRAINING - { NULL, 0, NULL }, // dummy IStep 14 - { NULL, 0, NULL }, // dummy IStep 15 - { NULL, 0, NULL }, // dummy IStep 16 - + INITSERVICE::g_istep07TaskList, // IStep 7 + INITSERVICE::g_istep08TaskList, // IStep 8 + INITSERVICE::g_istep09TaskList, // IStep 9 + INITSERVICE::g_istep10TaskList, // IStep 10 + INITSERVICE::g_istep11TaskList, // IStep 11 + INITSERVICE::g_istep12TaskList, // IStep 12 + INITSERVICE::g_istep13TaskList, // IStep 13 + INITSERVICE::g_istep14TaskList, // IStep 14 + INITSERVICE::g_istep15TaskList, // IStep 15 + INITSERVICE::g_istep16TaskList, // IStep 16 + { NULL, 0, NULL}, // FSP IStep 17 + INITSERVICE::g_istep18TaskList, // IStep 18 + { NULL, 0, NULL }, // FSP IStep 19 + INITSERVICE::g_istep20TaskList, // IStep 20 + INITSERVICE::g_istep21TaskList // IStep 21 // // add further istep lists at the end. }; - const uint64_t MAX_SUBSTEPS = 25; // publish the size of the g_isteps array -const uint64_t MAX_ISTEPS = sizeof(g_isteps)/sizeof(ExtTaskInfo) ; +const uint64_t MaxISteps = sizeof(g_isteps)/sizeof(ExtTaskInfo) ; }; // namespace diff --git a/src/makefile b/src/makefile index e15e46e26..651d640db 100644 --- a/src/makefile +++ b/src/makefile @@ -54,9 +54,13 @@ BASE_MODULES = trace errl devicefw scom xscom initservice \ EXTENDED_MODULES = targeting ecmddatabuffer fapi hwp plat \ extinitsvc istepdisp hwas fsi fsiscom i2c intr \ - spd dmi_training fapiporeve poreve util \ - sbe_centaur_init mc_init dram_training \ - mdia mbox mvpd + spd dmi_training fapiporeve poreve util \ + sbe_centaur_init mc_init dram_training \ + mdia mbox mvpd \ + activate_powerbus build_winkle_images \ + core_activate dram_initialization edi_ei_initialization \ + establish_system_smp load_payload \ + start_clocks_on_nest_chiplets start_payload DIRECT_BOOT_MODULES = example RUNTIME_MODULES = diff --git a/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C new file mode 100644 index 000000000..b955a0f59 --- /dev/null +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C @@ -0,0 +1,126 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file activate_powerbus.C + * + * Support file for IStep: activate_powerbus + * Activate PowerBus + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1607 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "activate_powerbus.H" + +// Uncomment these files as they become available: +// #include "proc_build_smp/proc_build_smp.H" + +namespace ACTIVATE_POWERBUS +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 09.1 : +// proc_build_smp +// +void call_proc_build_smp( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_build_smp entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_build_smp, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_build_smp exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( 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 new file mode 100644 index 000000000..3af68aef4 --- /dev/null +++ b/src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H @@ -0,0 +1,82 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/activate_powerbus/activate_powerbus.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ACTIVATE_POWERBUS_ACTIVATE_POWERBUS_H +#define __ACTIVATE_POWERBUS_ACTIVATE_POWERBUS_H + +/** + * @file activate_powerbus.H + * + * Activate PowerBus + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1607 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname activate_powerbus + * @istepnum 09 + * @istepdesc Activate PowerBus + * + * @{ + * @substepnum 1 + * @substepname proc_build_smp + * @substepdesc : Integrate PgP Islands into SMP + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace ACTIVATE_POWERBUS +{ + + + +/** + * @brief proc_build_smp + * + * 09.1 : : Integrate PgP Islands into SMP + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_build_smp( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/activate_powerbus/makefile b/src/usr/hwpf/hwp/activate_powerbus/makefile new file mode 100644 index 000000000..0cee08a3e --- /dev/null +++ b/src/usr/hwpf/hwp/activate_powerbus/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/activate_powerbus/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = activate_powerbus + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/activate_powerbus + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/activate_powerbus/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = activate_powerbus.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/activate_powerbus/<HWP_dir> + + +include ${ROOTPATH}/config.mk + 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 new file mode 100644 index 000000000..5cddd5adc --- /dev/null +++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C @@ -0,0 +1,180 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file build_winkle_images.C + * + * Support file for IStep: build_winkle_images + * Build Winkle Images + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "build_winkle_images.H" + +// Uncomment these files as they become available: +// #include "host_build_winkle/host_build_winkle.H" +// #include "proc_set_pore_bar/proc_set_pore_bar.H" + +namespace BUILD_WINKLE_IMAGES +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 15.1 : +// host_build_winkle +// +void call_host_build_winkle( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_build_winkle entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_build_winkle, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_build_winkle exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 15.2 : +// proc_set_pore_bar +// +void call_proc_set_pore_bar( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_set_pore_bar entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_set_pore_bar, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_set_pore_bar exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace 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 new file mode 100644 index 000000000..8a7ca9f7c --- /dev/null +++ b/src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H @@ -0,0 +1,102 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/build_winkle_images/build_winkle_images.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __BUILD_WINKLE_IMAGES_BUILD_WINKLE_IMAGES_H +#define __BUILD_WINKLE_IMAGES_BUILD_WINKLE_IMAGES_H + +/** + * @file build_winkle_images.H + * + * Build Winkle Images + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname build_winkle_images + * @istepnum 15 + * @istepdesc Build Winkle Images + * + * @{ + * @substepnum 1 + * @substepname host_build_winkle + * @substepdesc : Build runtime winkle images + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname proc_set_pore_bar + * @substepdesc : Place winkle images in memory + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace BUILD_WINKLE_IMAGES +{ + + + +/** + * @brief host_build_winkle + * + * 15.1 : : Build runtime winkle images + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_build_winkle( void *io_pArgs ); + + + +/** + * @brief proc_set_pore_bar + * + * 15.2 : : Place winkle images in memory + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_set_pore_bar( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/build_winkle_images/makefile b/src/usr/hwpf/hwp/build_winkle_images/makefile new file mode 100644 index 000000000..61606d951 --- /dev/null +++ b/src/usr/hwpf/hwp/build_winkle_images/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/build_winkle_images/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = build_winkle_images + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = build_winkle_images.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/build_winkle_images/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.C b/src/usr/hwpf/hwp/core_activate/core_activate.C new file mode 100644 index 000000000..ca455cf1b --- /dev/null +++ b/src/usr/hwpf/hwp/core_activate/core_activate.C @@ -0,0 +1,234 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/core_activate/core_activate.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file core_activate.C + * + * Support file for IStep: core_activate + * Core Activate + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1609 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "core_activate.H" + +// Uncomment these files as they become available: +// #include "host_activate_master/host_activate_master.H" +// #include "host_activate_slave_cores/host_activate_slave_cores.H" +// #include "host_ipl_complete/host_ipl_complete.H" + +namespace CORE_ACTIVATE +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 16.1 : +// host_activate_master +// +void call_host_activate_master( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_master entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_activate_master, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_master exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 16.2 : +// host_activate_slave_cores +// +void call_host_activate_slave_cores( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_slave_cores entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_activate_slave_cores, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_activate_slave_cores exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 16.3 : +// host_ipl_complete +// +void call_host_ipl_complete( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_ipl_complete entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_ipl_complete, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_ipl_complete exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/core_activate/core_activate.H b/src/usr/hwpf/hwp/core_activate/core_activate.H new file mode 100644 index 000000000..412b9f0cb --- /dev/null +++ b/src/usr/hwpf/hwp/core_activate/core_activate.H @@ -0,0 +1,122 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/core_activate/core_activate.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __CORE_ACTIVATE_CORE_ACTIVATE_H +#define __CORE_ACTIVATE_CORE_ACTIVATE_H + +/** + * @file core_activate.H + * + * Core Activate + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1609 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname core_activate + * @istepnum 16 + * @istepdesc Core Activate + * + * @{ + * @substepnum 1 + * @substepname host_activate_master + * @substepdesc : Activate master core + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname host_activate_slave_cores + * @substepdesc : Activate slave cores + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname host_ipl_complete + * @substepdesc : Notify FSP drawer ipl complete + * * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace CORE_ACTIVATE +{ + + + +/** + * @brief host_activate_master + * + * 16.1 : : Activate master core + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_activate_master( void *io_pArgs ); + + + +/** + * @brief host_activate_slave_cores + * + * 16.2 : : Activate slave cores + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_activate_slave_cores( void *io_pArgs ); + + + +/** + * @brief host_ipl_complete + * + * 16.3 : : Notify FSP drawer ipl complete + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_ipl_complete( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/core_activate/makefile b/src/usr/hwpf/hwp/core_activate/makefile new file mode 100644 index 000000000..e76695c3b --- /dev/null +++ b/src/usr/hwpf/hwp/core_activate/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/core_activate/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = core_activate + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = core_activate.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/core_activate/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/dmi_training/dmi_training.H b/src/usr/hwpf/hwp/dmi_training/dmi_training.H index 8791b7110..0caa96680 100644 --- a/src/usr/hwpf/hwp/dmi_training/dmi_training.H +++ b/src/usr/hwpf/hwp/dmi_training/dmi_training.H @@ -37,45 +37,55 @@ * @istepnum 11 * @istepdesc DMI Training * + * + * @{ * @substepnum 1 * @substepname dmi_scominit * @substepdesc : Scom setup on centaur * @target_sched serial - * + * @} + * @{ * @substepnum 2 * @substepname dmi_erepair * @substepdesc : Restore EDI Bus eRepair data * @target_sched serial - * + * @} + * @{ * @substepnum 3 * @substepname dmi_io_dccal * @substepdesc : Calibrate DMI interfaces * @target_sched serial - * + * @} + * @{ * @substepnum 4 * @substepname dmi_io_run_training * @substepdesc : Run training on MC buses * @target_sched serial - * + * @} + * @{ * @substepnum 5 * @substepname host_startPRD_dmi * @substepdesc : Load PRD for DMI domain * @target_sched serial - * + * @} + * @{ * @substepnum 6 * @substepname host_attnlisten_cen * @substepdesc : Start listening for attentions * @target_sched serial - * + * @} + * @{ * @substepnum 7 * @substepname proc_cen_framelock * @substepdesc : Initialize EDI Frame * @target_sched serial - * + * @} + * @{ * @substepnum 8 * @substepname cen_set_inband_addr * @substepdesc : Set the Inband base addresses * @target_sched serial + * @} * */ diff --git a/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C new file mode 100644 index 000000000..b2b252b62 --- /dev/null +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.C @@ -0,0 +1,504 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/dram_initialization/dram_initialization.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file dram_initialization.C + * + * Support file for IStep: dram_initialization + * Dram Initialization + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "dram_initialization.H" + +// Uncomment these files as they become available: +// #include "host_startPRD_dram/host_startPRD_dram.H" +// #include "mss_extent_setup/mss_extent_setup.H" +// #include "mss_memdiag/mss_memdiag.H" +// #include "mss_scrub/mss_scrub.H" +// #include "mss_thermal_init/mss_thermal_init.H" +// #include "proc_setup_bars/proc_setup_bars.H" +// #include "proc_pbus_epsilon/proc_pbus_epsilon.H" +// #include "proc_exit_cache_contained/proc_exit_cache_contained.H" + +namespace DRAM_INITIALIZATION +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 14.1 : +// host_startPRD_dram +// +void call_host_startPRD_dram( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_startPRD_dram entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_startPRD_dram, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_startPRD_dram exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.2 : +// mss_extent_setup +// +void call_mss_extent_setup( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_extent_setup entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, mss_extent_setup, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_extent_setup exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.3 : +// mss_memdiag +// +void call_mss_memdiag( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_memdiag entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, mss_memdiag, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_memdiag exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.4 : +// mss_scrub +// +void call_mss_scrub( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_scrub entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, mss_scrub, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_scrub exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.5 : +// mss_thermal_init +// +void call_mss_thermal_init( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_thermal_init entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, mss_thermal_init, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_mss_thermal_init exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.6 : +// proc_setup_bars +// +void call_proc_setup_bars( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_setup_bars entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_setup_bars, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_setup_bars exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.7 : +// proc_pbus_epsilon +// +void call_proc_pbus_epsilon( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_pbus_epsilon entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_pbus_epsilon, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_pbus_epsilon exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 14.8 : +// proc_exit_cache_contained +// +void call_proc_exit_cache_contained( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_exit_cache_contained entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_exit_cache_contained, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_exit_cache_contained exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( 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 new file mode 100644 index 000000000..6dd96f8de --- /dev/null +++ b/src/usr/hwpf/hwp/dram_initialization/dram_initialization.H @@ -0,0 +1,222 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/dram_initialization/dram_initialization.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __DRAM_INITIALIZATION_DRAM_INITIALIZATION_H +#define __DRAM_INITIALIZATION_DRAM_INITIALIZATION_H + +/** + * @file dram_initialization.H + * + * Dram Initialization + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1608 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname dram_initialization + * @istepnum 14 + * @istepdesc Dram Initialization + * + * @{ + * @substepnum 1 + * @substepname host_startPRD_dram + * @substepdesc : Load PRD for DRAM domain + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname mss_extent_setup + * @substepdesc MSS Extent Setup + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname mss_memdiag + * @substepdesc Mainstore Pattern Testing + * @target_sched serial + * @} + * @{ + * @substepnum 4 + * @substepname mss_scrub + * @substepdesc : Start background scrub + * @target_sched serial + * @} + * @{ + * @substepnum 5 + * @substepname mss_thermal_init + * @substepdesc : Initialize the thermal sensor + * @target_sched serial + * @} + * @{ + * @substepnum 6 + * @substepname proc_setup_bars + * @substepdesc : Setup Memory BARs + * @target_sched serial + * @} + * @{ + * @substepnum 7 + * @substepname proc_pbus_epsilon + * @substepdesc : Set runtime epsilons + * @target_sched serial + * @} + * @{ + * @substepnum 8 + * @substepname proc_exit_cache_contained + * @substepdesc : Allow execution from memory + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace DRAM_INITIALIZATION +{ + + + +/** + * @brief host_startPRD_dram + * + * 14.1 : : Load PRD for DRAM domain + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_startPRD_dram( void *io_pArgs ); + + + +/** + * @brief mss_extent_setup + * + * 14.2 : MSS Extent Setup + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_mss_extent_setup( void *io_pArgs ); + + + +/** + * @brief mss_memdiag + * + * 14.3 : Mainstore Pattern Testing + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_mss_memdiag( void *io_pArgs ); + + + +/** + * @brief mss_scrub + * + * 14.4 : : Start background scrub + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_mss_scrub( void *io_pArgs ); + + + +/** + * @brief mss_thermal_init + * + * 14.5 : : Initialize the thermal sensor + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_mss_thermal_init( void *io_pArgs ); + + + +/** + * @brief proc_setup_bars + * + * 14.6 : : Setup Memory BARs + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_setup_bars( void *io_pArgs ); + + + +/** + * @brief proc_pbus_epsilon + * + * 14.7 : : Set runtime epsilons + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_pbus_epsilon( void *io_pArgs ); + + + +/** + * @brief proc_exit_cache_contained + * + * 14.8 : : Allow execution from memory + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_exit_cache_contained( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/dram_initialization/makefile b/src/usr/hwpf/hwp/dram_initialization/makefile new file mode 100644 index 000000000..a9341e3a1 --- /dev/null +++ b/src/usr/hwpf/hwp/dram_initialization/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/dram_initialization/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = dram_initialization + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_initialization + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/dram_initialization/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = dram_initialization.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/dram_initialization/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/dram_training/dram_training.H b/src/usr/hwpf/hwp/dram_training/dram_training.H index 7cf4f58ad..4ddc065fb 100644 --- a/src/usr/hwpf/hwp/dram_training/dram_training.H +++ b/src/usr/hwpf/hwp/dram_training/dram_training.H @@ -38,76 +38,77 @@ * */ -/* @tag isteplist - * @docversion v0.99 (02/10/12) - * @istepname dram_training - * @istepnum 13 - * @istepdesc Step 13 DRAM Training - * @{ - * @substepnum 1 - * @substepname host_disable_vddr - * @substepdesc : Disable VDDR on CanContinue loops - * @target_sched serial - * @} - * @{ - * @substepnum 2 - * @substepname mc_pll_setup - * @substepdesc : Setup PLL for MBAs - * @target_sched serial - * @} - * @{ - * @substepnum 3 - * @substepname mba_startclocks - * @substepdesc : Start clocks on MBAs - * @target_sched serial - * @} - * @{ - * @substepnum 4 - * @substepname host_enable_vddr - * @substepdesc : Enable the VDDR3 Voltage Rail - * @target_sched serial - * @} - * @{ - * @substepnum 5 - * @substepname mss_initf - * @substepdesc : Perform scom inits to MC and PHY - * @target_sched serial - * @} - * @{ - * @substepnum 6 - * @substepname mss_ddr_phy_reset - * @substepdesc : Soft reset of DDR PHY macros - * @target_sched serial - * @} - * @{ - * @substepnum 7 - * @substepname mss_draminit - * @substepdesc : Dram initialize - * @target_sched serial - * @} - * @{ - * @substepnum 8 - * @substepname mss_restore_dram_repair - * @substepdesc : Restore Dram repairs - * @target_sched serial - * @} - * @{ - * @substepnum 9 - * @substepname mss_draminit_training - * @substepdesc : Dram training - * @target_sched serial - * @} - * @{ - * @substepnum 10 - * @substepname mss_draminit_trainadv - * @substepdesc : Advanced dram training - * @target_sched serial - * @} - * @{ - * @substepnum 11 - * @substepname mss_draminit_mc - * @substepdesc : Hand off control to MC - * @target_sched serial +/* @tag isteplist + * @docversion v0.99 (02/10/12) + * @istepname dram_training + * @istepnum 13 + * @istepdesc Step 13 DRAM Training + * + * @{ + * @substepnum 1 + * @substepname host_disable_vddr + * @substepdesc : Disable VDDR on CanContinue loops + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname mc_pll_setup + * @substepdesc : Setup PLL for MBAs + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname mba_startclocks + * @substepdesc : Start clocks on MBAs + * @target_sched serial + * @} + * @{ + * @substepnum 4 + * @substepname host_enable_vddr + * @substepdesc : Enable the VDDR3 Voltage Rail + * @target_sched serial + * @} + * @{ + * @substepnum 5 + * @substepname mss_initf + * @substepdesc : Perform scom inits to MC and PHY + * @target_sched serial + * @} + * @{ + * @substepnum 6 + * @substepname mss_ddr_phy_reset + * @substepdesc : Soft reset of DDR PHY macros + * @target_sched serial + * @} + * @{ + * @substepnum 7 + * @substepname mss_draminit + * @substepdesc : Dram initialize + * @target_sched serial + * @} + * @{ + * @substepnum 8 + * @substepname mss_restore_dram_repair + * @substepdesc : Restore Dram repairs + * @target_sched serial + * @} + * @{ + * @substepnum 9 + * @substepname mss_draminit_training + * @substepdesc : Dram training + * @target_sched serial + * @} + * @{ + * @substepnum 10 + * @substepname mss_draminit_trainadv + * @substepdesc : Advanced dram training + * @target_sched serial + * @} + * @{ + * @substepnum 11 + * @substepname mss_draminit_mc + * @substepdesc : Hand off control to MC + * @target_sched serial * @} */ /******************************************************************************/ diff --git a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C new file mode 100644 index 000000000..4e8ca3dee --- /dev/null +++ b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C @@ -0,0 +1,396 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file edi_ei_initialization.C + * + * Support file for IStep: edi_ei_initialization + * EDI, EI Initialization + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1606 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "edi_ei_initialization.H" + +// Uncomment these files as they become available: +// #include "fabric_erepair/fabric_erepair.H" +// #include "fabric_io_dccal/fabric_io_dccal.H" +// #include "fabric_io_run_training/fabric_io_run_training.H" +// #include "host_startPRD_pbus/host_startPRD_pbus.H" +// #include "host_attnlisten_proc/host_attnlisten_proc.H" +// #include "proc_fab_iovalid/proc_fab_iovalid.H" + +namespace EDI_EI_INITIALIZATION +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 08.1 : +// fabric_erepair +// +void call_fabric_erepair( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_erepair entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, fabric_erepair, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_erepair exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 08.2 : +// fabric_io_dccal +// +void call_fabric_io_dccal( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_io_dccal entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, fabric_io_dccal, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_io_dccal exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 08.3 : +// fabric_io_run_training +// +void call_fabric_io_run_training( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_io_run_training entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, fabric_io_run_training, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_fabric_io_run_training exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 08.4 : +// host_startPRD_pbus +// +void call_host_startPRD_pbus( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_startPRD_pbus entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_startPRD_pbus, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_startPRD_pbus exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 08.5 : +// host_attnlisten_proc +// +void call_host_attnlisten_proc( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_attnlisten_proc entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_attnlisten_proc, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_attnlisten_proc exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 08.6 : +// proc_fab_iovalid +// +void call_proc_fab_iovalid( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_fab_iovalid entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_fab_iovalid, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_fab_iovalid exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.H b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.H new file mode 100644 index 000000000..5282b78eb --- /dev/null +++ b/src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.H @@ -0,0 +1,182 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/edi_ei_initialization/edi_ei_initialization.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __EDI_EI_INITIALIZATION_EDI_EI_INITIALIZATION_H +#define __EDI_EI_INITIALIZATION_EDI_EI_INITIALIZATION_H + +/** + * @file edi_ei_initialization.H + * + * EDI, EI Initialization + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1606 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname edi_ei_initialization + * @istepnum 08 + * @istepdesc EDI, EI Initialization + * + * @{ + * @substepnum 1 + * @substepname fabric_erepair + * @substepdesc : Restore Fabric/EDI Bus eRepair data + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname fabric_io_dccal + * @substepdesc : Calibrate Fabric/EDI interfaces + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname fabric_io_run_training + * @substepdesc : Run training on internal buses + * @target_sched serial + * @} + * @{ + * @substepnum 4 + * @substepname host_startPRD_pbus + * @substepdesc : Load PRD for powerbus domain + * @target_sched serial + * @} + * @{ + * @substepnum 5 + * @substepname host_attnlisten_proc + * @substepdesc : Start listening for attentions + * @target_sched serial + * @} + * @{ + * @substepnum 6 + * @substepname proc_fab_iovalid + * @substepdesc : Lower functional fences on local SMP + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace EDI_EI_INITIALIZATION +{ + + + +/** + * @brief fabric_erepair + * + * 08.1 : : Restore Fabric/EDI Bus eRepair data + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_fabric_erepair( void *io_pArgs ); + + + +/** + * @brief fabric_io_dccal + * + * 08.2 : : Calibrate Fabric/EDI interfaces + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_fabric_io_dccal( void *io_pArgs ); + + + +/** + * @brief fabric_io_run_training + * + * 08.3 : : Run training on internal buses + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_fabric_io_run_training( void *io_pArgs ); + + + +/** + * @brief host_startPRD_pbus + * + * 08.4 : : Load PRD for powerbus domain + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_startPRD_pbus( void *io_pArgs ); + + + +/** + * @brief host_attnlisten_proc + * + * 08.5 : : Start listening for attentions + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_attnlisten_proc( void *io_pArgs ); + + + +/** + * @brief proc_fab_iovalid + * + * 08.6 : : Lower functional fences on local SMP + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_fab_iovalid( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/edi_ei_initialization/makefile b/src/usr/hwpf/hwp/edi_ei_initialization/makefile new file mode 100644 index 000000000..5f3f92e09 --- /dev/null +++ b/src/usr/hwpf/hwp/edi_ei_initialization/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/edi_ei_initialization/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = edi_ei_initialization + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/edi_ei_initialization + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/edi_ei_initialization/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = edi_ei_initialization.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/edi_ei_initialization/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C new file mode 100644 index 000000000..a517ce5a4 --- /dev/null +++ b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C @@ -0,0 +1,234 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file establish_system_smp.C + * + * Support file for IStep: establish_system_smp + * Establish System SMP + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1611 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "establish_system_smp.H" + +// Uncomment these files as they become available: +// #include "host_coalesce_host/host_coalesce_host.H" +// #include "proc_tod_setup/proc_tod_setup.H" +// #include "proc_tod_init/proc_tod_init.H" + +namespace ESTABLISH_SYSTEM_SMP +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 18.8 : +// host_coalesce_host +// +void call_host_coalesce_host( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_coalesce_host entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_coalesce_host, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_coalesce_host exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 18.9 : +// proc_tod_setup +// +void call_proc_tod_setup( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_tod_setup entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_tod_setup, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_tod_setup exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 18.10 : +// proc_tod_init +// +void call_proc_tod_init( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_tod_init entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_tod_init, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_tod_init exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.H b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.H new file mode 100644 index 000000000..a5208fe97 --- /dev/null +++ b/src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.H @@ -0,0 +1,122 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/establish_system_smp/establish_system_smp.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __ESTABLISH_SYSTEM_SMP_ESTABLISH_SYSTEM_SMP_H +#define __ESTABLISH_SYSTEM_SMP_ESTABLISH_SYSTEM_SMP_H + +/** + * @file establish_system_smp.H + * + * Establish System SMP + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1611 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname establish_system_smp + * @istepnum 18 + * @istepdesc Establish System SMP + * + * @{ + * @substepnum 8 + * @substepname host_coalesce_host + * @substepdesc : Create single host image + * @target_sched serial + * @} + * @{ + * @substepnum 9 + * @substepname proc_tod_setup + * @substepdesc : Setup TOD + * @target_sched serial + * @} + * @{ + * @substepnum 10 + * @substepname proc_tod_init + * @substepdesc : Init TOD + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace ESTABLISH_SYSTEM_SMP +{ + + + +/** + * @brief host_coalesce_host + * + * 18.8 : : Create single host image + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_coalesce_host( void *io_pArgs ); + + + +/** + * @brief proc_tod_setup + * + * 18.9 : : Setup TOD + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_tod_setup( void *io_pArgs ); + + + +/** + * @brief proc_tod_init + * + * 18.10 : : Init TOD + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_tod_init( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/establish_system_smp/makefile b/src/usr/hwpf/hwp/establish_system_smp/makefile new file mode 100644 index 000000000..3a13446e7 --- /dev/null +++ b/src/usr/hwpf/hwp/establish_system_smp/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/establish_system_smp/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = establish_system_smp + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/establish_system_smp + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/establish_system_smp/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = establish_system_smp.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/establish_system_smp/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/load_payload/load_payload.C b/src/usr/hwpf/hwp/load_payload/load_payload.C new file mode 100644 index 000000000..ee2531d1c --- /dev/null +++ b/src/usr/hwpf/hwp/load_payload/load_payload.C @@ -0,0 +1,126 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/load_payload/load_payload.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file load_payload.C + * + * Support file for IStep: load_payload + * Load Payload + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1612 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "load_payload.H" + +// Uncomment these files as they become available: +// #include "host_load_payload/host_load_payload.H" + +namespace LOAD_PAYLOAD +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 20.1 : +// host_load_payload +// +void call_host_load_payload( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_load_payload entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_load_payload, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_load_payload exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/load_payload/load_payload.H b/src/usr/hwpf/hwp/load_payload/load_payload.H new file mode 100644 index 000000000..c5c9bc27e --- /dev/null +++ b/src/usr/hwpf/hwp/load_payload/load_payload.H @@ -0,0 +1,82 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/load_payload/load_payload.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __LOAD_PAYLOAD_LOAD_PAYLOAD_H +#define __LOAD_PAYLOAD_LOAD_PAYLOAD_H + +/** + * @file load_payload.H + * + * Load Payload + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1612 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname load_payload + * @istepnum 20 + * @istepdesc Load Payload + * + * @{ + * @substepnum 1 + * @substepname host_load_payload + * @substepdesc : Load payload + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace LOAD_PAYLOAD +{ + + + +/** + * @brief host_load_payload + * + * 20.1 : : Load payload + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_load_payload( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/load_payload/makefile b/src/usr/hwpf/hwp/load_payload/makefile new file mode 100644 index 000000000..9c847fd7b --- /dev/null +++ b/src/usr/hwpf/hwp/load_payload/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/load_payload/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = load_payload + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/load_payload + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/load_payload/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = load_payload.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/load_payload/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/makefile b/src/usr/hwpf/hwp/makefile index 1b61ac826..5bdb3a274 100644 --- a/src/usr/hwpf/hwp/makefile +++ b/src/usr/hwpf/hwp/makefile @@ -40,7 +40,10 @@ OBJS = fapiTestHwp.o \ dimmBadDqBitmapAccessHwp.o SUBDIRS = dmi_training.d sbe_centaur_init.d mc_init.d \ - dram_training.d + dram_training.d activate_powerbus.d build_winkle_images.d \ + core_activate.d dram_initialization.d edi_ei_initialization.d \ + establish_system_smp.d load_payload.d \ + start_clocks_on_nest_chiplets.d start_payload.d include ${ROOTPATH}/config.mk diff --git a/src/usr/hwpf/hwp/mc_init/mc_init.H b/src/usr/hwpf/hwp/mc_init/mc_init.H index cd09f6257..e62593432 100644 --- a/src/usr/hwpf/hwp/mc_init/mc_init.H +++ b/src/usr/hwpf/hwp/mc_init/mc_init.H @@ -38,35 +38,36 @@ * */ -/* @tag isteplist - * @docversion v0.99 (02/10/12) - * @istepname mc_init - * @istepnum 12 - * @istepdesc Step 12 MC Init - * @{ - * @substepnum 1 - * @substepname host_collect_dimm_spd - * @substepdesc : Collect Master dimm SPD - * @target_sched serial - * @} - * @{ - * @substepnum 2 - * @substepname mss_volt - * @substepdesc : Calc dimm voltage - * @target_sched serial - * @} - * @{ - * @substepnum 3 - * @substepname mss_freq - * @substepdesc : Calc dimm frequency - * @target_sched serial - * @} - * @{ - * @substepnum 4 - * @substepname mss_eff_config - * @substepdesc : Determine effective config - * @target_sched serial - * @} +/* @tag isteplist + * @docversion v0.99 (02/10/12) + * @istepname mc_init + * @istepnum 12 + * @istepdesc Step 12 MC Init + * + * @{ + * @substepnum 1 + * @substepname host_collect_dimm_spd + * @substepdesc : Collect Master dimm SPD + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname mss_volt + * @substepdesc : Calc dimm voltage + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname mss_freq + * @substepdesc : Calc dimm frequency + * @target_sched serial + * @} + * @{ + * @substepnum 4 + * @substepname mss_eff_config + * @substepdesc : Determine effective config + * @target_sched serial + * @} */ /******************************************************************************/ // Includes 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 5ac08041c..8e6611d8e 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 @@ -289,30 +289,32 @@ void call_cen_sbe_tp_chiplet_init1( void *io_pArgs ) // -// Wrapper function to call 10.2 : cen_sbe_tp_arrayinit +// Wrapper function to call 10.2 : cen_sbe_npll_initf // -void call_cen_sbe_tp_arrayinit( void *io_pArgs ) +void call_cen_sbe_npll_initf( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_arrayinit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_pll_initf entry" ); // figure out what targets we need // ADD TARGET CODE HERE TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== cen_sbe_tp_arrayinit HWP(? ? ? )" ); + "===== cen_sbe_pll_initf HWP(? ? ? )" ); + #if 0 // call the HWP with each target ( if parallel, spin off a task ) - l_fapirc = cen_sbe_tp_arrayinit( ? , ?, ? ); + l_fapirc = cen_sbe_pll_initf( ? , ?, ? ); #endif // process return code. if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_sbe_tp_arrayinit HWP(? ? ? )" ); + "SUCCESS : cen_sbe_pll_initf HWP(? ? ? )" ); } else { @@ -320,15 +322,17 @@ void call_cen_sbe_tp_arrayinit( void *io_pArgs ) * @todo fapi error - just print out for now... */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR %d: cen_sbe_tp_arrayinit HWP(? ? ?) ", + "ERROR %d: cen_sbe_pll_initf HWP(? ? ?) ", static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_arrayinit exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_pll_initf exit" ); task_end2( NULL ); } + // // Wrapper function to call 10.3 : cen_sbe_tp_chiplet_init2 // @@ -337,7 +341,8 @@ void call_cen_sbe_tp_chiplet_init2( void *io_pArgs ) fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init2 entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_chiplet_init2" ); // figure out what targets we need @@ -365,37 +370,39 @@ void call_cen_sbe_tp_chiplet_init2( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init2 exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_chiplet_init2" ); task_end2( NULL ); } // -// Wrapper function to call 10.4 : cen_sbe_tp_chiplet_init3 +// Wrapper function to call 10.4 : cen_sbe_tp_arrayinit // -void call_cen_sbe_tp_chiplet_init3( void *io_pArgs ) +void call_cen_sbe_tp_arrayinit( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init3 entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_arrayinit entry" ); // figure out what targets we need // ADD TARGET CODE HERE TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== cen_sbe_tp_chiplet_init3 HWP(? ? ? )" ); + "===== cen_sbe_tp_arrayinit HWP(? ? ? )" ); #if 0 // call the HWP with each target ( if parallel, spin off a task ) - l_fapirc = cen_sbe_tp_chiplet_init3( ? , ?, ? ); + l_fapirc = cen_sbe_tp_arrayinit( ? , ?, ? ); #endif // process return code. if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_sbe_tp_chiplet_init3 HWP(? ? ? )" ); + "SUCCESS : cen_sbe_tp_arrayinit HWP(? ? ? )" ); } else { @@ -403,41 +410,44 @@ void call_cen_sbe_tp_chiplet_init3( void *io_pArgs ) * @todo fapi error - just print out for now... */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR %d: cen_sbe_tp_chiplet_init3 HWP(? ? ?) ", + "ERROR %d: cen_sbe_tp_arrayinit HWP(? ? ?) ", static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_tp_chiplet_init3 exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_arrayinit exit" ); task_end2( NULL ); } + // -// Wrapper function to call 10.5 : cen_sbe_chiplet_init +// Wrapper function to call 10.5 : cen_sbe_tp_chiplet_init3 // -void call_cen_sbe_chiplet_init( void *io_pArgs ) +void call_cen_sbe_tp_chiplet_init3( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_chiplet_init entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_chiplet_init3 entry" ); // figure out what targets we need // ADD TARGET CODE HERE TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== cen_sbe_chiplet_init HWP(? ? ? )" ); + "===== cen_sbe_tp_chiplet_init3 HWP(? ? ? )" ); #if 0 // call the HWP with each target ( if parallel, spin off a task ) - l_fapirc = cen_sbe_chiplet_init( ? , ?, ? ); + l_fapirc = cen_sbe_tp_chiplet_init3( ? , ?, ? ); #endif // process return code. if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_sbe_chiplet_init HWP(? ? ? )" ); + "SUCCESS : cen_sbe_tp_chiplet_init3 HWP(? ? ? )" ); } else { @@ -445,41 +455,43 @@ void call_cen_sbe_chiplet_init( void *io_pArgs ) * @todo fapi error - just print out for now... */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR %d: cen_sbe_chiplet_init HWP(? ? ?) ", + "ERROR %d: cen_sbe_tp_chiplet_init3 HWP(? ? ?) ", static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_chiplet_init exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_tp_chiplet_init3 exit" ); task_end2( NULL ); } // -// Wrapper function to call 10.6 : cen_sbe_arrayinit +// Wrapper function to call 10.6 : cen_sbe_chiplet_init // -void call_cen_sbe_arrayinit( void *io_pArgs ) +void call_cen_sbe_chiplet_init( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_arrayinit entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_chiplet_init entry" ); // figure out what targets we need // ADD TARGET CODE HERE TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== cen_sbe_arrayinit HWP(? ? ? )" ); + "===== cen_sbe_chiplet_init HWP(? ? ? )" ); #if 0 // call the HWP with each target ( if parallel, spin off a task ) - l_fapirc = cen_sbe_arrayinit( ? , ?, ? ); + l_fapirc = cen_sbe_chiplet_init( ? , ?, ? ); #endif // process return code. if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_sbe_arrayinit HWP(? ? ? )" ); + "SUCCESS : cen_sbe_chiplet_init HWP(? ? ? )" ); } else { @@ -487,42 +499,43 @@ void call_cen_sbe_arrayinit( void *io_pArgs ) * @todo fapi error - just print out for now... */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR %d: cen_sbe_arrayinit HWP(? ? ?) ", + "ERROR %d: cen_sbe_chiplet_init HWP(? ? ?) ", static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_arrayinit exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_chiplet_init exit" ); task_end2( NULL ); } // -// Wrapper function to call 10.7 : cen_sbe_pll_initf +// Wrapper function to call 10.7 : cen_sbe_arrayinit // -void call_cen_sbe_pll_initf( void *io_pArgs ) +void call_cen_sbe_arrayinit( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_pll_initf entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_arrayinit entry" ); // figure out what targets we need // ADD TARGET CODE HERE TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "===== cen_sbe_pll_initf HWP(? ? ? )" ); - + "===== cen_sbe_arrayinit HWP(? ? ? )" ); #if 0 // call the HWP with each target ( if parallel, spin off a task ) - l_fapirc = cen_sbe_pll_initf( ? , ?, ? ); + l_fapirc = cen_sbe_arrayinit( ? , ?, ? ); #endif // process return code. if ( l_fapirc== fapi::FAPI_RC_SUCCESS ) { TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "SUCCESS : cen_sbe_pll_initf HWP(? ? ? )" ); + "SUCCESS : cen_sbe_arrayinit HWP(? ? ? )" ); } else { @@ -530,16 +543,16 @@ void call_cen_sbe_pll_initf( void *io_pArgs ) * @todo fapi error - just print out for now... */ TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, - "ERROR %d: cen_sbe_pll_initf HWP(? ? ?) ", + "ERROR %d: cen_sbe_arrayinit HWP(? ? ?) ", static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_pll_initf exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_arrayinit exit" ); task_end2( NULL ); } - // // Wrapper function to call 10.8 : cen_sbe_dts_init // @@ -548,7 +561,8 @@ void call_cen_sbe_dts_init( void *io_pArgs ) fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_dts_init entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_dts_init entry" ); // figure out what targets we need @@ -576,7 +590,8 @@ void call_cen_sbe_dts_init( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_dts_init exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_dts_init exit" ); task_end2( NULL ); } @@ -590,7 +605,8 @@ void call_cen_sbe_initf( void *io_pArgs ) fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_initf entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_initf entry" ); // figure out what targets we need @@ -618,7 +634,8 @@ void call_cen_sbe_initf( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_initf exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_initf exit" ); task_end2( NULL ); } @@ -632,7 +649,8 @@ void call_cen_sbe_do_manual_inits( void *io_pArgs ) fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_do_manual_inits entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_do_manual_inits entry" ); // figure out what targets we need @@ -660,21 +678,23 @@ void call_cen_sbe_do_manual_inits( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_do_manual_inits exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_do_manual_inits exit" ); task_end2( NULL ); } // -// Wrapper function to call 10.11 : cen_sbe_startclocks +// Wrapper function to call 10.11 : cen_sbe_nest_startclocks // -void call_cen_sbe_startclocks( void *io_pArgs ) +void call_cen_sbe_nest_startclocks( void *io_pArgs ) { fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_startclocks entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_startclocks entry" ); // figure out what targets we need @@ -702,7 +722,8 @@ void call_cen_sbe_startclocks( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_startclocks exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_startclocks exit" ); task_end2( NULL ); } @@ -716,7 +737,8 @@ void call_cen_sbe_scominits( void *io_pArgs ) fapi::ReturnCode l_fapirc; - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_scominits entry" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_scominits entry" ); // figure out what targets we need @@ -744,7 +766,8 @@ void call_cen_sbe_scominits( void *io_pArgs ) static_cast<uint32_t>(l_fapirc) ); } - TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, "call_cen_sbe_scominits exit" ); + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_cen_sbe_scominits exit" ); task_end2( NULL ); } diff --git a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.H b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.H index f0e5cfd12..851f23516 100644 --- a/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.H +++ b/src/usr/hwpf/hwp/sbe_centaur_init/sbe_centaur_init.H @@ -46,8 +46,8 @@ * * @{ * @substepnum 2 - * @substepname cen_sbe_tp_arrayinit - * @substepdesc : Cen TP Chiplet array init + * @substepname cen_sbe_npll_initf + * @substepdesc : TP Chiplet Init * @target_sched serial * @} * @@ -60,53 +60,61 @@ * * @{ * @substepnum 4 - * @substepname cen_sbe_tp_chiplet_init3 - * @substepdesc : Cen TP Chiplet Start c0locks + * @substepname cen_sbe_tp_arrayinit + * @substepdesc : Cen TP Chiplet array init * @target_sched serial * @} * + * * @{ * @substepnum 5 + * @substepname cen_sbe_tp_chiplet_init3 + * @substepdesc : Cen TP Chiplet Start clocks + * @target_sched serial + * @} + * + * @{ + * @substepnum 6 * @substepname cen_sbe_chiplet_init * @substepdesc : Cen Chiplet Init * @target_sched serial * @} * * @{ - * @substepnum 6 + * @substepnum 7 * @substepname cen_sbe_arrayinit * @substepdesc : Chiplet array init * @target_sched serial * @} * @{ - * @substepnum 7 + * @substepnum 8 * @substepname cen_sbe_pll_initf * @substepdesc : Cen PLL Init * @target_sched serial * @} * @{ - * @substepnum 8 + * @substepnum 9 * @substepname cen_sbe_dts_init * @substepdesc : Cen DTS Init * @target_sched serial * @} * * @{ - * @substepnum 9 + * @substepnum 10 * @substepname cen_sbe_initf * @substepdesc :Cen Scan overrides * @target_sched serial * @} * * @{ - * @substepnum 10 + * @substepnum 11 * @substepname cen_sbe_do_manual_inits * @substepdesc : Manual Cen Scans * @target_sched serial * @} * * @{ - * @substepnum 11 + * @substepnum 12 * @substepname cen_sbe_startclocks * @substepdesc : Start Cen Nest * @target_sched serial @@ -135,33 +143,31 @@ namespace SBE_CENTAUR_INIT * * 10.1 : : Cen TP Chiplet Init 1 * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ void call_cen_sbe_tp_chiplet_init1( void * io_pArgs ); - /** - * @brief cen_sbe_tp_arrayinit + * @brief cen_sbe_npll_initf * - * 10.2 : Cen TP Chiplet array init + * 10.2 : TP Chiplet Init * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, - * or NULL. + * param[in,out] io_pArgs - (normally) a pointer to args, or + * NULL. * return none * */ - void call_cen_sbe_tp_arrayinit( void * io_pArgs ); - + void call_cen_sbe_npll_initf( void * io_pArgs ); /** * @brief cen_sbe_tp_chiplet_init2 * * 10.3 : Cen TP Chiplet Repair * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * @@ -170,55 +176,55 @@ namespace SBE_CENTAUR_INIT /** - * @brief cen_sbe_tp_chiplet_init3 + * @brief cen_sbe_tp_arrayinit * - * 10.4 : Cen TP Chiplet Start c0locks + * 10.4 : Cen TP Chiplet array init * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ - void call_cen_sbe_tp_chiplet_init3( void * io_pArgs ); + void call_cen_sbe_tp_arrayinit( void * io_pArgs ); /** - * @brief cen_sbe_chiplet_init + * @brief cen_sbe_tp_chiplet_init3 * - * 10.5 : Cen Chiplet Init + * 10.5 : Cen TP Chiplet Start c0locks * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ - void call_cen_sbe_chiplet_init( void * io_pArgs ); + void call_cen_sbe_tp_chiplet_init3( void * io_pArgs ); /** - * @brief cen_sbe_arrayinit + * @brief cen_sbe_chiplet_init * - * 10.6 : Chiplet array init + * 10.6 : Cen Chiplet Init * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ - void call_cen_sbe_arrayinit( void * io_pArgs ); + void call_cen_sbe_chiplet_init( void * io_pArgs ); /** - * @brief cen_sbe_pll_initf + * @brief cen_sbe_arrayinit * - * 10.7 : Cen PLL Init + * 10.7 : Chiplet array init * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ - void call_cen_sbe_pll_initf( void * io_pArgs ); + void call_cen_sbe_arrayinit( void * io_pArgs ); /** @@ -226,7 +232,7 @@ namespace SBE_CENTAUR_INIT * * 10.8 : Cen DTS Init * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * @@ -239,7 +245,7 @@ namespace SBE_CENTAUR_INIT * * 10.9 : Cen Scan overrides * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * @@ -252,7 +258,7 @@ namespace SBE_CENTAUR_INIT * * 10.10 : Manual Cen Scans * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * @@ -261,16 +267,16 @@ namespace SBE_CENTAUR_INIT /** - * @brief cen_sbe_startclocks + * @brief cen_sbe_neststartclocks * * 10.11 : Start Cen Nest * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * */ - void call_cen_sbe_startclocks( void * io_pArgs ); + void call_cen_sbe_nest_startclocks( void * io_pArgs ); /** @@ -278,7 +284,7 @@ namespace SBE_CENTAUR_INIT * * 10.12 : Perform any Cen scom inits * - * param[in,out] io_pArgs - (normally) a pointer to a TaskArgs struct, + * param[in,out] io_pArgs - (normally) a pointer to args, * or NULL. * return none * diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile new file mode 100644 index 000000000..d9293a914 --- /dev/null +++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = start_clocks_on_nest_chiplets + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = start_clocks_on_nest_chiplets.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C new file mode 100644 index 000000000..dec4dd82b --- /dev/null +++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C @@ -0,0 +1,288 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file start_clocks_on_nest_chiplets.C + * + * Support file for IStep: start_clocks_on_nest_chiplets + * Start Clocks On Nest Chiplets + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1605 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "start_clocks_on_nest_chiplets.H" + +// Uncomment these files as they become available: +// #include "proc_a_x_pci_dmi_pll_setup/proc_a_x_pci_dmi_pll_setup.H" +// #include "proc_startclock_chiplets/proc_startclock_chiplets.H" +// #include "proc_chiplet_scominit/proc_chiplet_scominit.H" +// #include "proc_scomoverride_chiplets/proc_scomoverride_chiplets.H" + +namespace START_CLOCKS_ON_NEST_CHIPLETS +{ + +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 ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_setup entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_a_x_pci_dmi_pll_setup, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_a_x_pci_dmi_pll_setup exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 07.2 : +// proc_startclock_chiplets +// +void call_proc_startclock_chiplets( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_startclock_chiplets entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_startclock_chiplets, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_startclock_chiplets exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 07.3 : +// proc_chiplet_scominit +// +void call_proc_chiplet_scominit( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_scominit entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_chiplet_scominit, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_chiplet_scominit exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + + +// +// Wrapper function to call 07.4 : +// proc_scomoverride_chiplets +// +void call_proc_scomoverride_chiplets( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_scomoverride_chiplets entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, proc_scomoverride_chiplets, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_proc_scomoverride_chiplets exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H new file mode 100644 index 000000000..1f1503dd9 --- /dev/null +++ b/src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H @@ -0,0 +1,142 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/start_clocks_on_nest_chiplets/start_clocks_on_nest_chiplets.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __START_CLOCKS_ON_NEST_CHIPLETS_START_CLOCKS_ON_NEST_CHIPLETS_H +#define __START_CLOCKS_ON_NEST_CHIPLETS_START_CLOCKS_ON_NEST_CHIPLETS_H + +/** + * @file start_clocks_on_nest_chiplets.H + * + * Start Clocks On Nest Chiplets + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1605 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname start_clocks_on_nest_chiplets + * @istepnum 07 + * @istepdesc Start Clocks On Nest Chiplets + * + * @{ + * @substepnum 1 + * @substepname proc_a_x_pci_dmi_pll_setup + * @substepdesc : Setup PLL for A, X, PCIe, DMI + * @target_sched serial + * @} + * @{ + * @substepnum 2 + * @substepname proc_startclock_chiplets + * @substepdesc : Start clocks on A, X, PCIe chiplets + * @target_sched serial + * @} + * @{ + * @substepnum 3 + * @substepname proc_chiplet_scominit + * @substepdesc : Apply scom inits to chiplets + * @target_sched serial + * @} + * @{ + * @substepnum 4 + * @substepname proc_scomoverride_chiplets + * @substepdesc : Apply sequenced scom inits + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace START_CLOCKS_ON_NEST_CHIPLETS +{ + + + +/** + * @brief proc_a_x_pci_dmi_pll_setup + * + * 07.1 : : Setup PLL for A, X, PCIe, DMI + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +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 + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_startclock_chiplets( void *io_pArgs ); + + + +/** + * @brief proc_chiplet_scominit + * + * 07.3 : : Apply scom inits to chiplets + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_chiplet_scominit( void *io_pArgs ); + + + +/** + * @brief proc_scomoverride_chiplets + * + * 07.4 : : Apply sequenced scom inits + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_proc_scomoverride_chiplets( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/hwpf/hwp/start_payload/makefile b/src/usr/hwpf/hwp/start_payload/makefile new file mode 100644 index 000000000..5f66a867c --- /dev/null +++ b/src/usr/hwpf/hwp/start_payload/makefile @@ -0,0 +1,56 @@ +# IBM_PROLOG_BEGIN_TAG +# This is an automatically generated prolog. +# +# $Source: src/usr/hwpf/hwp/start_payload/makefile $ +# +# IBM CONFIDENTIAL +# +# COPYRIGHT International Business Machines Corp. 2012 +# +# p1 +# +# Object Code Only (OCO) source materials +# Licensed Internal Code Source Materials +# IBM HostBoot Licensed Internal Code +# +# The source code for this program is not published or other- +# wise divested of its trade secrets, irrespective of what has +# been deposited with the U.S. Copyright Office. +# +# Origin: 30 +# +# IBM_PROLOG_END + +ROOTPATH = ../../../../.. + +MODULE = start_payload + +## support for Targeting and fapi +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 + +## pointer to common HWP files +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/include + +## NOTE: add the base istep dir here. +EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_payload + +## Include sub dirs +## NOTE: add a new EXTRAINCDIR when you add a new HWP +## EXAMPLE: +## EXTRAINCDIR += ${ROOTPATH}/src/usr/hwpf/hwp/start_payload/<HWP_dir> + + +## NOTE: add new object files when you add a new HWP +OBJS = start_payload.o + + +## NOTE: add a new directory onto the vpaths when you add a new HWP +## EXAMPLE: +# VPATH += ${ROOTPATH}/src/usr/hwpf/hwp/start_payload/<HWP_dir> + + +include ${ROOTPATH}/config.mk + diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.C b/src/usr/hwpf/hwp/start_payload/start_payload.C new file mode 100644 index 000000000..85061f667 --- /dev/null +++ b/src/usr/hwpf/hwp/start_payload/start_payload.C @@ -0,0 +1,126 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/start_payload/start_payload.C $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +/** + * @file start_payload.C + * + * Support file for IStep: start_payload + * Start Payload + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1613 + * ***************************************************************** + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +#include <trace/interface.H> +#include <initservice/taskargs.H> +#include <errl/errlentry.H> + +#include <initservice/isteps_trace.H> + +// targeting support +#include <targeting/attributes.H> +#include <targeting/entitypath.H> +#include <targeting/target.H> +#include <targeting/targetservice.H> +#include <targeting/iterators/rangefilter.H> +#include <targeting/predicates/predicatectm.H> +#include <targeting/predicates/predicatepostfixexpr.H> +#include <targeting/predicates/predicateisfunctional.H> + +// fapi support +#include <fapi.H> +#include <fapiPlatHwpInvoker.H> + +#include "start_payload.H" + +// Uncomment these files as they become available: +// #include "host_start_payload/host_start_payload.H" + +namespace START_PAYLOAD +{ + +using namespace TARGETING; +using namespace fapi; + + + +// +// Wrapper function to call 21.1 : +// host_start_payload +// +void call_host_start_payload( void *io_pArgs ) +{ + errlHndl_t l_errl = NULL; + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_start_payload entry" ); + +#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) + + // 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 + FAPI_INVOKE_HWP( l_errl, host_start_payload, _args_...); + if ( l_errl ) + { + TRACFCOMP(ISTEPS_TRACE::g_trac_isteps_trace, + "ERROR : .........." ); + errlCommit( l_errl, HWPF_COMP_ID ); + } + else + { + TRACFCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "SUCCESS : .........." ); + } + // @@@@@ END CUSTOM BLOCK: @@@@@ +#endif + + TRACDCOMP( ISTEPS_TRACE::g_trac_isteps_trace, + "call_host_start_payload exit" ); + + // end task, returning any errorlogs to IStepDisp + task_end2( l_errl ); +} + + +}; // end namespace diff --git a/src/usr/hwpf/hwp/start_payload/start_payload.H b/src/usr/hwpf/hwp/start_payload/start_payload.H new file mode 100644 index 000000000..0428dd6d5 --- /dev/null +++ b/src/usr/hwpf/hwp/start_payload/start_payload.H @@ -0,0 +1,82 @@ +// IBM_PROLOG_BEGIN_TAG +// This is an automatically generated prolog. +// +// $Source: src/usr/hwpf/hwp/start_payload/start_payload.H $ +// +// IBM CONFIDENTIAL +// +// COPYRIGHT International Business Machines Corp. 2012 +// +// p1 +// +// Object Code Only (OCO) source materials +// Licensed Internal Code Source Materials +// IBM HostBoot Licensed Internal Code +// +// The source code for this program is not published or other- +// wise divested of its trade secrets, irrespective of what has +// been deposited with the U.S. Copyright Office. +// +// Origin: 30 +// +// IBM_PROLOG_END + +#ifndef __START_PAYLOAD_START_PAYLOAD_H +#define __START_PAYLOAD_START_PAYLOAD_H + +/** + * @file start_payload.H + * + * Start Payload + * + * All of the following routines are "named isteps" - they are invoked as + * tasks by the @ref IStepDispatcher. + * + * ***************************************************************** + * THIS FILE WAS GENERATED ON 2012-04-11:1613 + * ***************************************************************** + * + */ + + /* @tag isteplist + * @docversion v1.01 (03/26/12) + * @istepname start_payload + * @istepnum 21 + * @istepdesc Start Payload + * + * @{ + * @substepnum 1 + * @substepname host_start_payload + * @substepdesc : Start Payload + * @target_sched serial + * @} + * + */ + +/******************************************************************************/ +// Includes +/******************************************************************************/ +#include <stdint.h> + +namespace START_PAYLOAD +{ + + + +/** + * @brief host_start_payload + * + * 21.1 : : Start Payload + * + * param[in,out] - pointer to any arguments, usually NULL + * + * return none + * + */ +void call_host_start_payload( void *io_pArgs ); + + +}; // end namespace + +#endif + diff --git a/src/usr/initservice/istepdispatcher/istepdispatcher.C b/src/usr/initservice/istepdispatcher/istepdispatcher.C index 9a97ad38c..8d55a30f1 100644 --- a/src/usr/initservice/istepdispatcher/istepdispatcher.C +++ b/src/usr/initservice/istepdispatcher/istepdispatcher.C @@ -102,6 +102,8 @@ extern trace_desc_t *g_trac_initsvc; TASK_ENTRY_MACRO( IStepDispatcher::getTheInstance().init ); + + void IStepDispatcher::init( errlHndl_t &io_rtaskRetErrl ) { errlHndl_t l_errl = NULL; @@ -191,11 +193,16 @@ void IStepDispatcher::runAllISteps( errlHndl_t &io_rtaskRetErrl ) for ( l_IStep=0; - l_IStep<INITSERVICE::MAX_ISTEPS; + l_IStep<INITSERVICE::MaxISteps; l_IStep++ ) { + TRACDCOMP( g_trac_initsvc, + "runAllISteps: IStep %d: %d entries", + l_IStep, + g_isteps[l_IStep].numitems ); + for ( l_SubStep=0; - l_SubStep < INITSERVICE::MAX_SUBSTEPS; + l_SubStep < g_isteps[l_IStep].numitems; l_SubStep++) { /** @@ -208,8 +215,8 @@ void IStepDispatcher::runAllISteps( errlHndl_t &io_rtaskRetErrl ) l_SubStep ); if ( l_pistep == NULL ) { - - break; // break out of inner for loop + // continue to end of list + continue; } // @todo placeholder until progress codes are defined and @@ -474,7 +481,6 @@ errlHndl_t IStepDispatcher::processSingleIStepCmd( i_Substep ); o_rSts = SPLESS_INVALID_COMMAND; - break; } @@ -487,7 +493,7 @@ errlHndl_t IStepDispatcher::processSingleIStepCmd( InitService::getTheInstance().setProgressCode( l_progresscode ); - TRACDCOMP( g_trac_initsvc, + TRACFCOMP( g_trac_initsvc, "processSingleIStepCmd: Run IStep=%d.%d %s", i_IStep, i_Substep, @@ -545,7 +551,7 @@ const TaskInfo *IStepDispatcher::findTaskInfo( } // check input range - IStep - if ( i_IStep >= MAX_ISTEPS ) + if ( i_IStep >= INITSERVICE::MaxISteps ) { TRACDCOMP( g_trac_initsvc, "IStep %d out of range. (substep=%d) ", |

