diff options
author | Elizabeth Liner <eliner@us.ibm.com> | 2017-06-13 15:43:30 -0500 |
---|---|---|
committer | Elizabeth Liner <eliner@us.ibm.com> | 2017-08-07 23:32:31 -0500 |
commit | aebfb7b44b5f0f1e4b4499b87af064d254ce6cf4 (patch) | |
tree | 2cd2ac44ea8a0b7347010297620985c65dc98160 | |
parent | 7dd93556bcefdb96483e413bbd650e3929db2769 (diff) | |
download | pnor-aebfb7b44b5f0f1e4b4499b87af064d254ce6cf4.tar.gz pnor-aebfb7b44b5f0f1e4b4499b87af064d254ce6cf4.zip |
Adding base support for the new MEMD pnor section
This commit adds support for a separate version of the MEMD
VPD. In the PNOR, we will have a new optional section that
will contain multiple versions of the MEMD VPD.
-rwxr-xr-x | create_pnor_image.pl | 6 | ||||
-rw-r--r-- | p9Layouts/defaultPnorLayout_128.xml | 8 | ||||
-rw-r--r-- | p9Layouts/defaultPnorLayout_32.xml | 8 | ||||
-rw-r--r-- | p9Layouts/defaultPnorLayout_64.xml | 8 | ||||
-rwxr-xr-x | update_image.pl | 20 |
5 files changed, 50 insertions, 0 deletions
diff --git a/create_pnor_image.pl b/create_pnor_image.pl index 9622e40..9048d8d 100755 --- a/create_pnor_image.pl +++ b/create_pnor_image.pl @@ -20,6 +20,7 @@ my $wink_binary_filename = ""; my $occ_binary_filename = ""; my $openpower_version_filename = ""; my $wofdata_binary_filename = ""; +my $memddata_binary_filename = ""; while (@ARGV > 0){ $_ = $ARGV[0]; @@ -94,6 +95,10 @@ while (@ARGV > 0){ $wofdata_binary_filename = $ARGV[1] or die "Bad command line arg given: expecting a wofdata binary filename.\n"; shift; } + elsif (/^-memddata_binary_filename/i){ + $memddata_binary_filename = $ARGV[1] or die "Bad command line arg given: expecting a memddata binary filename.\n"; + shift; + } else { print "Unrecognized command line arg: $_ \n"; print "To view all the options and help text run \'$program_name -h\' \n"; @@ -139,6 +144,7 @@ $build_pnor_command .= " --binFile_IMA_CATALOG $scratch_dir/ima_catalog.bin.ecc" if ($release eq "p9"){ $build_pnor_command .= " --binFile_WOFDATA $wofdata_binary_filename" if -e $wofdata_binary_filename; + $build_pnor_command .= " --binFile_MEMD $memddata_binary_filename" if -e $memddata_binary_filename; } if ($release eq "p8"){ $build_pnor_command .= " --binFile_SBEC $scratch_dir/$sbec_binary_filename"; diff --git a/p9Layouts/defaultPnorLayout_128.xml b/p9Layouts/defaultPnorLayout_128.xml index a155c1b..15a0fba 100644 --- a/p9Layouts/defaultPnorLayout_128.xml +++ b/p9Layouts/defaultPnorLayout_128.xml @@ -309,4 +309,12 @@ Layout Description <ecc/> <volatile/> </section> + <section> + <description>MEMD extra data (24K)</description> + <eyeCatch>MEMD</eyeCatch> + <physicalOffset>0x2B73000</physicalOffset> + <physicalRegionSize>0x6000</physicalRegionSize> + <side>A</side> + <ecc/> + </section> </pnor> diff --git a/p9Layouts/defaultPnorLayout_32.xml b/p9Layouts/defaultPnorLayout_32.xml index 5d2ce2d..899e965 100644 --- a/p9Layouts/defaultPnorLayout_32.xml +++ b/p9Layouts/defaultPnorLayout_32.xml @@ -310,4 +310,12 @@ Layout Description <ecc/> <volatile/> </section> + <section> + <description>MEMD extra data (24K)</description> + <eyeCatch>MEMD</eyeCatch> + <physicalOffset>0x2B03000</physicalOffset> + <physicalRegionSize>0x6000</physicalRegionSize> + <side>A</side> + <ecc/> + </section> </pnor> diff --git a/p9Layouts/defaultPnorLayout_64.xml b/p9Layouts/defaultPnorLayout_64.xml index f474746..a10ef4b 100644 --- a/p9Layouts/defaultPnorLayout_64.xml +++ b/p9Layouts/defaultPnorLayout_64.xml @@ -310,4 +310,12 @@ Layout Description <ecc/> <volatile/> </section> + <section> + <description>MEMD extra data (24K)</description> + <eyeCatch>MEMD</eyeCatch> + <physicalOffset>0x2B73000</physicalOffset> + <physicalRegionSize>0x6000</physicalRegionSize> + <side>A</side> + <ecc/> + </section> </pnor> diff --git a/update_image.pl b/update_image.pl index 8cb85b4..e1ff994 100755 --- a/update_image.pl +++ b/update_image.pl @@ -23,6 +23,7 @@ my $openpower_version_filename = ""; my $payload = ""; my $xz_compression = 0; my $wof_binary_filename = ""; +my $memd_binary_filename = ""; while (@ARGV > 0){ $_ = $ARGV[0]; @@ -104,6 +105,11 @@ while (@ARGV > 0){ $wof_binary_filename = $ARGV[1]; shift; } + elsif (/^-memd_binary_filename/i){ + #This filename is necessary if the file exists, but if it's not given, we add in a blank partition + $memd_binary_filename = $ARGV[1]; + shift; + } else { print "Unrecognized command line arg: $_ \n"; #print "To view all the options and help text run \'$program_name -h\' \n"; @@ -278,6 +284,7 @@ if ($release eq "p9" && -e $wof_binary_filename) { run_command("dd if=$wof_binary_filename ibs=2728K conv=sync > $scratch_dir/hostboot.temp.bin"); run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/wofdata.bin.ecc --p8"); } + #Print error and blank binary if wof file does not exist elsif ($release eq "p9") { @@ -286,6 +293,19 @@ elsif ($release eq "p9") run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/wofdata.bin.ecc --p8"); } +#Encode ECC into the MEMD Partition +if ($release eq "p9" && -e $memd_binary_filename) { + run_command("dd if=$memd_binary_filename > $scratch_dir/hostboot.temp.bin"); + run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/memd_extra.bin.ecc --p8"); +} + +#Create blank binary file for MEMD Partition (for now) +elsif ($release eq "p9") { + print "ERROR: MEMD partition is not found, including blank binary instead\n"; + run_command("dd if=/dev/zero bs=20K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin"); + run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/memd_extra_data.bin.ecc --p8"); +} + #END MAIN #------------------------------------------------------------------------- |