summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorThi Tran <thi@us.ibm.com>2012-03-21 14:59:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-03-27 13:10:31 -0500
commite365e2055da924ce134e2f8263d47a6afba23e98 (patch)
treea6193f31b2d7fa05c884dca26a7f5250eddd9487 /src/build
parentf037d0552a46caae37b0e7371fc6ce4837ecce1c (diff)
downloadtalos-hostboot-e365e2055da924ce134e2f8263d47a6afba23e98.tar.gz
talos-hostboot-e365e2055da924ce134e2f8263d47a6afba23e98.zip
Update HB tool directories and VBU tool names
- mww branch hb-istep-notimeout patch 3 fix SeqNum Change-Id: I1d676ae7d2a3f3e9114ea00f5d3542aa280fdd52 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/781 Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/debug/hb-dump-debug2
-rwxr-xr-xsrc/build/debug/vpo-debug-framework.pl14
-rwxr-xr-xsrc/build/tools/genIStep.pl2
-rwxr-xr-xsrc/build/tools/hb-parsedump.pl8
-rw-r--r--src/build/vpo/Setup_Env483
-rwxr-xr-xsrc/build/vpo/VBU_Cacheline.pm39
-rwxr-xr-xsrc/build/vpo/do_sprint635
-rwxr-xr-xsrc/build/vpo/hb-dump2
-rwxr-xr-xsrc/build/vpo/hb-istep37
-rwxr-xr-xsrc/build/vpo/hb-virtdebug.pl16
10 files changed, 1178 insertions, 60 deletions
diff --git a/src/build/debug/hb-dump-debug b/src/build/debug/hb-dump-debug
index 20b0b2b54..4cbf08c4e 100755
--- a/src/build/debug/hb-dump-debug
+++ b/src/build/debug/hb-dump-debug
@@ -41,7 +41,7 @@ my $cfgMan = 0;
my $toolHelp = 0;
my $imgPath = "";
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if (defined ($hbDir))
{
if ($hbDir ne "")
diff --git a/src/build/debug/vpo-debug-framework.pl b/src/build/debug/vpo-debug-framework.pl
index 713b35ebd..4c51c6938 100755
--- a/src/build/debug/vpo-debug-framework.pl
+++ b/src/build/debug/vpo-debug-framework.pl
@@ -51,7 +51,7 @@ use constant NUMTHREADS => 8;
my %optionInfo = (
"--test" => ["Use the hbicore_test.syms file instead of the default."],
"--img-path=<path>" => ["The path to the \"img\" directory where the syms file, etc is located.",
- "User can also set the env variable HBDIR to the path of the \"img\"",
+ "User can also set the env variable HB_IMGDIR to the path of the \"img\"",
"directory instead of using this option."],
"--out-path=<path>" => ["The path to the directory where the output will be saved."],
"--debug" => ["Enable debug tracing."],
@@ -85,7 +85,7 @@ my $fh;
my $vbuToolDir = "/gsa/ausgsa/projects/h/hostboot/vbutools/latest";
my $imgPath = "";
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if (defined ($hbDir))
{
if ($hbDir ne "")
@@ -252,7 +252,7 @@ sub flushL2
#stop instructions
stopInstructions("all");
- my $command = "$vbuToolDir/p8_l2_flush_wrap.x86 @ecmdOpt $flag";
+ my $command = "$vbuToolDir/proc_l2_flush_wrap.x86 @ecmdOpt $flag";
die "ERROR: cannot flush L2" if (system("$command") != 0);
$l2Flushed = 1;
@@ -380,7 +380,7 @@ sub stopInstructions
my $thread = shift;
#Stopping all threads
- my $command = "$vbuToolDir/p8_thread_control.x86 @ecmdOpt -stop -t$thread $flag";
+ my $command = "$vbuToolDir/proc_thread_control.x86 @ecmdOpt -stop -t$thread $flag";
if ($debug)
{
@@ -396,7 +396,7 @@ sub startInstructions
my $thread = shift;
#Starting all threads
- my $command = "$vbuToolDir/p8_thread_control.x86 @ecmdOpt -start -t$thread $flag";
+ my $command = "$vbuToolDir/proc_thread_control.x86 @ecmdOpt -start -t$thread $flag";
if ($debug)
{
@@ -428,7 +428,7 @@ sub queryThreadState
{
my $thread = shift;
- my $command = "$vbuToolDir/p8_thread_control.x86 @ecmdOpt -query -t$thread";
+ my $command = "$vbuToolDir/proc_thread_control.x86 @ecmdOpt -query -t$thread";
my $result = `$command`;
if ($debug)
@@ -710,7 +710,7 @@ Use the hbicore_test.syms file instead of the default.
=item B<--img-path>=PATH
The path to the "img" directory where the syms file, etc is located.
-User can also set the env variable HBDIR to the path of the "img"
+User can also set the env variable HB_IMGDIR to the path of the "img"
directory instead of using this option.
=item B<--out-path>=PATH
diff --git a/src/build/tools/genIStep.pl b/src/build/tools/genIStep.pl
index a849e0142..cb8f2255b 100755
--- a/src/build/tools/genIStep.pl
+++ b/src/build/tools/genIStep.pl
@@ -509,7 +509,7 @@ const ExtTaskInfo g_istep\@istepnumTaskList = {
my $pgmDir = `dirname $0`;
chomp( $pgmDir );
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if ( ! defined( $hbDir) || ( $hbDir eq "" ) )
{
$hbDir = $pgmDir; ## Set to tool directory
diff --git a/src/build/tools/hb-parsedump.pl b/src/build/tools/hb-parsedump.pl
index 53653878a..547b6e06f 100755
--- a/src/build/tools/hb-parsedump.pl
+++ b/src/build/tools/hb-parsedump.pl
@@ -116,7 +116,7 @@ my $hbErrlParser = "errlparser";
my $cwd = getcwd();
my $outDir = $cwd; #Default = current working directory
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if (defined ($hbDir))
{
unless ($hbDir ne "")
@@ -479,15 +479,15 @@ sub printUsage()
print (" and extract the code version, kernel printk buffer, component\n");
print (" traces & error logs.\n\n");
print (" User should copy the relevant .syms file, hbotStringFile and errlparser\n");
- print (" to the current directory or set the env variable HBDIR to the path\n");
+ print (" to the current directory or set the env variable HB_IMGDIR to the path\n");
print (" of the files.\n\n");
print (" User should also set the env variable PATH to include the path to the fsp-trace");
print (" program.\n\n");
print (" --img-path: Overrides the automatically detected .syms file, hbotStringFile\n");
- print (" and errlparser in HBDIR or the current directory.\n");
+ print (" and errlparser in HB_IMGDIR or the current directory.\n");
print (" This program will search for the files in the following order:\n");
print (" 1. from the path specified by user\n");
- print (" 2. from HBDIR if it is defined\n");
+ print (" 2. from HB_IMGDIR if it is defined\n");
print (" 3. from the current directory\n");
print (" --out-path: Directory where the output data will be saved.\n");
print (" Default path is the current directory.\n");
diff --git a/src/build/vpo/Setup_Env b/src/build/vpo/Setup_Env
new file mode 100644
index 000000000..85687c80b
--- /dev/null
+++ b/src/build/vpo/Setup_Env
@@ -0,0 +1,483 @@
+################################################################################
+#
+# Setup intialization source script for HostBoot Sprint Release VPO/VBU model testing with cronus tools
+#
+#
+# Version 1.0 Copy from Jim's on 03/21/2012, tested on VBU & VPO
+#
+################################################################################
+
+# Define useful pointers to automated tests/scripts
+
+export JP=/gsa/pokgsa/home/m/c/mcguirej/public
+export JR=$JP/auto/rel
+export JD=$JP/auto/dev
+export JT=$JP/auto/tmp
+export JS=$JP/HBI/scripts
+
+# Local values used in this script
+
+AUTOVBU_HBRELEASE_BASEDIR=/gsa/ausgsa/projects/h/hostboot/release
+AUTOVBU_HBTOOLS_BASEDIR=$JP/HBI/hbtools
+AUTOVBU_HBVBUTOOLS_BASEDIR=$JP/HBI/vbutools
+
+# Remove any previous test definitions for HostBoot values - force everything to default if not set
+# by Setup_MyEnv function or user specifed argument(s)
+
+unset HB_IMGDIR HB_RELDIR HB_VBUTOOLS DEFAULT_LEVEL
+unset AWAN_CONFIG AWAN_SCRIPT AUTOVBU_ECMD_VER
+unset AUTOVBU_START AUTOVBU_ISTEP_START AUTOVBU_ISTEP_LIST AUTOVBU_ISTEP_CHKPT
+
+################################################################################
+#
+# User customizable environment setup function -- modify as desired for new test defaults
+#
+################################################################################
+
+Setup_MyEnv() {
+
+ # Default Sprint release
+
+ sprint=Sprint10
+
+ # Initialize HostBoot environment/cronus/tools - note new naming convention
+
+ export AUTOVBU_CRONUS_SIM=rel.20120312
+ export HB_TOOLS=$AUTOVBU_HBTOOLS_BASEDIR/rel.20120320
+
+ # Select default model -- choose either VBU or VPO versions
+
+ export VPO_MODEL=m_1_c; unset VBU_MODEL; VBUVPO=VPO
+ #export VBU_MODEL=p1_e8056_c1000_cen1_cen054_unopt_2_gfw; unset VPO_MODEL; VBUVPO=VBU
+ #export VBU_MODEL=p1_e8062_wafer_nomem_c1000_opt_4; unset VPO_MODEL; VBUVPO=VBU
+ #export VBU_MODEL=p1_e8062_c1000_cen1_cen061_unopt_1; unset VPO_MODEL; VBUVPO=VBU
+
+ # Default AWAN request time - shorter periods get AWAN faster
+
+ export AWAN_TIME_REQ=-h24
+
+ # Default sprint test case settings
+
+ export AUTOVBU_CORE=-c3
+ export AUTOVBU_SIMCLOCKS=2000000
+ export AUTOVBU_INITIAL_CHKPT=after_8megzero
+ export AUTOVBU_LOOPS=1200
+ export AUTOVBU_PRINTK_LINES=50
+
+ # Values used internally by automated tools
+
+ export AUTOVBU_USER_CMD=NO_TEST
+ export AUTOVPO_ROOTDIR=/afs/apd/func/awanng/vpo/vpo1/mur
+
+ test "$MY_BSO_ID" = "" && echo "Warning: Set MY_BSO_ID to IBM intranet ID if BSO firewall required"
+
+ return 0
+}
+
+################################################################################
+#
+# End User Customizable section -- Please do not modify shell functions below
+#
+################################################################################
+
+
+# Parse any user specified arguments
+
+Setup_MyArgs() {
+
+ # Set argument defaults
+
+ get_awan=
+ eval_list=
+ set_usercmd=
+ load_hb_img=
+
+ # Argument parse loop
+ while [ $# -gt 0 ]
+ do
+ case "$1"
+ in
+ -h|-help|--help)
+ echo "Usage: source Setup_Env [-get_awan|--get_awan] \\"
+ echo " [<-time|--time> <awan time>] \\"
+ echo " [<-model|--model> <model>] \\"
+ echo " [<-release|--release> <Sprint Release>] \\"
+ echo " [-load_hb_img|--load_hb_img] \\"
+ echo " [<-ecmd_ver|--ecmd_ver> <cronusflex|p8s1>] \\"
+ echo " [<-cronus|--cronus> <cronus version>] \\"
+ echo " [--] [<test script>] [<test args>]"
+ return 1
+ ;;
+ -get_awan|--get_awan)
+ get_awan=YES
+ ;;
+ -load_hb_img|--load_hb_img)
+ load_hb_img=YES
+ ;;
+ -model|--model)
+ if [ $# -lt 2 ]; then
+ echo "Missing/invalid model"
+ return 1
+ fi
+ export VPO_MODEL=$2
+ shift 1
+ ;;
+ -release|--release)
+ if [ $# -lt 2 ]; then
+ echo "Missing/invalid release argument"
+ return 1
+ fi
+ sprint=$2
+ shift 1
+ ;;
+ -cronus|--cronus)
+ if [ $# -lt 2 ]; then
+ echo "Missing/invalid cronus"
+ return 1
+ fi
+ export AUTOVBU_CRONUS_SIM=$2
+ shift 1
+ ;;
+ -ecmd_ver|--ecmd_ver)
+ if [ $# -lt 2 ]; then
+ echo "Missing/invalid cronus version (cronusflex, p8s1)"
+ return 1
+ fi
+ export AUTOVBU_ECMD_VER=$2
+ shift 1
+ ;;
+ -time|--time)
+ if [ $# -lt 2 ]; then
+ echo "Missing/invalid awan time"
+ return 1
+ fi
+ export AWAN_TIME_REQ="-$2"
+ shift 1
+ ;;
+ --)
+ ;;
+ *=*)
+ eval_list="$eval_list; export $1"
+ ;;
+ *)
+ test "$set_usercmd" = "" && AUTOVBU_USER_CMD="$*" && set_usercmd=yes
+ ;;
+ esac
+ shift
+ done
+
+ # Any additional arguments are assumed to be for a user specified test script
+
+ test "$1" = "--" && shift
+ test "$*" != "" && AUTOVBU_USER_CMD="$*"
+
+ # Now process any command line environmental settings
+
+ test "$eval_list" != "" && eval "$eval_list"
+
+ unset eval_list set_usercmd
+}
+
+# Dynamically set/reset values based upon current model
+
+Setup_MyDynamic() {
+
+ # Set remaining HostBoot variables now that we have all user supplied settings
+
+ export HB_RELDIR=${HB_RELDIR-`echo $AUTOVBU_HBRELEASE_BASEDIR/*$sprint`}
+ if [ ! -d "$HB_RELDIR" ]; then
+ echo "Can not find Sprint Release directory: $HB_RELDIR"
+ return 1
+ fi
+
+ export HB_VBUTOOLS=${HB_VBUTOOLS-$AUTOVBU_HBVBUTOOLS_BASEDIR/$AUTOVBU_CRONUS_SIM}
+ if [ ! -d "$HB_VBUTOOLS" ]; then
+ echo "Can not find HB_VBUTOOLS directory for cronus version $AUTOVBU_CRONUS_SIM"
+ return 1
+ fi
+
+ export HB_IMGDIR=${HB_IMGDIR-$HB_RELDIR}
+
+ # Set old names for backward compatibility
+
+ export HBDIR=$HB_IMGDIR
+ export HBRELDIR=$HB_RELDIR
+ export HBTOOLS=$HB_TOOLS
+ export VBUTOOLS=$HB_VBUTOOLS
+
+ # Dynamically determine if specifed model is for VPO or VBU
+ if [ "$VPO_MODEL" != "" ]; then
+ if [ ! -d $AUTOVPO_ROOTDIR/$VPO_MODEL ]; then
+ export VBU_MODEL=$VPO_MODEL; unset VPO_MODEL
+ VBUVPO=VBU
+ else
+ VBUVPO=VPO; unset VBU_MODEL
+ fi
+ else
+ VBUVPO=VBU
+ fi
+
+ # Set other defaults based upon MODEL
+ case "$VPO_MODEL$VBU_MODEL"
+ in
+ p1_e8062_wafer_nomem_c1000_opt_4)
+ export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
+ export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star4b}
+ export AWAN_CONFIG=${AWAN_CONFIG-star4b}
+ ;;
+ m_1_c|m_2_a|m_2_e|p1_e8056_c1000_cen1_cen054_unopt_2_gfw|p1_e8062_c1000_cen1_cen061_unopt_1)
+ export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-cronusflex}
+ export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b_flex}
+ export AWAN_CONFIG=${AWAN_CONFIG-star8b}
+ ;;
+ *)
+ export AUTOVBU_ECMD_VER=${AUTOVBU_ECMD_VER-p8s1}
+ export AWAN_SCRIPT=${AWAN_SCRIPT-run_script_star8b_p8s1}
+ export AWAN_CONFIG=${AWAN_CONFIG-star8b}
+ ;;
+ esac
+
+ # Try to dynamically set istep list if user did not supply a value
+
+ if [ "$AUTOVBU_ISTEP_LIST" = "" -f $HB_IMGDIR/isteplist.csv ]; then
+ export AUTOVBU_ISTEP_LIST=`cut -d',' -f3 <$HB_IMGDIR/isteplist.csv | tr '\n' ' '`
+ elif [ "$AUTOVBU_ISTEP_LIST" = "" -f $HB_TOOLS/isteplist.csv ]; then
+ export AUTOVBU_ISTEP_LIST=`cut -d',' -f3 <$HB_TOOLS/isteplist.csv | tr '\n' ' '`
+ fi
+
+ # Adjust PATH -- we want our tools at the beginning of the path, release tools at the end
+
+ echo $PATH | grep "$HB_RELDIR" >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ PATH=$PATH:$HB_RELDIR
+ fi
+
+ echo $PATH | grep "$HB_TOOLS" >/dev/null 2>&1
+ if [ $? -ne 0 ]; then
+ PATH=$HB_TOOLS:$PATH
+ fi
+}
+
+# Get the AWAN if requested by the user
+
+Setup_MyAWAN() {
+
+ # Allow testing with an Austin based VNC server, but we must run in POK and lower BSO firewall
+
+ if [ `hostname -d` != "pok.ibm.com" ]; then
+ echo "ERROR: This script must be sourced on a POK based Linux system (batchl004, vpopok2 or vpopok3)"
+ return 1
+ fi
+
+ # Make sure DISPLAY includes our host name
+
+ test "`expr index "$DISPLAY" ':'`" = "1" && DISPLAY=`hostname`$DISPLAY
+
+ # Defines used for AWAN communication
+
+ MY_AWAN_TARGET=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.target-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
+ MY_AWAN_HAVE=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.HAVE-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
+ MY_AWAN_INIT=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.init-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
+ MY_AWAN_KEEP=/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/awan/awan.KEEP-$VBU_MODEL$VPO_MODEL-${MY_AWAN_DIR-${MY_AFS_USER-$USER}}-$DISPLAY
+
+ if [ "$get_awan" = "YES" ]; then
+ (
+ # Check to see if we must lower BSO firewall
+
+ echo $DISPLAY | egrep "pok.ibm.com|boeblingen.de.ibm.com" >/dev/null
+ if [ $? -eq 0 ]; then
+ # POK/BOE based VNC servers should not need BSO
+ unset MY_BSO_ID
+ elif [ "$MY_BSO_ID" = "" ]; then
+ echo "ERROR: DISPLAY is set to a system not in the POK domain, but MY_BSO_ID is not set"
+ echo
+ echo " export MY_BSO_ID=<ibm_intranet_id>"
+ echo
+ exit 1
+ fi
+
+ unset my_bso_cmd
+ test "$MY_BSO_ID" != "" && my_bso_cmd="--lower_firewall $MY_BSO_ID"
+
+ # Pick up SIMDISPATCH level used by this cronus, and pass it to the AWAN request
+
+ if [ -f "$ECMD_EXE" ]; then
+ cronus_dir=`dirname $ECMD_EXE`
+ if [ -f "$cronus_dir/SIMDISP_RELEASE" ]; then
+ export SIMDISP_RELEASE=`cat $cronus_dir/SIMDISP_RELEASE`
+ else
+ unset SIMDISP_RELEASE
+ fi
+ fi
+
+ # Request AWAN and wait for it to initialize
+
+ echo
+ echo "Requesting an AWAN:"
+ echo
+ eval export P8_${VBUVPO}DD1_${VPO_MODEL}${VBU_MODEL}_AWAN_SCRIPT="$AWAN_SCRIPT"
+ #export -p | egrep "P8_${VBUVPO}DD1_.*AWAN_SCRIPT"; echo
+ vbuvpo=`echo $VBUVPO | tr '[A-Z]' '[a-z]'`
+ echo "$JR/auto${vbuvpo}test $my_bso_cmd --silent --keep_awan SIMDISP_RELEASE=$SIMDISP_RELEASE -- : $VBU_MODEL$VPO_MODEL:$AWAN_CONFIG:HBI=\\\$AUTOVBU_USER_CMD"
+ echo
+
+ $JR/auto${vbuvpo}test $my_bso_cmd --silent --keep_awan SIMDISP_RELEASE=$SIMDISP_RELEASE -- : $VBU_MODEL$VPO_MODEL:$AWAN_CONFIG:HBI=\$AUTOVBU_USER_CMD
+ ) || return 1
+ fi
+}
+
+# Setup our cronus target if we used the automated tool to acquire the AWAN
+
+Setup_MyTarget() {
+
+ # Check for AWAN using automated tools
+
+ if [ -f "$MY_AWAN_INIT" -o -f "$MY_AWAN_HAVE" ]; then
+ if [ ! -f "$MY_AWAN_TARGET" ]; then
+ # Pause a while for target to initialize
+ for i in 0 1 2 3 4 5
+ do
+ test -f "$MY_AWAN_TARGET" && break
+ echo "Waiting for $MY_AWAN_TARGET"
+ sleep 30
+ done
+ fi
+ fi
+
+ if [ -f $MY_AWAN_TARGET ]; then
+ my_target=`cat $MY_AWAN_TARGET`
+ touch $MY_AWAN_KEEP
+ else
+ # User is doing things on their own -- target must be set already
+# my_target=`target query 2>/dev/null | sed -n -e '/Current target/s/.*is "\(.*\)"/\1/p'`
+ my_target=$ECMD_TARGET
+ if [ "$my_target" = "" ]; then
+ echo "*** ERROR: Cronus target has not been set"
+ return 1
+ fi
+ fi
+ echo
+ target $my_target
+
+ if [ -f "$CRONUS_HOME/cnfgs/${my_target}_cnfg" ]; then
+ # Update target cronus config file
+ ed $CRONUS_HOME/cnfgs/${my_target}_cnfg <<__EOF__ >/dev/null 2>&1
+g/^HW_PROCEDURE_PATH/s,.*,HW_PROCEDURE_PATH = $HB_VBUTOOLS,
+w
+q
+__EOF__
+ egrep "^HW_PROCEDURE_PATH" $CRONUS_HOME/cnfgs/${my_target}_cnfg
+
+ else
+ echo
+ echo "*** WARNING: AWAN target config file was not found"
+ echo "User must manually set cronus target and update config file"
+ fi
+}
+
+# Load HostBoot image if requested
+
+Setup_MyHBImage() {
+
+ # User requested option?
+
+ if [ "$load_hb_img" = "YES" ]; then
+
+ # Allow HB_RELDIR setting to adjust load addresses as needed
+
+ vbu_targeting_addr=0x601690
+ echo "$HB_RELDIR" | grep -s "Sprint8" >/dev/null 2>&1
+ test $? -eq 0 && vbu_targeting_addr=0x5B0690
+
+ # Load initial checkpoint first
+
+ set -x
+ siminit ${AUTOVBU_INITIAL_CHKPT-after_8megzero} -quiet || return 1
+
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMGDIR}/hbicore${use_test}.bin -b ${AUTOVBU_CORE--c3} || return 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMGDIR}/vbu_targeting.bin \
+ -o $vbu_targeting_addr -b ${AUTOVBU_CORE--c3} || return 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMGDIR}/hbicore${use_test}_extended.bin \
+ -o 0x500690 -b ${AUTOVBU_CORE--c3} || return 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMGDIR}/pnor.toc \
+ -o 0x500000 -b ${AUTOVBU_CORE--c3} || return 1
+ set +x
+ fi
+
+ return 0
+}
+# Define a shell function to clean up and release the AWAN
+
+AWAN_EXIT() {
+ rm -f "$MY_AWAN_KEEP" "$MY_AWAN_HAVE"
+ my_target=`target query 2>/dev/null | sed -n -e '/Current target/s/.*is "\(.*\)"/\1/p'`
+ if [ "$my_target" != "" -a -f "$CRONUS_HOME/cnfgs/${my_target}_cnfg" ]; then
+ simexit -quiet
+ echo "Delay for AWAN exit"
+ sleep 60
+ fi
+}
+
+################################################################################
+#
+# Start performing environment setup
+#
+################################################################################
+
+# Include ECMD aliases
+
+if [ "$CTEPATH" != "" ]; then
+ source $CTEPATH/tools/ecmd/rel/bin/ecmdaliases.ksh
+else
+ echo "ERROR: This script must be sourced while running in a p8lab window"
+ return 1
+fi
+
+# Perform user customizable setup
+
+Setup_MyEnv || return 1
+
+# Now process any argument overrides
+
+Setup_MyArgs $* || return 1
+
+# Perform dynamic adjustments based upon current settings
+
+Setup_MyDynamic || return 1
+
+# Print user banner of what we have setup
+
+echo
+echo "Performing HostBoot setup/initialization for $VBUVPO model $VBU_MODEL$VPO_MODEL"
+echo
+echo "Sprint Release directory: $HB_RELDIR"
+echo "Using HB_IMGDIR: $HB_IMGDIR"
+echo "Using ecmdsetup version: $AUTOVBU_ECMD_VER"
+echo "Using Cronus version: $AUTOVBU_CRONUS_SIM"
+echo "Using HB_VBUTOOLS version: `basename $HB_VBUTOOLS`"
+echo "Using HB_TOOLS version: `basename $HB_TOOLS`"
+echo
+
+sleep 2
+
+# Setup ecmd/cronusflex
+
+ecmdsetup auto cro $AUTOVBU_ECMD_VER $AUTOVBU_CRONUS_SIM sim pok
+
+# Get an AWAN if requested, or reuse an existing connection if found
+
+Setup_MyAWAN || return 1
+
+Setup_MyTarget || return 1
+
+Setup_MyHBImage || return 1
+
+echo
+echo "Current Settings"
+echo
+
+env | egrep "^AUTO|^AWAN|^HB_|^VPO|^VBU|^J[PRS]=" | sort
+
+echo
+echo "To gracefully terminate your AWAN session enter: AWAN_EXIT"
+echo
diff --git a/src/build/vpo/VBU_Cacheline.pm b/src/build/vpo/VBU_Cacheline.pm
index f54333fa1..596e7fcde 100755
--- a/src/build/vpo/VBU_Cacheline.pm
+++ b/src/build/vpo/VBU_Cacheline.pm
@@ -90,47 +90,34 @@ my $CLtest = 0;
## It must be flushed once before doing L3 reads
my $L2_Flushed = 0;
-
-my $vbuToolsDir = "/gsa/ausgsa/projects/h/hostboot/vbutools/latest";
-
+my $vbuToolsDir = $ENV{'HB_VBUTOOLS'};
+if (defined ($vbuToolsDir))
+{
+ unless ($vbuToolsDir ne "")
+ {
+ $vbuToolsDir = "/gsa/ausgsa/projects/h/hostboot/vbutools/latest";
+ }
+}
my $DUMPCMD = "$vbuToolsDir/p8_dump_l3";
my $LOADCMD = "$vbuToolsDir/p8_load_l3";
-my $FLUSHCMD = "$vbuToolsDir/p8_l2_flush_wrap.x86 $CORE -quiet";
+my $FLUSHCMD = "$vbuToolsDir/proc_l2_flush_wrap.x86 $CORE -quiet";
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/p8_thread_control.x86 -query $CORE -t0";
-##my $STOPCMD = "$vbuToolsDir/p8_thread_control.x86 -stop $CORE -tall";
-##my $STARTCMD = "$vbuToolsDir/p8_thread_control.x86 -start $CORE -tall";
+##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 $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/p8_thread_control.x86 -sreset_auto $CORE";
-
-
-## old dirs and tools, SAVE
-## my $DUMPCMD = "/afs/awd/projects/eclipz/lab/p8/gsiexe/p8_dump_l3";
-## my $LOADCMD = "/afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3";
-## ## my $FLUSHCMD = "/afs/awd/projects/eclipz/lab/p8/gsiexe/p8_l2_flush.x86 $CORE";
-## my $FLUSHCMD = "/afs/awd/projects/eclipz/lab/p8/compiled_procs/procs/p8_l2_flush_wrap.x86 $CORE -quiet";
-## my $FLUSHQUERY = "/afs/awd.austin.ibm.com/projects/eclipz/lab/p8/gsiexe/p8_check_l3";
-## my $RUNCLKSCMD = "simclock";
-
-## 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";
-## ## ## later...
-## ## ## my $QUERYCMD = "/afs/awd/projects/eclipz/lab/p8/u/karm/ekb/eclipz/chips/p8/working/procedures/utils/p8_thread_control.x86 -query";
-## ## ## my $STOPCMD = "/afs/awd/projects/eclipz/lab/p8/u/karm/ekb/eclipz/chips/p8/working/procedures/utils/p8_thread_control.x86 -stop";
-## ## ## my $STARTCMD = "/afs/awd/projects/eclipz/lab/p8/u/karm/ekb/eclipz/chips/p8/working/procedures/utils/p8_thread_control.x86 -start";
-
+my $RESETCMD = "$vbuToolsDir/proc_thread_control.x86 -sreset_auto $CORE";
##
#==============================================================================
diff --git a/src/build/vpo/do_sprint b/src/build/vpo/do_sprint
new file mode 100755
index 000000000..d64a1f4f9
--- /dev/null
+++ b/src/build/vpo/do_sprint
@@ -0,0 +1,635 @@
+#!/bin/sh
+# IBM_PROLOG_BEGIN_TAG
+# This is an automatically generated prolog.
+#
+# $Source: src/build/vpo/do_sprint $
+#
+# 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
+
+# Common Sprint Release test case execution
+#
+# NOTE: Execution environment must be intialized prior using source Setup_Env script
+#
+
+#
+# Version 1.0 Copy from Jim's on 03/21/2012, tested on VBU & VPO
+#
+
+
+PGM=`basename $0`
+
+# Include ECMD and autotest aliases
+
+export PGM_DIR=${PGM_DIR-/gsa/pokgsa/home/m/c/mcguirej/public/auto/rel}
+source $CTEPATH/tools/ecmd/rel/bin/ecmdaliases.ksh
+source $PGM_DIR/autofsp.aliases
+source $PGM_DIR/autovbu.aliases
+
+# Scan argument(s)
+
+set +x
+
+use_test=
+test_arg=
+
+while [ $# -gt 0 ]
+do
+ case "$1"
+ in
+ -use_dump_l3| \
+ -use_printk|-use_hb_trace|-use_hb_printk| \
+ -run_hb_istep|-chkpt_after_istep| \
+ -stop_after_hbiload|-start_after_hbiload|-start_after_hbitest|-chkpt_after_loops| \
+ -dump_after_hbitest| \
+ -chkpt_after_ipl|-chkpt_after_hbiload|-chkpt_after_hbitest|-chkpt_after_exception)
+ eval "`echo $1|sed -e 's/-//'`=-$1"
+ shift
+ ;;
+ --use_dump_l3| \
+ --use_printk|--use_hb_trace|--use_hb_printk| \
+ --run_hb_istep|--chkpt_after_istep| \
+ --stop_after_hbiload|--start_after_hbiload|--start_after_hbitest|--chkpt_after_loops| \
+ --dump_after_hbitest| \
+ --chkpt_after_ipl|--chkpt_after_hbiload|--chkpt_after_hbitest|--chkpt_after_exception)
+ eval "`echo $1|sed -e 's/--//'`=$1"
+ shift
+ ;;
+ -test|--test)
+ use_test="_test"
+ test_arg="--test"
+ shift
+ ;;
+ *=*) # export var=value settings
+ eval "export $1"
+ shift
+ ;;
+ *)
+ cat <<__EOF__
+USAGE: $PGM [flags] [env settings]
+
+Where [flags] can be:
+ -test|--test|
+ -use_dump_l3|--use_dump_l3|
+ -use_printk|--use_printk|
+ -use_hb_trace|--use_hb_trace|
+ -use_hb_printk|--use_hb_printk|
+ -run_hb_istep|--run_hb_istep|
+ -stop_after_hbiload|--stop_after_hbiload|
+ -start_after_hbiload|--start_after_hbiload|
+ -start_after_hbitest|--start_after_hbitest
+ -chkpt_after_loops|--chkpt_after_loops|
+ -chkpt_after_ipl|--chkpt_after_ipl|
+ -chkpt_after_istep|--chkpt_after_istep|
+ -chkpt_after_hbiload|--chkpt_after_hbiload|
+ -chkpt_after_hbitest|--chkpt_after_hbitest|
+ -dump_after_hbitest|--dump_after_hbitest|
+
+Optional environment settings take the form:
+
+ variable=value
+
+Examples of variables used in the test:
+
+ AUTOVBU_SIMCLOCKS=4000000
+ AUTOVBU_LOOPS=5
+ AUTOVBU_PRINTK_LINES=80
+
+__EOF__
+ exit 1
+ ;;
+ esac
+done
+
+# Sanity check our environment
+
+# We force user to set the VBU_MODEL or VPO_MODEL variables, since we use them to select workarounds
+
+if [ "$VBU_MODEL" = "" -a "$VPO_MODEL" = "" ]; then
+ echo
+ echo "ERROR: The VBU_MODEL or VPO_MODEL environment variable must be set before using this script"
+ echo
+ echo "Example: export VBU_MODEL=p1_e8056_c1000_cen1_cen054_unopt_2_gfw"
+ echo " export VPO_MODEL=m_1_c"
+ exit 1
+fi
+
+if [ "$HB_IMGDIR" = "" -o ! -d "$HB_IMGDIR" ]; then
+ echo "ERROR: Missing/Invalid definition for HB_IMGDIR"
+fi
+
+if [ "$HB_TOOLS" = "" -o ! -d "$HB_TOOLS" ]; then
+ echo "ERROR: Missing/invalid definition for HB_TOOLS"
+ exit 1
+fi
+
+# Temporarily support old names
+
+test "$HB_IMG" = "" && HB_IMG=$HB_IMGDIR
+test "$HB_TOOLS" = "" && HB_TOOLS=$HB_TOOLS
+
+# Temp files for test output
+
+export AUTOCHKPT_VERSION=${AUTOCHKPT_VERSION-"$USER-`hostname -s`"-"`date +%Y-%h-%d-%T`"}
+export AUTOVBU_TEST_DIR=${AUTOVBU_TEST_DIR-/afs/apd.pok.ibm.com/u/${MY_AFS_USER-$USER}/tmp/$AUTOCHKPT_VERSION}
+testloop_stop=/tmp/$PGM-$USER-$$-STOP
+printk_tmp1=/tmp/$PGM-$USER-$$-1
+printk_tmp2=/tmp/$PGM-$USER-$$-2
+printk_tmp3=$AUTOVBU_TEST_DIR/trace_printk
+
+trap "cd; rm -rf $testloop_stop $printk_tmp1 $printk_tmp2 $printk_tmp3; echo; \
+ env | egrep 'AUTO|VBU_MODEL|VPO_MODEL|^HB_' | sed -e 's/^/export /' | sort; \
+ rm -f $AUTOVBU_TEST_DIR/istepmodereg.dma; \
+ rmdir $AUTOVBU_TEST_DIR >/dev/null 2>&1; \
+ exit 0" 0 1 2
+
+#
+# Renew GSA and AFS accesses, both in this cronus window and on the AWAN (if automated tool running)
+#
+
+Get_Access | egrep -v "No access to pwd file|Invalid password"
+simecho "Renew Tokens: `date`" -quiet
+
+sim_clocks=${AUTOVBU_SIMCLOCKS-2000000}
+loopstart=${AUTOVBU_START-0}
+loopmax=`expr $loopstart '+' ${AUTOVBU_LOOPS-2000}`
+lines=${AUTOVBU_PRINTK_LINES-50}
+
+# If we requested checkpoints after loops or isteps, force a checkpoint after the hbitest as well
+test "$chkpt_after_loops" = "--chkpt_after_loops" && chkpt_after_hbitest="--chkpt_after_hbitest"
+test "$chkpt_after_istep" = "--chkpt_after_istep" && chkpt_after_hbitest="--chkpt_after_hbitest"
+
+trace_after_hbitest=""
+
+# Look up symbol addresses
+
+addr=${AUTOVBU_PRINTK_ADDRESS-`grep "kernel_printk_buffer" ${HB_IMGDIR}/hbicore${use_test}.syms | awk -F"," '{print $2}'`}
+testaddr=${AUTOVBU_TOTALTEST-`grep "CxxTest::g_TotalTests" ${HB_IMGDIR}/hbicore${use_test}.syms | awk -F"," '{print $2}'`}
+testaddr1=${AUTOVBU_TESTADDR1-`grep "CxxTest::g_ModulesStarted" ${HB_IMGDIR}/hbicore${use_test}.syms | awk -F"," '{print $2}'`}
+shutdown=${AUTOVBU_SHUTDOWN-`grep "KernelMisc::shutdown" ${HB_IMGDIR}/hbicore${use_test}.syms | awk -F"," '{print $2}'|tr '[a-z]' '[A-Z]'`}
+doze=`echo "ibase=16; $shutdown + 30" | bc | awk ' { printf("0x%16.16X\n", $0); }'`
+
+CORE=${AUTOVBU_CORE--c3}
+
+# Initialize AWAN unless we have been asked to start after load
+
+# Allow HB_RELDIR setting to adjust load addresses as needed
+
+vbu_targeting_addr=0x601690
+echo "$HB_RELDIR" | grep -s "Sprint8" >/dev/null 2>&1
+test $? -eq 0 && vbu_targeting_addr=0x5B0690
+
+set -x
+if [ "$start_after_hbiload" != "--start_after_hbiload" -a "$start_after_hbitest" != "--start_after_hbitest" ]; then
+ siminit ${AUTOVBU_INITIAL_CHKPT-after_8megzero} -quiet || exit 1
+fi
+
+if [ "$start_after_hbiload" != "--start_after_hbiload" -a "$start_after_hbitest" != "--start_after_hbitest" ]; then
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMG}/hbicore${use_test}.bin -b ${CORE--c3} || exit 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMG}/vbu_targeting.bin \
+ -o $vbu_targeting_addr -b ${CORE--c3} || exit 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMG}/hbicore${use_test}_extended.bin \
+ -o 0x500690 -b ${CORE--c3} || exit 1
+ /afs/awd/projects/eclipz/lab/p8/gsiexe/p8_load_l3 -f ${HB_IMG}/pnor.toc \
+ -o 0x500000 -b ${CORE--c3} || exit 1
+fi
+
+
+if [ "$start_after_hbiload" != "--start_after_hbiload" -a "$start_after_hbitest" != "--start_after_hbitest" ]; then
+ # Adjust timers
+
+ MyEX=EX0`expr substr "${AUTOVBU_CORE--c3}" 3 1`
+ simPUTFAC B0.C0.S0.P0.E8.${MyEX}.EC.PC.PC_NE.FIR.FIRC_SCOM.FIR_MASKQ.ESC.L1 1 1 0 55 -ib -quiet
+ simPUTFAC B0.C0.S0.P0.E8.${MyEX}.EC.PC.PC_NE.FIR.FIRC_SCOM.FIR_MASKQ.ESC.L2 1 1 0 55 -ib -quiet
+ simclock 1 -quiet
+
+ # Start instructions
+ p8_ins_reset || exit 1
+
+ # Make a checkpoint now if requested
+ test "$chkpt_after_hbiload" = "--chkpt_after_hbiload" && simcheckpoint chkpt_after_hbiload-$AUTOCHKPT_VERSION
+
+ # By default, we will run the test unless asked to stop now
+ test "$stop_after_hbiload" = "--stop_after_hbiload" && exit 0
+fi
+
+
+#
+# Set default list of isteps
+#
+set +x
+default_istep_list="
+ init_target_states
+ init_fsi
+ apply_fsi_info
+ apply_dd_presence
+ apply_pr_keyword_data
+ apply_partial_bad
+ apply_gard
+ testHWP
+ cen_sbe_tp_chiplet_init1
+ cen_sbe_tp_arrayinit
+ cen_sbe_tp_chiplet_init2
+ cen_sbe_tp_chiplet_init3
+ cen_sbe_chiplet_init
+ cen_sbe_arrayinit
+ cen_sbe_pll_initf
+ cen_sbe_dts_init
+ cen_sbe_initf
+ cen_sbe_do_manual_inits
+ cen_sbe_startclocks
+ cen_sbe_scominits
+ dmi_scominit
+ dmi_erepair
+ dmi_io_dccal
+ dmi_io_run_training
+ host_startPRD_dmi
+ host_attnlisten_cen
+ proc_cen_framelock
+ cen_set_inband_addr
+ host_collect_dimm_spd
+ mss_volt
+ mss_freq
+ mss_eff_config
+ host_disable_vddr
+ mc_pll_setup
+ mba_startclocks
+ host_enable_vddr
+ mss_initf
+ mss_ddr_phy_reset
+ mss_draminit
+ mss_restore_dram_repair
+ mss_draminit_training
+ mss_draminit_trainadv
+ mss_draminit_mc
+"
+
+#
+# Set default list of isteps to make checkpoints after
+#
+default_istep_chkpt="
+ apply_gard
+ dmi_scominit
+ dmi_io_run_training
+ proc_cen_framelock
+ cen_set_inband_addr
+"
+
+set -x
+if [ "$start_after_hbitest" != "--start_after_hbitest" ]; then
+ mkdir -p $AUTOVBU_TEST_DIR $printk_tmp3
+ chmod a+rx $AUTOVBU_TEST_DIR $printk_tmp3 >/dev/null 2>&1
+ cd $AUTOVBU_TEST_DIR
+ if [ "$run_hb_istep" = "--run_hb_istep" ]; then
+ set +x
+ echo
+ echo "Enter this command in a `hostname` shell window to terminate the test loop:"
+ echo
+ echo " touch $testloop_stop"
+ echo
+ echo "Test can be restarted using the same version name with:"
+ echo
+ echo " export AUTOCHKPT_VERSION=$AUTOCHKPT_VERSION"
+ echo
+
+ echo >$printk_tmp1
+ my_list="${AUTOVBU_ISTEP_LIST-$default_istep_list}"
+ if [ "$AUTOVBU_ISTEP_START" = "" ]; then
+ test -f $printk_tmp3/hb-Trace.output && cp $printk_tmp3/hb-Trace.output $printk_tmp3/tmp.hb-Trace.output-$istep
+ set -x
+ $HB_TOOLS/hb-istep --istepmode | egrep -v "Using deprecated ReturnCode function to assign integer"
+ set +x
+ else
+ expr "$my_list" : ".*$AUTOVBU_ISTEP_START" >/dev/null 2>&1
+ if [ $? -eq 0 ]; then
+ my_list=`echo $my_list | sed -e "s/.*$AUTOVBU_ISTEP_START//"`
+ if [ -d $AUTOVBU_TEST_DIR/trace_after_istep_$AUTOVBU_ISTEP_START ]; then
+ echo
+ echo "Loading restart checkpoint:"
+ set -x
+ siminit chkpt_after_istep_${AUTOVBU_ISTEP_START}-$AUTOCHKPT_VERSION || exit 1
+ set +x
+ fi
+ fi
+ fi
+ for istep in $my_list COMPLETE
+ do
+ if [ $istep = "COMPLETE" ]; then
+ break;
+ fi
+ echo
+ set -x
+ test -f $testloop_stop && break
+ $HB_TOOLS/hb-istep --command $istep | egrep -v "Using deprecated ReturnCode function to assign integer"
+ set +x
+ if [ "$chkpt_after_istep" = "--chkpt_after_istep" ]; then
+ expr "${AUTOVBU_ISTEP_CHKPT-$default_istep_chkpt}" : ".*$istep" >/dev/null
+ if [ $? -eq 0 ]; then
+ simcheckpoint chkpt_after_istep_${istep}-$AUTOCHKPT_VERSION
+ mkdir -p $AUTOVBU_TEST_DIR/trace_after_istep_${istep}
+ fi
+ fi
+
+ if [ "$use_hb_trace" = "--use_hb_trace" ]; then
+ p8_ins_stop
+ $HB_TOOLS/hb-trace $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
+ test -f $printk_tmp3/hb-Trace.output && cp $printk_tmp3/hb-Trace.output $printk_tmp3/tmp.hb-Trace.output-$istep
+ p8_ins_start
+ elif [ "$use_printk" = "--use_printk" ]; then
+ DUMP_PRINTK ${addr} ${lines} >$printk_tmp2
+ elif [ "$use_dump_l3" = "--use_dump_l3" ]; then
+ DUMP_L3_PRINTK ${addr} ${lines} >$printk_tmp2
+ else
+ p8_ins_stop
+ $HB_TOOLS/hb-printk $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
+ p8_ins_start
+ fi
+ echo >>$printk_tmp2
+ diff -a $printk_tmp1 $printk_tmp2 | egrep -a "^> " | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ mv $printk_tmp2 $printk_tmp1
+
+ # Check for a checkstop/special attn
+ getscom pu 000f001a ${CORE--c3} -quiet | egrep -v "0x0000000000000000|0x4000000000000000"
+ if [ "$?" -eq 0 ]; then
+ echo; echo; echo
+ echo "FAIL: checkstop/attn running $PGM"
+ fircheck ${CORE--c3} -quiet 2>&1 | head -30 | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g' | egrep -v "00 SIMDISP|CNFG FILE GLOBAL_DEBUG"
+ break
+ fi
+ Get_Access | egrep -v "No access to pwd file|Invalid password"
+ simecho "Renew Tokens: `date`" -quiet
+ done
+
+ if [ "$use_hb_trace" = "--use_hb_trace" -a -f $printk_tmp3/hb-Trace.output ]; then
+ echo; echo; echo
+ echo "===== COMBINED hb-Trace.output START ====="
+ cat `ls -1rt $printk_tmp3/tmp.hb-Trace.output-* $printk_tmp3/hb-Trace.output` | sort | uniq -c |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+
+ echo "==== COMBINED hb-Trace.output END ====="
+ fi
+
+ test "$chkpt_after_hbitest" = "--chkpt_after_hbitest" && simcheckpoint chkpt_after_hbitest-$AUTOCHKPT_VERSION && mkdir -p $AUTOVBU_TEST_DIR/trace_after_hbitest
+ else
+ set +x
+ #
+ # Loop, printing CIA after each cycle
+ #
+
+ loopcnt=$loopstart
+
+
+ echo >$printk_tmp1
+
+ if [ $loopcnt -ne 0 -a -d $AUTOVBU_TEST_DIR/trace_after_loop${loopcnt} ]; then
+ echo
+ echo "Loading restart checkpoint:"
+ set -x
+ siminit chkpt_after_loop${loopcnt}-$AUTOCHKPT_VERSION || exit 1
+ set +x
+ fi
+
+ date
+ echo "Running $loopmax trace loopcnts with $sim_clocks sim clocks each cycle:"
+ GET_CIA
+
+ echo
+ echo "Enter this command in a `hostname` shell window to terminate the test loop:"
+ echo
+ echo " touch $testloop_stop"
+ echo
+ echo "Test can be restarted using the same version name with:"
+ echo
+ echo " export AUTOCHKPT_VERSION=$AUTOCHKPT_VERSION"
+ echo
+
+ while [ ! -f "$testloop_stop" -a $loopcnt -lt $loopmax ]; do
+ loopcnt=`expr $loopcnt + 1`
+
+ simclock $sim_clocks -quiet || exit 1
+ cur_cia=`GET_CIA`
+ echo "$loopcnt: $cur_cia"
+ if [ "$use_hb_trace" = "--use_hb_trace" ]; then
+ p8_ins_stop
+ $HB_TOOLS/hb-trace $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
+ test -f $printk_tmp3/hb-Trace.output && cp $printk_tmp3/hb-Trace.output $printk_tmp3/tmp.hb-Trace.output-$loopcnt
+ p8_ins_start
+ elif [ "$use_printk" = "--use_printk" ]; then
+ DUMP_PRINTK ${addr} ${lines} >$printk_tmp2
+ elif [ "$use_dump_l3" = "--use_dump_l3" ]; then
+ DUMP_L3_PRINTK ${addr} ${lines} >$printk_tmp2
+ else
+ p8_ins_stop
+ $HB_TOOLS/hb-printk $test_arg --out $printk_tmp3 2>&1 | egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" >$printk_tmp2
+ p8_ins_start
+ fi
+ echo >>$printk_tmp2
+ diff -a $printk_tmp1 $printk_tmp2 | egrep -a "^> " | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ mv $printk_tmp2 $printk_tmp1
+
+ grep 'HypeEmu: Illegal instruction' $printk_tmp1 >/dev/null
+ if [ $? -eq 0 ]; then
+ echo "$PGM: Stopping test after exception"
+ test "$chkpt_after_exception" = "--chkpt_after_exception" && simcheckpoint chkpt_after_exception-$AUTOCHKPT_VERSION
+ break
+ fi
+ # Check for a checkstop/special attn
+ getscom pu 000f001a ${CORE--c3} -quiet | egrep -v "0x0000000000000000|0x4000000000000000"
+ if [ "$?" -eq 0 ]; then
+ echo; echo; echo
+ echo "FAIL: checkstop/attn running $PGM"
+ fircheck ${CORE--c3} -quiet 2>&1 | head -30 | sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g' | egrep -v "00 SIMDISP|CNFG FILE GLOBAL_DEBUG"
+ break
+
+ fi
+
+ # Stop on exception loop
+ expr "$cur_cia" : ".*0x0000000000000E4[04]" >/dev/null
+ if [ $? = 0 ]; then
+ if [ "$hypemu_loop" != "" ]; then
+ echo "FAIL: Exception loop"
+ break
+ else
+ hypemu_loop=yes
+ fi
+ else
+ unset hypemu_loop
+ fi
+ if [ "$chkpt_after_loops" = "--chkpt_after_loops" -a `expr "$loopcnt" '%' 50` = "0" ]; then
+ simcheckpoint chkpt_after_loop${loopcnt}-$AUTOCHKPT_VERSION
+ mkdir -p $AUTOVBU_TEST_DIR/trace_after_loop${loopcnt}
+ fi
+
+ # Stop test loop if we reach kernel shutdown
+ expr "$cur_cia" : ".*$doze" >/dev/null
+ if [ $? = 0 ]; then
+ echo
+ echo "Shutdown doze address detected. Stopping test now"
+ echo
+ break
+ fi
+
+ if [ `expr "$loopcnt" '%' 500` = "0" ]; then
+ Get_Access | egrep -v "No access to pwd file|Invalid password"
+ simecho "Renew Tokens: `date`" -quiet
+ fi
+ done
+ date
+ rm -f $printk_tmp2 $printk_tmp1
+
+
+ GET_CIA
+
+ if [ "$use_hb_trace" = "--use_hb_trace" ]; then
+ echo; echo; echo
+ echo "===== COMBINED hb-Trace.output START ====="
+ cat `ls -1rt $printk_tmp3/tmp.hb-Trace.output-* $printk_tmp3/hb-Trace.output` | sort | uniq -c |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ echo "==== COMBINED hb-Trace.output END ====="
+ fi
+
+ test "$chkpt_after_hbitest" = "--chkpt_after_hbitest" && simcheckpoint chkpt_after_hbitest-$AUTOCHKPT_VERSION && mkdir -p $AUTOVBU_TEST_DIR/trace_after_hbitest
+
+ # Dump test case results
+ if [ "$testaddr" != "" ]; then
+ echo
+ echo "Test Results (CxxTest::g_TotalTests/CxxTest::g_TraceCalls/CxxTest::g_Warnings/CxxTest::g_FailedTests)"
+ if [ "$use_dump_l3" = "--use_dump_l3" -o "$use_hb_printk" != "--use_hb_printk" ]; then
+ DUMP_L3_DATA $testaddr 1 | head -1
+ else
+ DUMP_DATA $testaddr 1 | head -1
+ fi
+ fi
+ if [ "$testaddr1" != "" ]; then
+ echo "Test Results (CxxTest::g_ModulesStarted/CxxTest::g_ModulesCompleted)"
+ if [ "$use_dump_l3" = "--use_dump_l3" -o "$use_hb_printk" != "--use_hb_printk" ]; then
+ DUMP_L3_DATA $testaddr1 1 | head -1
+ else
+ DUMP_DATA $testaddr1 1 | head -1
+ fi
+ fi
+
+ fi
+fi
+
+set -x
+trace_after_loops=`ls -1d $AUTOVBU_TEST_DIR/trace_after_loop* 2>/dev/null | sed -e '/hb-Trace.output/d' -e 's/.*trace_after_loop/ /' | sort -n` 2>/dev/null
+set +x
+if [ "$trace_after_loops" != "" ]; then
+ date
+ echo
+ echo "===== Collecting trace files from after_loop checkpoints ====="
+ echo
+ env | egrep "PGM|AUTO|VBU_MODEL|VPO_MODEL|HB_IMGDIR|HB_TOOLS" | sed -e 's/^/export /' >>$AUTOVBU_TEST_DIR/env_settings
+ chmod a+rx $trace_after_loops >/dev/null 2>&1
+ for loopcnt in $trace_after_loops
+ do
+ if [ -f $AUTOVBU_TEST_DIR/trace_after_loop${loopcnt}/hb-Trace.output ]; then
+ continue
+ fi
+ echo "Loading: chkpt_after_loop${loopcnt}-$AUTOCHKPT_VERSION"
+ siminit chkpt_after_loop${loopcnt}-$AUTOCHKPT_VERSION || exit 1
+ p8_ins_stop
+ $HB_TOOLS/hb-trace $test_arg --out $AUTOVBU_TEST_DIR/trace_after_loop${loopcnt} >/dev/null 2>&1
+ p8_ins_start
+ done
+ cat `ls -1rt $AUTOVBU_TEST_DIR/trace_after_loop*/hb-Trace.output` | sort | uniq -c |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g' > $AUTOVBU_TEST_DIR/trace_after_loop-hb-Trace.output
+ echo
+ echo "Trace file: $AUTOVBU_TEST_DIR/trace_after_loop-hb-Trace.output"
+ echo
+fi
+if [ -d "$AUTOVBU_TEST_DIR/trace_after_hbitest" -a ! -f $AUTOVBU_TEST_DIR/trace_after_hbitest/hb-Trace.output ]; then
+ date
+ echo
+ echo "===== Collecting trace file from after_hbitest checkpoint ====="
+ echo
+ chmod a+rx $AUTOVBU_TEST_DIR/trace_after_hbitest >/dev/null 2>&1
+ echo "Loading: chkpt_after_hbitest-$AUTOCHKPT_VERSION"
+ siminit chkpt_after_hbitest-$AUTOCHKPT_VERSION || exit 1
+ p8_ins_stop
+ $HB_TOOLS/hb-trace $test_arg --out $AUTOVBU_TEST_DIR/trace_after_hbitest >/dev/null 2>&1
+ p8_ins_start
+ echo
+ echo "Trace file: $AUTOVBU_TEST_DIR/trace_after_hbitest/hb-Trace.output"
+ echo
+fi
+if [ -f $AUTOVBU_TEST_DIR/trace_after_loop-hb-Trace.output -a -f $AUTOVBU_TEST_DIR/trace_after_hbitest/hb-Trace.output ]; then
+ date
+ echo
+ echo "===== Combining trace files ====="
+ echo
+ cat `ls -1rt $AUTOVBU_TEST_DIR/trace_after_loop*/hb-Trace.output` \
+ $AUTOVBU_TEST_DIR/trace_after_hbitest/hb-Trace.output | sort | uniq -c |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g' > $AUTOVBU_TEST_DIR/trace_combined_hb-Trace.output
+ echo "Trace file: AUTOVBU_TEST_DIR/trace_combined_hb-Trace.output"
+ echo
+fi
+
+set -x
+trace_after_istep=`ls -1rtd $AUTOVBU_TEST_DIR/trace_after_istep* 2>/dev/null | sed -e '/hb-Trace.output/d' -e 's/.*trace_after_istep_/ /'` 2>/dev/null
+set +x
+if [ "$trace_after_istep" != "" ]; then
+ date
+ echo
+ echo "===== Collecting trace files from after_istep checkpoints ====="
+ echo
+ env | egrep "PGM|AUTO|VBU_MODEL|VPO_MODEL|HB_IMGDIR|HB_TOOLS" | sed -e 's/^/export /' >>$AUTOVBU_TEST_DIR/env_settings
+ chmod a+rx $trace_after_istep >/dev/null 2>&1
+ for istep in $trace_after_istep
+ do
+ if [ -f $AUTOVBU_TEST_DIR/trace_after_istep_${istep}/hb-Trace.output ]; then
+ continue
+ fi
+ echo "Loading: chkpt_after_istep_${istep}-$AUTOCHKPT_VERSION"
+ siminit chkpt_after_istep_${istep}-$AUTOCHKPT_VERSION || exit 1
+ p8_ins_stop
+ $HB_TOOLS/hb-trace $test_arg --out $AUTOVBU_TEST_DIR/trace_after_istep_${istep} >/dev/null 2>&1
+ p8_ins_start
+ done
+ cat `ls -1rt $AUTOVBU_TEST_DIR/trace_after_istep*/hb-Trace.output` | sort | uniq -c |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g' > $AUTOVBU_TEST_DIR/trace_after_istep-hb-Trace.output
+ echo "Trace file: $AUTOVBU_TEST_DIR/trace_after_istep-hb-Trace.output"
+fi
+
+#
+# Generate an L3 dump before leaving if the user has requested one
+#
+if [ "$dump_after_hbitest" = "--dump_after_hbitest" ]; then
+ date
+ echo
+ echo "===== Dumping L3 data ====="
+ echo
+ mkdir -p $AUTOVBU_TEST_DIR
+ chmod a+rx $AUTOVBU_TEST_DIR >/dev/null 2>&1
+ cd $AUTOVBU_TEST_DIR
+ rm -rf $AUTOVBU_TEST_DIR/hbdump $AUTOVBU_TEST_DIR/hbparse # clean up any previous data
+ mkdir -p $AUTOVBU_TEST_DIR/hbdump $AUTOVBU_TEST_DIR/hbparse
+ $HB_TOOLS/hb-dump --out-path $AUTOVBU_TEST_DIR/hbdump |
+ egrep -v "^FAPI DBG>:|^FAPI IMP>:|Using deprecated ReturnCode function to assign integer" |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ simclock 10 -quiet
+ use_test=`echo $use_test | sed -e 's/_/--/'`
+ PATH=$HB_IMGDIR:$HB_TOOLS:$HB_RELDIR:$PATH $HB_TOOLS/hb-parsedump.pl $AUTOVBU_TEST_DIR/hbdump/hbdump.* $use_test --out-path $AUTOVBU_TEST_DIR/hbparse |
+ sed -e 's/[Ee][Rr][Rr][Oo][Rr]/ERR*R/g' -e 's/FAIL/F*IL/g'
+ chmod -R a+rx $AUTOVBU_TEST_DIR/hbdump $AUTOVBU_TEST_DIR/hbparse >/dev/null 2>&1
+fi
+date
+
+# Done - return good test status
+exit 0
diff --git a/src/build/vpo/hb-dump b/src/build/vpo/hb-dump
index 73e8f07ec..eacbe9e35 100755
--- a/src/build/vpo/hb-dump
+++ b/src/build/vpo/hb-dump
@@ -103,7 +103,7 @@ sub printUsage()
print (" This program dumps the entire L3 to a file.\n");
print (" Use the hb-parsedump.pl program to expand and view data in the file.\n\n");
print (" User should copy hb-virtdebug.pl to the current directory or set\n");
- print (" the env variable HBDIR to the path of the file.\n\n");
+ print (" the env variable HB_IMGDIR to the path of the file.\n\n");
print (" --help Prints usage information.\n");
print (" --out-path Directory where the output data will be saved.\n");
print (" Default path is the current directory.\n");
diff --git a/src/build/vpo/hb-istep b/src/build/vpo/hb-istep
index a486b850f..38ba578f9 100755
--- a/src/build/vpo/hb-istep
+++ b/src/build/vpo/hb-istep
@@ -113,7 +113,8 @@ for( my $i = 0; $i <= $#inList; $i++)
}
}
-my $g_SeqNum = 0;
+## initialize the sequence number - 6 bit field, { 0 - 63 }
+my $g_SeqNum = int(rand(64));
#==============================================================================
@@ -128,16 +129,13 @@ my $g_SeqNum = 0;
my $pgmDir = `dirname $0`;
chomp( $pgmDir );
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if ( ! defined( $hbDir) || ( $hbDir eq "" ) )
{
$hbDir = $pgmDir; ## Set to tool directory
}
-## Future - VBUTOOLS is not used yet, but will be.
-## from Jim McGuire
-# my $vbuToolsDir = "/gsa/ausgsa/projects/h/hostboot/vbutools/latest";
-my $vbuToolsDir = $ENV{'VBUTOOLS'};
+my $vbuToolsDir = $ENV{'HB_VBUTOOLS'};
if (defined ($vbuToolsDir))
{
unless ($vbuToolsDir ne "")
@@ -349,6 +347,18 @@ sub printUsage()
}
+##
+## Increment the sequence number, rolling over at 64
+##
+sub bumpSeqNum()
+{
+
+ $g_SeqNum++;
+
+ $g_SeqNum %= 64;
+
+ return $g_SeqNum;
+}
##
## read in file with csv istep list and store in inList
@@ -477,11 +487,15 @@ sub getSyncStatus( )
return $result;
}
+ if ($opt_debug)
+ { printf STDERR __LINE__, "===== getSyncStatus: count=%d, result=0x%lx\n", $count, $result }
+
if ( $count <= 0 )
{
print STDOUT "TIMEOUT waiting for seqnum=$g_SeqNum\n";
return -1;
}
+
$count--;
} ## endwhile
@@ -499,7 +513,7 @@ sub runIStep( $$ )
## bump the seqnum
- $g_SeqNum++;
+ bumpSeqNum();
printf STDOUT "run %d.%d %s:\n", $istep, $substep, $inList[$istep][$substep];
@@ -658,7 +672,7 @@ sub setMode( $ )
{
my ( $cmd ) = @_;
- my $count = 0;
+ my $count = 1000;
my $expected = 0;
my $readybit = 0;
my $result = 0;
@@ -690,7 +704,6 @@ sub setMode( $ )
## Loop, advancing clock, and wait for readybit
## @todo revisit
- $count = 1000;
while(1)
{
## advance HostBoot code by a certain # of cycles, then check the
@@ -715,7 +728,7 @@ sub setMode( $ )
print STDOUT "TIMEOUT waiting for readybit, status=0x%x\n", $result ;
return -1;
}
-
+
$count--;
}
}
@@ -728,7 +741,7 @@ sub resume_istep()
my $cmd;
my $result;
- $g_SeqNum++; ## bump
+ bumpSeqNum(); ## bump
printf STDOUT "resume from breakpoint\n";
@@ -805,7 +818,7 @@ sub clear_trace( )
## bump the seqnum
- $g_SeqNum++;
+ bumpSeqNum();
$byte0 = 0x80 + $g_SeqNum; ## gobit + seqnum
$command = SPLESS_CLEAR_TRACE_CMD;
diff --git a/src/build/vpo/hb-virtdebug.pl b/src/build/vpo/hb-virtdebug.pl
index cf2bfe265..4a2ee750e 100755
--- a/src/build/vpo/hb-virtdebug.pl
+++ b/src/build/vpo/hb-virtdebug.pl
@@ -93,7 +93,7 @@ my $core = "3"; #Default is core 3
my @threadState = (); #Array to store the thread states
my $vbuToolDir = "/gsa/ausgsa/projects/h/hostboot/vbutools/latest";
-my $hbDir = $ENV{'HBDIR'};
+my $hbDir = $ENV{'HB_IMGDIR'};
if (defined ($hbDir))
{
unless ($hbDir ne "")
@@ -279,7 +279,7 @@ stopInstructions("all");
#Flush L2 - this step is needed in order to dump L3 quickly
#------------------------------------------------------------------------------
my $command = "";
-$command = "$vbuToolDir/p8_l2_flush_wrap.x86 @ecmdOpt -quiet";
+$command = "$vbuToolDir/proc_l2_flush_wrap.x86 @ecmdOpt -quiet";
#print "$command\n";
die "ERROR: cannot flush L2" if (system("$command") != 0);
@@ -587,7 +587,7 @@ sub stopInstructions
my $thread = shift;
#Stopping all threads
- my $command = "$vbuToolDir/p8_thread_control.x86";
+ my $command = "$vbuToolDir/proc_thread_control.x86";
$command .= " @ecmdOpt -stop -t$thread -quiet";
die "ERROR: cannot stop instructions" if (system("$command") != 0);
}
@@ -600,7 +600,7 @@ sub startInstructions
my $thread = shift;
#Starting all threads
- my $command = "$vbuToolDir/p8_thread_control.x86";
+ my $command = "$vbuToolDir/proc_thread_control.x86";
$command .= " @ecmdOpt -start -t$thread -quiet";
die "ERROR: cannot start instructions" if (system("$command") != 0);
}
@@ -614,7 +614,7 @@ sub queryThreadState
my $thread = shift;
#print "thread $thread\n";
- my $command = "$vbuToolDir/p8_thread_control.x86 @ecmdOpt -query -t$thread";
+ my $command = "$vbuToolDir/proc_thread_control.x86 @ecmdOpt -query -t$thread";
my $result = `$command`;
#print "result:\n $result";
if ($result =~ m/Quiesced/)
@@ -783,16 +783,16 @@ sub printUsage()
print (" If no options are specified, this program will dump the entire L3 to a file.\n");
print (" Use the hb-parsedump.pl program to expand and view data in the file.\n\n");
print (" User should copy the relevant .syms file, hbotStringFile & errlparser\n");
- print (" to the current directory or set the env variable HBDIR to the path\n");
+ print (" to the current directory or set the env variable HB_IMGDIR to the path\n");
print (" of the files.\n\n");
print (" User should also set the env variable PATH to include the path to the fsp-trace program.\n\n");
print (" --help Prints usage information\n");
print (" --img-path Overrides the automatically detected .syms file,\n");
- print (" hbotStringFile & errlparser in HBDIR or the current\n");
+ print (" hbotStringFile & errlparser in HB_IMGDIR or the current\n");
print (" directory. This program will search for the files in\n");
print (" the following order:\n");
print (" 1. from the path specified by user\n");
- print (" 2. from HBDIR if it is defined\n");
+ print (" 2. from HB_IMGDIR if it is defined\n");
print (" 3. from the current directory\n");
print (" --out-path Directory where the output data will be saved\n");
print (" Default path is the current directory\n");
OpenPOWER on IntegriCloud