diff options
author | Dean Sanner <dsanner@us.ibm.com> | 2016-05-12 14:39:26 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2016-06-24 10:58:26 -0400 |
commit | 42b2be3b88063b420ed1228529497af73849c4fa (patch) | |
tree | cbc01208bf290337aac86b22d253633ddf804c2b /src | |
parent | aa513a3a39202bcbc5294cd1ef6618ecbe151bf8 (diff) | |
download | talos-hostboot-42b2be3b88063b420ed1228529497af73849c4fa.tar.gz talos-hostboot-42b2be3b88063b420ed1228529497af73849c4fa.zip |
Make HB and HW Mailbox Scratch reg numbering consistent
Change-Id: I74dde172f66e910f40f0fd4ffe981e0932c9ae4e
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/24564
Tested-by: Jenkins Server
Tested-by: FSP CI Jenkins
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Prachi Gupta <pragupta@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/build/debug/Hostboot/Istep.pm | 16 | ||||
-rw-r--r-- | src/include/usr/initservice/mboxRegs.H | 10 | ||||
-rw-r--r-- | src/usr/initservice/istepdispatcher/splesscommon.C | 6 | ||||
-rw-r--r-- | src/usr/pnor/pnor_common.C | 6 | ||||
-rwxr-xr-x | src/usr/targeting/targetservicestart.C | 10 |
5 files changed, 23 insertions, 25 deletions
diff --git a/src/build/debug/Hostboot/Istep.pm b/src/build/debug/Hostboot/Istep.pm index 8d1896932..f33998000 100755 --- a/src/build/debug/Hostboot/Istep.pm +++ b/src/build/debug/Hostboot/Istep.pm @@ -79,10 +79,10 @@ use constant MAX_ISTEPS => 256; use constant MAX_SUBSTEPS => 25; ## Mailbox Scratchpad regs -use constant MBOX_SCRATCH0 => 0x00050038; ## contTrace -use constant MBOX_SCRATCH1 => 0x00050039; ## sts LO -use constant MBOX_SCRATCH2 => 0x0005003a; ## sts HI -use constant MBOX_SCRATCH3 => 0x0005003b; ## cmd reg +use constant MBOX_SCRATCH1 => 0x00050038; ## conTrace addr +use constant MBOX_SCRATCH2 => 0x00050039; ## conTrace len +use constant MBOX_SCRATCH3 => 0x0005003a; ## Not used +use constant MBOX_SCRATCH4 => 0x0005003b; ## cmd reg ## extra parm for ::executeInstrCycles use constant NOSHOW => 1; @@ -599,7 +599,7 @@ sub sendCommand( $ ) ## Hostboot expects a key to be set to trigger the command ## when doing via scom we simply need to read, modify write ## the reg - $read_bindata = ::readScom( MBOX_SCRATCH3, 8 ); + $read_bindata = ::readScom( MBOX_SCRATCH4, 8 ); my $key = (($read_bindata) & 0x1F00000000000000); ## convert to binary before sending to writescom @@ -610,13 +610,13 @@ sub sendCommand( $ ) $bindata = (($bindata) | ($key)); ## now write the data - ::writeScom( MBOX_SCRATCH3, 8, $bindata ); + ::writeScom( MBOX_SCRATCH4, 8, $bindata ); if ( $opt_debug ) { ## sanity check ::executeInstrCycles( 10, NOSHOW ); - my $readback = ::readScom( MBOX_SCRATCH3, 8 ); + my $readback = ::readScom( MBOX_SCRATCH4, 8 ); ::userDisplay "=== sendCommand readback: $readback\n"; } @@ -640,7 +640,7 @@ sub getStatus() my $statusHi = ""; my $statusLo = ""; - $statusHi = ::readScom( MBOX_SCRATCH3, 8 ); + $statusHi = ::readScom( MBOX_SCRATCH4, 8 ); if ( $opt_debug ) { ::userDisplay "=== statusHi: $statusHi \n"; } $statusLo = 0; diff --git a/src/include/usr/initservice/mboxRegs.H b/src/include/usr/initservice/mboxRegs.H index da8bcdf53..b000cc0d5 100644 --- a/src/include/usr/initservice/mboxRegs.H +++ b/src/include/usr/initservice/mboxRegs.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -29,10 +29,10 @@ namespace INITSERVICE { namespace SPLESS { - const uint32_t MBOX_SCRATCH_REG0 = 0x00050038; - const uint32_t MBOX_SCRATCH_REG1 = 0x00050039; - const uint32_t MBOX_SCRATCH_REG2 = 0x0005003a; - const uint32_t MBOX_SCRATCH_REG3 = 0x0005003b; + const uint32_t MBOX_SCRATCH_REG1 = 0x00050038; + const uint32_t MBOX_SCRATCH_REG2 = 0x00050039; + const uint32_t MBOX_SCRATCH_REG3 = 0x0005003a; + const uint32_t MBOX_SCRATCH_REG4 = 0x0005003b; }; }; #endif diff --git a/src/usr/initservice/istepdispatcher/splesscommon.C b/src/usr/initservice/istepdispatcher/splesscommon.C index deeaf31bd..c9c71eefd 100644 --- a/src/usr/initservice/istepdispatcher/splesscommon.C +++ b/src/usr/initservice/istepdispatcher/splesscommon.C @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2012,2015 */ +/* Contributors Listed Below - COPYRIGHT 2012,2016 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -123,7 +123,7 @@ void readCmdSts( SPLessCmd &io_rcmd ) g_SPLess_pMasterProcChip, &(op), op_size, - DEVICE_SCOM_ADDRESS( MBOX_SCRATCH_REG3 ) ); + DEVICE_SCOM_ADDRESS( MBOX_SCRATCH_REG4 ) ); io_rcmd.word = (op >>32); #endif @@ -169,7 +169,7 @@ void writeCmdSts( SPLessCmd i_rcmd ) g_SPLess_pMasterProcChip, &(op), op_size, - DEVICE_SCOM_ADDRESS( MBOX_SCRATCH_REG3 ) ); + DEVICE_SCOM_ADDRESS( MBOX_SCRATCH_REG4 ) ); #endif #ifdef SPLESS_DEBUG diff --git a/src/usr/pnor/pnor_common.C b/src/usr/pnor/pnor_common.C index d2c18e3bb..c1ceab291 100644 --- a/src/usr/pnor/pnor_common.C +++ b/src/usr/pnor/pnor_common.C @@ -72,7 +72,7 @@ void PNOR::findPhysicalOffset(ffs_hdr* i_tocAddress, } /* - * @brief used to translate mmio offset stored in mbox scratch 2 + * @brief used to translate mmio offset stored in mbox scratch 3 * to physical offset of HBB Image */ errlHndl_t PNOR::mmioToPhysicalOffset(uint64_t& o_hbbAddress) @@ -86,9 +86,9 @@ errlHndl_t PNOR::mmioToPhysicalOffset(uint64_t& o_hbbAddress) TARGETING::Target* l_masterProc = TARGETING::MASTER_PROCESSOR_CHIP_TARGET_SENTINEL; - //MBOX_SCRATCH_REG2 = 0x5003A + //MBOX_SCRATCH_REG3 = 0x5003A l_err = DeviceFW::deviceRead(l_masterProc, &l_hbbMMIO,l_size, - DEVICE_SCOM_ADDRESS(INITSERVICE::SPLESS::MBOX_SCRATCH_REG2)); + DEVICE_SCOM_ADDRESS(INITSERVICE::SPLESS::MBOX_SCRATCH_REG3)); if (l_err) { TRACFCOMP(g_trac_pnor,"PNOR::mmioToPhysicalOffset: Failed to read" diff --git a/src/usr/targeting/targetservicestart.C b/src/usr/targeting/targetservicestart.C index 7adc7a21c..8fe354667 100755 --- a/src/usr/targeting/targetservicestart.C +++ b/src/usr/targeting/targetservicestart.C @@ -242,18 +242,16 @@ static void initializeAttributes(TargetService& i_targetService) l_pMasterProcChip->setAttr<ATTR_I2C_SWITCHES>(l_i2c_switches); -#if 0 //@fixme RTC 127337 +#if 0 //@fixme RTC 134431 errlHndl_t l_errl = NULL; size_t l_size = sizeof(uint64_t); uint64_t l_data; - // Scratch register 2 is defined as 0x00050039.. accessing - // directly to avoid confusion as the Literals set have - // 0x00050039 mapped to MBOX_SCRATCH1 which is confusing. + // Scratch register 2 is defined as 0x00050039.. l_errl = DeviceFW::deviceRead(l_pMasterProcChip, &(l_data), l_size, - DEVICE_SCOM_ADDRESS(0x00050039)); + DEVICE_SCOM_ADDRESS(MBOX_SCRATCH2)); if(l_errl) { @@ -268,7 +266,7 @@ static void initializeAttributes(TargetService& i_targetService) l_isMpipl = true; } } -#endif //@fixme RTC 127337 +#endif //@fixme RTC 134431 } |