diff options
| author | Christian Geddes <crgeddes@us.ibm.com> | 2019-02-04 15:24:04 -0600 |
|---|---|---|
| committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2019-02-13 14:39:32 -0600 |
| commit | eee350897db3e72a40baa3d4e5c36600f092b7ab (patch) | |
| tree | 7cd891cb97c8e580532ba8f6ee1895f82747dfc5 /src/build/simics | |
| parent | c47875eb8c65cbdf29032377c9dc584d081ef35b (diff) | |
| download | talos-hostboot-eee350897db3e72a40baa3d4e5c36600f092b7ab.tar.gz talos-hostboot-eee350897db3e72a40baa3d4e5c36600f092b7ab.zip | |
Fix issues w/ axone updates to simics scripts
Simics teams were hitting a problem trying to boot older simics models
because our scripts relied on $MACHINE being set to CEC_MODEL. This
value gets set by linux so we cannot rely on it. Instead use the old
way to lookup MODEL for older version of simics, and for new way,
(axone and beyond) just force MODEL to be "AXONE" for now. Eventually
simics team needs to provide interface to lookup MODEL. Also in this
commit we need to write "0x5A5A5A5A" to the SBE seeprom images to avoid
updates, update the simics backing build, and change the CLI args for
hb startsimics in axone to no longer use -o and always pass in the path
to the combined SBE image/ HBBL image
Change-Id: Ib477e86b0b8aa1a4d44545c62b16fc2cbed2034b
CQ: SW453806
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/71323
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Reviewed-by: CALEB SCHLOSSIN <calebs@us.ibm.com>
Reviewed-by: VIJAY F. LOBO <vflobo@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/build/simics')
| -rwxr-xr-x | src/build/simics/startup.simics | 63 |
1 files changed, 47 insertions, 16 deletions
diff --git a/src/build/simics/startup.simics b/src/build/simics/startup.simics index bf86020ec..97766574e 100755 --- a/src/build/simics/startup.simics +++ b/src/build/simics/startup.simics @@ -1,4 +1,10 @@ +$hb_mode = 1 #Old Mode -- No simics internals changed +$runsim_lookup = (lookup-file -query "%simics%/runsim") +if ($runsim_lookup) { + $hb_mode = 0 #New Mode -- Some simics internal changes +} + # $hb_script_to_run is only set in Axone Standalone and onwards # we need to add the script directory in the Axone standalone model # for the older models the directory is already in the path @@ -18,20 +24,44 @@ if not defined hb_script_location { python "os.environ['HB_TOOLPATH'] = \""+$hb_script_location+"\"" -$machine_name = (shell "printenv MACHINE") -$hb_machine = $machine_name +# TODO RTC: 204842 Revist once we get way to read CEC_TYPE from simics +if ($hb_mode == 1) { + $model = (env CEC_TYPE) + $machine_name = (shell "printenv MACHINE") + $hb_machine = "unknown" + if ($model == "p9_zztop") {$hb_machine = "zztop"} + if ($model == "p9_zeppelin") {$hb_machine = "zeppelin"} + if ($model == "p9_fleetwood") {$hb_machine = "fleetwood"} + if ($model == "p9_nimbus") {$hb_machine = "nimbus"} + if ($model == "p9_cumulus") { + if ($machine_name == "CUMULUS_CDIMM") { $hb_machine = "cumulus_cdimm" } + if ($machine_name != "CUMULUS_CDIMM") { $hb_machine = "cumulus" } + } + +}else{ + $hb_machine = "AXONE" +} python "os.environ['HB_MACHINE'] = \""+$hb_machine+"\"" echo "HB_MACHINE is: "+$hb_machine -# Setup some common vars to use across machine types -$hb_masterproc = (get-master-proc) +$hb_pnor = "" + +if( $hb_mode == 1) { + # Setup some common vars to use across machine types + $hb_masterproc = (get-master-proc) + $hb_masterproc_cecchip = (get-master-cec-chip) + $hb_pnor = (get-master-pnor) +} else { + $hb_masterproc = (get-master-procs)[0] + $hb_masterproc_cecchip = (get-master-cec-chips)[0] + $hb_pnor = (get-master-pnors)[0] +} + echo "Master Proc is: "+$hb_masterproc -$hb_masterproc_cecchip = (get-master-cec-chip) echo "Master Proc Cec-Chip is: "+$hb_masterproc_cecchip + #New Simics flow can simply get the string from get-master-pnor command -$hb_pnor = "" -$hb_pnor = (get-master-pnor) if ($hb_pnor == NIL) { try { @@ -47,21 +77,22 @@ if ($hb_pnor == NIL) { } echo "Master PNOR is: "+$hb_pnor -$hb_mode = 1 #Old Mode -- No simics internals changed -$runsim_lookup = (lookup-file -query "%simics%/runsim") -if ($runsim_lookup) { - $hb_mode = 0 #New Mode -- Some simics internal changes -} - # Choose a default core to start with $hb_cpu = "system_cmp0.cpu0_0_00_0" echo "Defaulting to CPU "+$hb_cpu+" for Hostboot tools" # Prevent SBE Updates from happening on an IPL echo "Altering SBE SEEPROM Versions to disable Update in IPL" -foreach $cc in (get-object-list p9_proc) { - ($cc).seeprom1.seeprom1_image.set 0x3FED9 0x5A5A5A5A 8 -l - ($cc).seeprom3.seeprom3_image.set 0x3FED9 0x5A5A5A5A 8 -l +if ($hb_mode == 1) { + foreach $cc in (get-object-list p9_proc) { + ($cc).seeprom1.seeprom1_image.set 0x3FED9 0x5A5A5A5A 8 -l + ($cc).seeprom3.seeprom3_image.set 0x3FED9 0x5A5A5A5A 8 -l + } +} else { + foreach $cc in (get-object-list proc_hb_standalone) { + ($cc).seeprom1_image.set 0x3FED9 0x5A5A5A5A 8 -l + ($cc).seeprom3_image.set 0x3FED9 0x5A5A5A5A 8 -l + } } # Load HB debug tools. |

