summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan <dcrowell@us.ibm.com>2017-12-01 11:11:57 -0600
committerGitHub <noreply@github.com>2017-12-01 11:11:57 -0600
commit4c844a5ef7efc6605c4c877b6c92cf0a1a0df0b5 (patch)
tree394ab5734fc02d00aaf126d444996eeec11f1676
parent5181154715dd12e10f1d1ac432e128f44e8d32c0 (diff)
parentdccb9d427b9fb95b08af814218d06d9bee5392e6 (diff)
downloadpnor-4c844a5ef7efc6605c4c877b6c92cf0a1a0df0b5.tar.gz
pnor-4c844a5ef7efc6605c4c877b6c92cf0a1a0df0b5.zip
Merge pull request #84 from nagendraIBM/master
New Pnor HDAT partition addition.
-rwxr-xr-xcreate_pnor_image.pl7
-rw-r--r--p9Layouts/defaultPnorLayout_64.xml16
-rwxr-xr-xupdate_image.pl22
3 files changed, 39 insertions, 6 deletions
diff --git a/create_pnor_image.pl b/create_pnor_image.pl
index 2cf220c..4f7f9a3 100755
--- a/create_pnor_image.pl
+++ b/create_pnor_image.pl
@@ -21,6 +21,7 @@ my $occ_binary_filename = "";
my $openpower_version_filename = "";
my $wofdata_binary_filename = "";
my $memddata_binary_filename = "";
+my $hdat_binary_filename = "";
while (@ARGV > 0){
$_ = $ARGV[0];
@@ -99,6 +100,10 @@ while (@ARGV > 0){
$memddata_binary_filename = $ARGV[1] or die "Bad command line arg given: expecting a memddata binary filename.\n";
shift;
}
+ elsif (/^-hdat_binary_filename/i){
+ $hdat_binary_filename = $ARGV[1] or die "Bad command line arg given: expecting a hdat 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";
@@ -134,7 +139,6 @@ $build_pnor_command .= " --binFile_MVPD $scratch_dir/mvpd_fill.bin.ecc";
$build_pnor_command .= " --binFile_DJVPD $scratch_dir/djvpd_fill.bin.ecc";
$build_pnor_command .= " --binFile_CVPD $scratch_dir/cvpd.bin.ecc";
$build_pnor_command .= " --binFile_ATTR_TMP $scratch_dir/attr_tmp.bin.ecc";
-$build_pnor_command .= " --binFile_ATTR_PERM $scratch_dir/attr_perm.bin.ecc";
$build_pnor_command .= " --binFile_OCC $occ_binary_filename.ecc";
$build_pnor_command .= " --binFile_FIRDATA $scratch_dir/firdata.bin.ecc";
$build_pnor_command .= " --binFile_CAPP $scratch_dir/cappucode.bin.ecc";
@@ -145,6 +149,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;
+ $build_pnor_command .= " --binFile_HDAT $hdat_binary_filename" if -e $hdat_binary_filename;
}
if ($release eq "p8"){
$build_pnor_command .= " --binFile_SBEC $scratch_dir/$sbec_binary_filename";
diff --git a/p9Layouts/defaultPnorLayout_64.xml b/p9Layouts/defaultPnorLayout_64.xml
index a626275..8547494 100644
--- a/p9Layouts/defaultPnorLayout_64.xml
+++ b/p9Layouts/defaultPnorLayout_64.xml
@@ -282,6 +282,11 @@ Layout Description
<side>A</side>
<reprovision/>
</section>
+<!-- Commenting this temporarily as a workaround for accomadating
+ new partition. Due to incorrect Toc size assumption, currently
+ we are unable to create more than 31 partitions. Until the
+ proper fix comes in, commenting this out based on internal
+ discussion.
<section>
<description>Permanent Attribute Override (32K)</description>
<eyeCatch>ATTR_PERM</eyeCatch>
@@ -292,6 +297,7 @@ Layout Description
<reprovision/>
<clearOnEccErr/>
</section>
+-->
<section>
<description>PNOR Version (4K)</description>
<eyeCatch>VERSION</eyeCatch>
@@ -360,4 +366,14 @@ Layout Description
<readOnly/>
<ecc/>
</section>
+ <section>
+ <description>HDAT binary data (16KB)</description>
+ <eyeCatch>HDAT</eyeCatch>
+ <physicalOffset>0x2BC6000</physicalOffset>
+ <physicalRegionSize>0x8000</physicalRegionSize>
+ <side>sideless</side>
+ <sha512Version/>
+ <readOnly/>
+ <ecc/>
+ </section>
</pnor>
diff --git a/update_image.pl b/update_image.pl
index 976bc62..849d131 100755
--- a/update_image.pl
+++ b/update_image.pl
@@ -32,6 +32,7 @@ my $key_transition = "";
my $pnor_layout = "";
my $debug = 0;
my $sign_mode = "";
+my $hdat_binary_filename = "";
while (@ARGV > 0){
$_ = $ARGV[0];
@@ -142,6 +143,11 @@ while (@ARGV > 0){
$memd_binary_filename = $ARGV[1];
shift;
}
+ elsif(/^-hdat_binary_filename/i){
+ # This filename is necessary if the file exists, but if its not given, we add blank partition
+ $hdat_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";
@@ -262,7 +268,6 @@ sub processConvergedSections {
$sections{MVPD}{out} = "$scratch_dir/mvpd_fill.bin.ecc";
$sections{DJVPD}{out} = "$scratch_dir/djvpd_fill.bin.ecc";
$sections{ATTR_TMP}{out} = "$scratch_dir/attr_tmp.bin.ecc";
- $sections{ATTR_PERM}{out} = "$scratch_dir/attr_perm.bin.ecc";
$sections{FIRDATA}{out} = "$scratch_dir/firdata.bin.ecc";
$sections{SECBOOT}{out} = "$scratch_dir/secboot.bin.ecc";
$sections{RINGOVD}{out} = "$scratch_dir/ringOvd.bin";
@@ -286,6 +291,17 @@ sub processConvergedSections {
print "WARNING: MEMD partition is not found, including blank binary instead\n";
}
$sections{MEMD}{out} = "$scratch_dir/memd_extra_data.bin.ecc";
+
+ # SMC COPY SAME ideas for hdat
+ if(-e $hdat_binary_filename)
+ {
+ $sections{HDAT}{in} = "$hdat_binary_filename";
+ }
+ else
+ {
+ print "WARNING: HDAT partition is not found, including blank binary instead\n";
+ }
+ $sections{HDAT}{out} = "$scratch_dir/hdat.bin.ecc";
# Build up the system bin files specification
my $system_bin_files;
@@ -473,10 +489,6 @@ else
run_command("dd if=/dev/zero bs=28K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/attr_tmp.bin.ecc --p8");
- # Create blank binary file for ATTR_PERM partition
- run_command("dd if=/dev/zero bs=28K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
- run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/attr_perm.bin.ecc --p8");
-
# Create blank binary file for FIRDATA partition
run_command("dd if=/dev/zero bs=8K count=1 | tr \"\\000\" \"\\377\" > $scratch_dir/hostboot.temp.bin");
run_command("ecc --inject $scratch_dir/hostboot.temp.bin --output $scratch_dir/firdata.bin.ecc --p8");
OpenPOWER on IntegriCloud