summaryrefslogtreecommitdiffstats
path: root/src/build
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2013-04-16 07:39:34 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2013-05-15 16:13:47 -0500
commit5d96619743f5d668edf515979190a77011867f48 (patch)
treed034b4054b71c6053bb53d6be52d46a5cac39bb5 /src/build
parenta33805cb55b445890331a4bc2bec023c627e9b64 (diff)
downloadtalos-hostboot-5d96619743f5d668edf515979190a77011867f48.tar.gz
talos-hostboot-5d96619743f5d668edf515979190a77011867f48.zip
Base SPLess istep on SP attribute flags
Change-Id: I69250fd57b264d507b0fb4f2c82f4752f83c4329 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/4091 Reviewed-by: Van H. Lee <vanlee@us.ibm.com> Tested-by: Jenkins Server Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src/build')
-rwxr-xr-xsrc/build/debug/Hostboot/Istep.pm65
-rwxr-xr-xsrc/build/debug/ecmd-debug-framework.pl8
-rwxr-xr-xsrc/build/vpo/hb-istep14
3 files changed, 16 insertions, 71 deletions
diff --git a/src/build/debug/Hostboot/Istep.pm b/src/build/debug/Hostboot/Istep.pm
index 4911ee3a9..b51b62f8f 100755
--- a/src/build/debug/Hostboot/Istep.pm
+++ b/src/build/debug/Hostboot/Istep.pm
@@ -127,7 +127,6 @@ if ( !defined( $hbCount ) || ( $hbCount eq "" ) )
}
## init global variables
-my $IstepModeReg = "";
my $ShutDownFlag = "";
my $ShutDownSts = "";
@@ -169,7 +168,6 @@ sub main
## Fetch the symbols we need from syms file
## ---------------------------------------------------------------------------
- $IstepModeReg = getSymbol( "SPLESS::g_SPLess_IStepMode_Reg" );
$CommandReg = getSymbol( "SPLESS::g_SPLess_Command_Reg" );
$StatusReg = getSymbol( "SPLESS::g_SPLess_Status_Reg" );
@@ -277,7 +275,6 @@ sub main
::userDisplay "command = \"$command\"\n";
::userDisplay "g_SeqNum = ", sprintf("0x%x",$g_SeqNum), "\n";
- ::userDisplay "IstepModeReg = ", sprintf("0x%x",$IstepModeReg), "\n";
::userDisplay "CommandReg = ", sprintf("0x%x",$CommandReg), "\n";
::userDisplay "StatusReg = ", sprintf("0x%x",$StatusReg), "\n";
::userDisplay "ShutDownFlag = ", sprintf("0x%x",$ShutDownFlag), "\n";
@@ -583,40 +580,6 @@ sub isShutDown()
return 0;
}
-##
-## Write to the IstepMode reg in memory. This will not be changed to scom
-##
-## @param[in] - 64-bit value to write to the IstepModeReg
-##
-sub writeIstepModeReg( $ )
-{
- my $data = shift;
-
- if ( $opt_debug )
- { ::userDisplay "=== writeIstepmodeReg ", sprintf("0x%x",$data), "\n"; }
-
- ::write64( $IstepModeReg, $data );
-
-}
-
-
-##
-## Read IStepModeReg from memory. This will not be changed to scom.
-##
-## @return 64-bit value read from IStepModeReg
-##
-sub readIstepModeReg( )
-{
- my $data = 0;
-
- $data = ::read64( $IstepModeReg );
-
- if ( $opt_debug )
- { ::userDisplay "=== readIstepmodeReg ", sprintf("0x%x",$data), "\n"; }
-
- return $data;
-}
-
## --------------------------------------------------------------------
## Write command reg
##
@@ -780,16 +743,21 @@ sub runIStep( $$ )
if ( $taskStatus != 0 )
{
::userDisplay "Istep $stsIStep.$stsSubstep FAILED to launch, task status is $taskStatus\n" ;
+ exit;
}
else
{
::userDisplay "Istep $stsIStep.$stsSubstep $inList[$istep][$substep] returned Status: ",
- sprintf("%d",$istepStatus),
+ sprintf("%x",$istepStatus),
"\n" ;
if ( $istepStatus == 0xa )
{
::userDisplay ": not implemented yet.\n";
}
+ elsif ( $istepStatus != 0 )
+ {
+ exit;
+ }
}
::userDisplay "------------------------------------------------------- SeqNum: $g_SeqNum\n";
}
@@ -911,7 +879,11 @@ sub setMode( $ )
if ( $cmd eq "spless" )
{
- writeIstepModeReg( SPLESS_MODE_SIGNATURE );
+ ::userDisplay "This command doesn't force HB into SPLESS mode anymore\n";
+ ::userDisplay "It only establish SPLESS communication (clocks model in sim)\n";
+ ::userDisplay "Use attributes to enter SPLESS mode\n";
+ ::userDisplay "\tSP_FUNCTIONS:mailboxEnabled = 0b0\n";
+ ::userDisplay "\tISTEP_MODE = 0x1\n";
$expected = 1;
}
else
@@ -920,21 +892,6 @@ sub setMode( $ )
return -1;
}
- if ( $opt_debug )
- {
- ## readback and display
- $result = readIstepModeReg( );
- ::userDisplay "=== IstepModeReg readback: ", sprintf("0x%x", $result), "\n" ;
- }
-
- ## Clear status reg(s) before we start. If the status reg is initialized
- ## to garbage, there is a chance that it will mistaken for the readybit
- ::writeScom( MBOX_SCRATCH2, 8, 0 ); ## clear hi
- ::writeScom( MBOX_SCRATCH1, 8, 0 ); ## clear lo
-
- ## Clear command reg as well.
- ::writeScom( MBOX_SCRATCH3, 8, 0 ); ## clear cmd.
-
## Loop, advancing clock, and wait for readybit
$count = $hbCount ;
while(1)
diff --git a/src/build/debug/ecmd-debug-framework.pl b/src/build/debug/ecmd-debug-framework.pl
index 6021cf450..1981d3fee 100755
--- a/src/build/debug/ecmd-debug-framework.pl
+++ b/src/build/debug/ecmd-debug-framework.pl
@@ -238,7 +238,7 @@ sub readScom
close OUTPUT;
$result =~ s/.*0x//;
- $result = pack "H*", $result;
+ $result = hex $result;
return $result;
}
@@ -257,9 +257,7 @@ sub writeScom
my $size = shift;
my $data = shift;
- $data = unpack "H*", $result;
-
- my $command = sprintf("putscom pu %x %s -quiet > /dev/null",
+ my $command = sprintf("putscom pu %x %x -quiet > /dev/null",
$addr, $data);
system($command);
@@ -277,7 +275,7 @@ sub executeInstrCycles
{
my $cycles = shift;
- system(sprintf "ecmddelay %dcycles", $cycles);
+ #No op on real HW
}
# @sub readyForInstructions
diff --git a/src/build/vpo/hb-istep b/src/build/vpo/hb-istep
index af550a115..1ca614788 100755
--- a/src/build/vpo/hb-istep
+++ b/src/build/vpo/hb-istep
@@ -6,7 +6,7 @@
#
# IBM CONFIDENTIAL
#
-# COPYRIGHT International Business Machines Corp. 2011,2012
+# COPYRIGHT International Business Machines Corp. 2011,2013
#
# p1
#
@@ -314,7 +314,6 @@ chomp $command;
## Fetch the symbols we need from syms file
## ---------------------------------------------------------------------------
-my $IstepModeReg = getSymbol( "SPLESS::g_SPLess_IStepMode_Reg" );
my $CommandReg = getSymbol( "SPLESS::g_SPLess_Command_Reg" );
my $StatusReg = getSymbol( "SPLESS::g_SPLess_Status_Reg" );
@@ -343,7 +342,6 @@ if ( $opt_debug )
print STDERR "hbCommand = $hbCommand\n";
print STDERR "hbSymsFile = $hbSymsFile \n" ;
- print STDERR "IstepModeReg = $IstepModeReg \n" ;
print STDERR "CommandReg = $CommandReg \n" ;
print STDERR "StatusReg = $StatusReg \n" ;
print STDERR "ShutDownFlag = $ShutDownFlag \n" ;
@@ -1008,7 +1006,6 @@ sub setMode( $ )
my $expected = 0;
my $readybit = 0;
my $result = 0;
- my $hexstr = sprintf( "%x",$IstepModeReg );
my $resultRaw = 0;
my $clearcmd = 0;
@@ -1036,7 +1033,7 @@ sub setMode( $ )
( system( $clearcmd ) == 0 )
or die "$clearcmd failed, $? : $! \n";
- VBU_Cacheline::CLwrite( $hexstr, SPLESS_MODE_SIGNATURE );
+ print "Use attributes to control SPLess mode"
$expected = 1;
}
else
@@ -1045,13 +1042,6 @@ sub setMode( $ )
return -1;
}
- if ( $opt_debug )
- {
- ## readback and display
- $result = VBU_Cacheline::CLread( $hexstr );
- printf STDERR "=== istepmodereg readback: 0x%lx\n", $result ;
- }
-
# Start instruction only for master thread 0
VBU_Cacheline::P8_Ins_Start_T0();
OpenPOWER on IntegriCloud