diff options
author | Stephen Cprek <smcprek@us.ibm.com> | 2017-09-27 12:06:10 -0500 |
---|---|---|
committer | William G. Hoffa <wghoffa@us.ibm.com> | 2017-11-01 16:17:47 -0400 |
commit | 141c67de2310692873ff1c3f977a1c6e5d4300ca (patch) | |
tree | ab1703cc49e1a12626450f6844f8c763dc153046 /src/build/buildpnor/genPnorImages.pl | |
parent | 6caab6132b05f6f97e8543d50633f1e29b3e4d84 (diff) | |
download | talos-hostboot-141c67de2310692873ff1c3f977a1c6e5d4300ca.tar.gz talos-hostboot-141c67de2310692873ff1c3f977a1c6e5d4300ca.zip |
Add Header to TESTRO PNOR section for testing Secure Lid transfer
Change-Id: I7f7080697f1447e094cb202f9dcd4853538e8d96
RTC: 125304
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/46839
Tested-by: Jenkins Server <pfd-jenkins+hostboot@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>
Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com>
Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com>
Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/build/buildpnor/genPnorImages.pl')
-rwxr-xr-x | src/build/buildpnor/genPnorImages.pl | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/src/build/buildpnor/genPnorImages.pl b/src/build/buildpnor/genPnorImages.pl index 428446a98..614c44334 100755 --- a/src/build/buildpnor/genPnorImages.pl +++ b/src/build/buildpnor/genPnorImages.pl @@ -564,6 +564,7 @@ sub manipulateImages $isNormalSecure ||= ($eyeCatch eq "HCODE"); $isNormalSecure ||= ($eyeCatch eq "WOFDATA"); $isNormalSecure ||= ($eyeCatch eq "IMA_CATALOG"); + $isNormalSecure ||= ($eyeCatch eq "TESTRO"); my $isSpecialSecure = ($eyeCatch eq "HBB"); $isSpecialSecure ||= ($eyeCatch eq "HBD"); @@ -837,25 +838,31 @@ sub manipulateImages # fill the partition. elsif (!-e $bin_file) { - # Test partitions have random data - if ($eyeCatch eq "TEST" || $eyeCatch eq "TESTRO") - { - run_command("dd if=/dev/urandom of=$tempImages{PAD_PHASE} count=1 bs=$size"); - } - elsif ($eyeCatch eq "SBKT" && $secureboot && $keyTransition{enabled}) + + if ($eyeCatch eq "SBKT" && $secureboot && $keyTransition{enabled}) { $callerHwHdrFields{configure} = 1; create_sb_key_transition_container($tempImages{PAD_PHASE}); setCallerHwHdrFields(\%callerHwHdrFields, $tempImages{PAD_PHASE}); } - # Other partitions fill with FF's if no empty bin file provided else { - run_command("dd if=/dev/zero bs=$size count=1 | tr \"\\000\" \"\\377\" > $tempImages{PAD_PHASE}"); + # Test partitions have random data + if ($eyeCatch eq "TEST" || $eyeCatch eq "TESTRO") + { + run_command("dd if=/dev/urandom of=$tempImages{PAD_PHASE} count=1 bs=$size"); + } + # Other partitions fill with FF's if no empty bin file provided + else + { + run_command("dd if=/dev/zero bs=$size count=1 | tr \"\\000\" \"\\377\" > $tempImages{PAD_PHASE}"); + } # Add secure container header - if( ($sectionHash{$layoutKey}{sha512Version} eq "yes") - && ($eyeCatch ne "SBKT")) + # Force TESTRO section to have a header + if( ($eyeCatch eq "TESTRO") || + (($sectionHash{$layoutKey}{sha512Version} eq "yes") + && ($eyeCatch ne "SBKT"))) { # Remove PAGE_SIZE bytes from generated dummy content of # file to make room for the secure header |