summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDean Sanner <dsanner@us.ibm.com>2012-06-25 10:25:17 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2012-06-26 14:46:03 -0500
commit694eaf8e9650916433b8eb6b067725f4730501a5 (patch)
treed08ab3e0e48d3e112a9812d1e0c4e4ed9c5bebf9
parent2ca475148bef81d13f6d4bdfda376691c3a0f9d1 (diff)
downloadtalos-hostboot-694eaf8e9650916433b8eb6b067725f4730501a5.tar.gz
talos-hostboot-694eaf8e9650916433b8eb6b067725f4730501a5.zip
Switch to using PNOR in Simics
Switch to use manual PNOR images in simics Provided method for VPO to override Change-Id: I18195b645053f1ce90b4322ae2e09b6b08844331 Reviewed-on: http://gfw160.austin.ibm.com:8080/gerrit/1241 Reviewed-by: ADAM R. MUHLE <armuhle@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Tested-by: Jenkins Server
-rw-r--r--src/build/citest/etc/bbuild2
-rwxr-xr-xsrc/build/simics/startup.simics6
-rwxr-xr-xsrc/build/vpo/do_sprint3
-rwxr-xr-xsrc/build/vpo/hb-istep2
-rw-r--r--src/include/sys/mmio.h67
-rw-r--r--src/usr/pnor/pnordd.C21
-rw-r--r--src/usr/scom/test/scomtest.H47
7 files changed, 86 insertions, 62 deletions
diff --git a/src/build/citest/etc/bbuild b/src/build/citest/etc/bbuild
index e74585033..01f040745 100644
--- a/src/build/citest/etc/bbuild
+++ b/src/build/citest/etc/bbuild
@@ -1 +1 @@
-/esw/fips810/Builds/b0611c_1223.810
+/esw/fips810/Builds/b0621a_1225.810
diff --git a/src/build/simics/startup.simics b/src/build/simics/startup.simics
index e57dd7e47..3259d74af 100755
--- a/src/build/simics/startup.simics
+++ b/src/build/simics/startup.simics
@@ -21,8 +21,10 @@ try {
# Preload VPD in PNOR
try {
run-python-file (lookup-file hbfw/hb-pnor-mvpd-preload.py)
- (system_cmp0.phys_mem).load-file ./sysmvpd.dat 0x681000
- (system_cmp0.phys_mem).load-file ./sysspd.dat 0x701000
+ fpga0.sfc_master_mmio_image.add-partial-diff-file ./sysmvpd.dat 0x281000
+ fpga0.sfc_master_mmio_image.add-partial-diff-file ./sysspd.dat 0x301000
+ #(system_cmp0.phys_mem).load-file ./sysmvpd.dat 0x681000
+ #(system_cmp0.phys_mem).load-file ./sysspd.dat 0x701000
} except { echo "ERROR: Failed to preload VPD into PNOR." }
# Load HB debug tools.
diff --git a/src/build/vpo/do_sprint b/src/build/vpo/do_sprint
index 2399c5dcd..a199fb3c6 100755
--- a/src/build/vpo/do_sprint
+++ b/src/build/vpo/do_sprint
@@ -241,6 +241,9 @@ if [ "$start_after_hbiload" != "--start_after_hbiload" -a "$start_after_hbitest"
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
+ #Set PNOR mode to fake PNOR using Scratch 1
+ putscom pu.ex 10013284 FAC0FAC0FAC0FAC0 -p0 -call
+
# Start instructions
$HB_VBUTOOLS/proc_thread_control_wrap.x86 -sreset ${CORE--cft} -quiet
diff --git a/src/build/vpo/hb-istep b/src/build/vpo/hb-istep
index 8771ae87c..01013b4ad 100755
--- a/src/build/vpo/hb-istep
+++ b/src/build/vpo/hb-istep
@@ -653,7 +653,7 @@ sub sendCommand( $ )
## Use Putscom to avoid hostboot race condition
$data =~ s/0x//;
- $cmd = "putscom pu 05003b -p0 -quiet" . $data;
+ $cmd = "putscom pu 05003b -p0 -quiet " . $data;
if ( $opt_debug ) { print STDERR __LINE__, "-- run $cmd ...\n"; }
( system( $cmd ) == 0 )
diff --git a/src/include/sys/mmio.h b/src/include/sys/mmio.h
index aca9286a5..6eacdcb49 100644
--- a/src/include/sys/mmio.h
+++ b/src/include/sys/mmio.h
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/include/sys/mmio.h $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2010 - 2011
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/include/sys/mmio.h $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2010-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_TAG
+ */
#ifndef __SYS_MMIO_H
#define __SYS_MMIO_H
@@ -84,14 +85,20 @@ enum MMIO_Scratch_Register
{
/** Thread0 Scratch Register - Progress Code / Status. */
MMIO_SCRATCH_PROGRESS_CODE = 0x0,
- /** Thread1 Scratch Register - IPL Step Command Register. */
- MMIO_SCRATCH_IPLSTEP_COMMAND = 0x8,
- /** Thread2 Scratch Register - IPL Step Status Register. */
- MMIO_SCRATCH_IPLSTEP_STATUS = 0x10,
- /** Thread3 Scratch Register - IPL Step Config Register. */
- MMIO_SCRATCH_IPLSTEP_CONFIG = 0x18, // TODO: This one is temporary until
- // IPL by steps in configurable in
- // PNOR.
+ /** Thread1 Scratch Register - PNOR mode control*/
+ MMIO_SCRATCH_PNOR_MODE = 0x8,
+ /** Thread2 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T2 = 0x10,
+ /** Thread3 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T3 = 0x18,
+ /** Thread4 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T4 = 0x20,
+ /** Thread5 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T5 = 0x28,
+ /** Thread6 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T6 = 0x30,
+ /** Thread7 Scratch Register - Unused */
+ MMIO_SCRATCH_RSVD_T7 = 0x38,
};
/** @fn mmio_scratch_read()
diff --git a/src/usr/pnor/pnordd.C b/src/usr/pnor/pnordd.C
index bd610f81b..a62bc59f0 100644
--- a/src/usr/pnor/pnordd.C
+++ b/src/usr/pnor/pnordd.C
@@ -59,6 +59,10 @@ extern trace_desc_t* g_trac_pnor;
namespace PNOR
{
+ enum {
+ VPO_MODE_OVERRIDE = 0xFAC0FAC0FAC0FAC0
+ };
+
/**
* @brief Performs an PNOR Read Operation
* This function performs a PNOR Read operation. It follows a pre-defined
@@ -411,11 +415,18 @@ PnorDD::PnorDD( PnorMode_t i_mode )
//In the normal case we will choose the mode for the caller
if( MODEL_UNKNOWN == iv_mode )
{
- //Break into 32-bit LPC ops but use memcpy into cache area
- iv_mode = MODEL_LPC_MEM;
-
- //Override for VPO, use flat model for performance
- //@fixme - how?? I can't use targetting yet to tell I'm in VPO...
+ //Use real PNOR for everything except VPO
+ uint64_t vpo_override = mmio_scratch_read(MMIO_SCRATCH_PNOR_MODE);
+ if(vpo_override == PNOR::VPO_MODE_OVERRIDE)
+ {
+ //VPO override set -- use fastest method -- memcpy
+ iv_mode = MODEL_MEMCPY;
+ }
+ else
+ {
+ //Normal mode
+ iv_mode = MODEL_REAL_CMD;
+ }
}
if( MODEL_REAL_CMD == iv_mode )
diff --git a/src/usr/scom/test/scomtest.H b/src/usr/scom/test/scomtest.H
index e30770326..3bd216635 100644
--- a/src/usr/scom/test/scomtest.H
+++ b/src/usr/scom/test/scomtest.H
@@ -1,25 +1,26 @@
-// IBM_PROLOG_BEGIN_TAG
-// This is an automatically generated prolog.
-//
-// $Source: src/usr/scom/test/scomtest.H $
-//
-// IBM CONFIDENTIAL
-//
-// COPYRIGHT International Business Machines Corp. 2011
-//
-// 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
+/* IBM_PROLOG_BEGIN_TAG
+ * This is an automatically generated prolog.
+ *
+ * $Source: src/usr/scom/test/scomtest.H $
+ *
+ * IBM CONFIDENTIAL
+ *
+ * COPYRIGHT International Business Machines Corp. 2011-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_TAG
+ */
#ifndef __SCOMTEST_H
#define __SCOMTEST_H
@@ -118,7 +119,7 @@ public:
} test_data[] = {
{ scom_targets[PROCWRAP], 0x120F0000 ,0xFEEDB0B000001234},
{ scom_targets[PROCWRAP], 0x120F0166, 0xFEDCBA9876543210},
- { scom_targets[PROCWRAP], 0x00040005, 0x0000000000000000},
+ { scom_targets[PROCWRAP], 0x01010803, 0x0000000000000000},
{ scom_targets[PROCWRAP], 0x02040004, 0xFFFFFFFFFFFFFFFF},
{ scom_targets[PROC1], 0x00040005, 0x1234567887654321},
{ scom_targets[PROC1], 0x02040004, 0x1122334455667788},
OpenPOWER on IntegriCloud