diff options
-rw-r--r-- | src/build/buildpnor/PnorUtils.pm | 16 | ||||
-rw-r--r-- | src/build/buildpnor/pnorLayoutAxone.xml | 6 | ||||
-rw-r--r-- | src/build/configs/simics_axone.config | 2 | ||||
-rwxr-xr-x | src/build/simics/standalone.simics | 32 | ||||
-rwxr-xr-x | src/build/tools/hb | 2 |
5 files changed, 55 insertions, 3 deletions
diff --git a/src/build/buildpnor/PnorUtils.pm b/src/build/buildpnor/PnorUtils.pm index c889893e2..e5ecbb150 100644 --- a/src/build/buildpnor/PnorUtils.pm +++ b/src/build/buildpnor/PnorUtils.pm @@ -274,6 +274,22 @@ sub loadPnorLayout my $err = $@; die "ERROR: $this_func: Failed to create new XML file with corrected offsets, error = $err"; }; + + # Write out a helper file for our simics scripts + print "\nlocation = " . ${i_outputLayoutLocation} . "\n"; + my $simfilename = "${i_outputLayoutLocation}/simpnor.py"; + open(SIM_FILE,'>',$simfilename) or die("($simfilename) could not be opened."); + print SIM_FILE "def hb_get_pnor_offset(partname):\n"; + print SIM_FILE " toc_dict={}\n"; + #Iterate over the <section> elements. + foreach my $sectionEl (@{$xml->{section}}) + { + my $eyeCatch = $sectionEl->{eyeCatch}[0]; + my $physicalOffset = $sectionEl->{physicalOffset}[0]; + print SIM_FILE " toc_dict[\"$eyeCatch\"]=$physicalOffset\n"; + } + print SIM_FILE " return toc_dict[partname]\n"; + close SIM_FILE; } return 0; diff --git a/src/build/buildpnor/pnorLayoutAxone.xml b/src/build/buildpnor/pnorLayoutAxone.xml index a4f3bf4e2..274439a39 100644 --- a/src/build/buildpnor/pnorLayoutAxone.xml +++ b/src/build/buildpnor/pnorLayoutAxone.xml @@ -103,6 +103,12 @@ Layout Description <ecc/> </section> <section> + <description>Attributes</description> + <eyeCatch>ATTR_TMP</eyeCatch> + <physicalRegionSize>0x4000</physicalRegionSize> + <side>sideless</side> + </section> + <section> <description>Hostboot Base (1MB)</description> <eyeCatch>HBB</eyeCatch> <physicalRegionSize>0x100000</physicalRegionSize> diff --git a/src/build/configs/simics_axone.config b/src/build/configs/simics_axone.config index ae799a4f6..c3f33e583 100644 --- a/src/build/configs/simics_axone.config +++ b/src/build/configs/simics_axone.config @@ -21,7 +21,7 @@ set AXONE # Enable Console set CONSOLE -unset CONSOLE_OUTPUT_ERRORDISPLAY +set CONSOLE_OUTPUT_ERRORDISPLAY # OMIs were introduced in Axone and will be in P10 also set SUPPORT_OMI diff --git a/src/build/simics/standalone.simics b/src/build/simics/standalone.simics index dbd5cc920..c785dfc44 100755 --- a/src/build/simics/standalone.simics +++ b/src/build/simics/standalone.simics @@ -13,6 +13,13 @@ if ($hb_mode == 0) { # Axone and beyond $hb_skip_vpd_preload = 1; } +# Load up the pnor parsing function +try { + add-directory $hb_pnor_dir + run-python-file (lookup-file simpnor.py) + echo "Loaded simpnor.py" +} except { "No simpnor.py found, using hardcoding PNOR offsets." } + # Preload VPD in PNOR unless told not to if ($hb_skip_vpd_preload == 0) { @@ -56,10 +63,33 @@ if ($hb_skip_vpd_preload == 0) { if ($hb_mode == 0) { $eccPreload = (lookup-file "%simics%/eecache_prebuilt.bin.ecc") # NOTE must change offset if PNOR layout changes EECACHE offsets - echo " - Loading prebuilt EECACHE "+$eccPreload+" at 0x3D80000 in PNOR" + echo " - Loading prebuilt EECACHE "+$eccPreload+" at 0x2C000 in PNOR" ($hb_pnor).load-file $eccPreload 0x2C000 } +# Look for attribute overrides to load +try { + $attr_tmp = (lookup-file "ATTR_TMP") + try { + @simenv.attr_tmp_addr = hb_get_pnor_offset("ATTR_TMP") + } except { + $attr_tmp_addr = 0x000B2000 + } + echo " - Loading ATTR_TMP "+$attr_tmp+" at "+$attr_tmp_addr+" in PNOR" + ($hb_pnor).load-file $attr_tmp $attr_tmp_addr +} except { echo "No attribute overrides found." } + +# Look for a guard file to load +try { + $guard = (lookup-file "GUARD") + try { + @simenv.guard_addr = hb_get_pnor_offset("GUARD") + } except { + $guard_addr = 0x000AC000 + } + echo " - Loading GUARD "+$guard+" at "+$guard_addr+" in PNOR" + ($hb_pnor).load-file $guard $guard_addr +} except { echo "No gard records found." } # Turn on all processor cec-chips if ($hb_mode == 1) { diff --git a/src/build/tools/hb b/src/build/tools/hb index 013700f84..9e7e38a48 100755 --- a/src/build/tools/hb +++ b/src/build/tools/hb @@ -435,7 +435,7 @@ hb_startsimics() else VEXEC_STR="" fi - export RUNSIMCMD="cd ${SANDBOXBASE}/simics/ &&${VEXEC_STR} ./runsim -m ${MACHINE} hb_script_to_run=${MY_DIR}/startup.simics pnor_img=${MY_DIR}/../../../hbfw/img/axone.pnor sbe_seeprom_img=${SANDBOXBASE}/images/ppc/lab/flash/sbe_seeprom_p9a_10.bin.ecc num_procs=2 enable_lpc_console=TRUE" + export RUNSIMCMD="cd ${SANDBOXBASE}/simics/ &&${VEXEC_STR} ./runsim -m ${MACHINE} hb_script_to_run=${MY_DIR}/startup.simics pnor_img=${MY_DIR}/../../../hbfw/img/axone.pnor sbe_seeprom_img=${SANDBOXBASE}/images/ppc/lab/flash/sbe_seeprom_p9a_10.bin.ecc num_procs=2 enable_lpc_console=TRUE hb_pnor_dir=${MY_DIR}/../../../hbfw/img/" echo "**********" echo $RUNSIMCMD echo "**********" |