diff options
author | Prachi Gupta <pragupta@us.ibm.com> | 2015-01-14 19:55:07 -0600 |
---|---|---|
committer | A. Patrick Williams III <iawillia@us.ibm.com> | 2015-02-11 16:15:13 -0600 |
commit | e83759d6aa90999933318155772b50a8af679ec6 (patch) | |
tree | 8597ff0189eb9b6e618b0e34214224125ea17610 /src | |
parent | 52561adeaa1c8d846e363d8386ca99a1ad89196b (diff) | |
download | talos-hostboot-e83759d6aa90999933318155772b50a8af679ec6.tar.gz talos-hostboot-e83759d6aa90999933318155772b50a8af679ec6.zip |
Created 2-sided and golden-side pnor layouts
RTC:120062
Change-Id: I416e6ebc2ef59608bc673a5a497bfce3263b3fc8
Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/15278
Tested-by: Jenkins Server
Reviewed-by: STEPHEN M. CPREK <smcprek@us.ibm.com>
Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
Diffstat (limited to 'src')
-rwxr-xr-x | src/build/buildpnor/buildpnor.pl | 254 | ||||
-rw-r--r-- | src/build/buildpnor/defaultPnorLayout.xml | 69 | ||||
-rw-r--r-- | src/usr/pnor/common/ffs_hb.H | 3 |
3 files changed, 230 insertions, 96 deletions
diff --git a/src/build/buildpnor/buildpnor.pl b/src/build/buildpnor/buildpnor.pl index f6df6c810..aad7c34c4 100755 --- a/src/build/buildpnor/buildpnor.pl +++ b/src/build/buildpnor/buildpnor.pl @@ -61,6 +61,7 @@ my $g_trace = 1; my $programName = File::Basename::basename $0; my %pnorLayout; +my %PhysicalOffsets; my %binFiles; my $pnorLayoutFile; my $pnorBinName = ""; @@ -70,7 +71,6 @@ my $emitTestSections = 0; my $g_fpartCmd = ""; my $g_fcpCmd = ""; my %sidelessSecFilled = (); - my %SideOptions = ( A => "A", B => "B", @@ -132,7 +132,7 @@ if (-e $pnorBinName) } #Load PNOR Layout XML file -my $rc = loadPnorLayout($pnorLayoutFile, \%pnorLayout); +my $rc = loadPnorLayout($pnorLayoutFile, \%pnorLayout, \%PhysicalOffsets); if($rc != 0) { trace(0, "Error detected from call to loadPnorLayout(). Exiting"); @@ -163,8 +163,6 @@ if($rc != 0) } trace(1, "Done checkSpaceConstraints"); -# @TODO RTC: 120062 - Determine which side is Golden, possibly handle a new -# xml tag # Create all Partition Tables at each TOC offset # Each side has 2 TOC's created at different offsets for backup purposes. # Loop all side sections @@ -174,7 +172,6 @@ foreach my $sideId ( keys %{$pnorLayout{metadata}{sides}} ) foreach my $toc ( keys %{$pnorLayout{metadata}{sides}{$sideId}{toc}}) { my $tocOffset = $pnorLayout{metadata}{sides}{$sideId}{toc}{$toc}; - $rc = createPnorPartition($tocVersion, $pnorBinName, \%pnorLayout, $sideId, $tocOffset); if($rc != 0) @@ -182,9 +179,31 @@ foreach my $sideId ( keys %{$pnorLayout{metadata}{sides}} ) trace(0, "Error detected from createPnorPartition() $tocOffset Exiting"); exit 1; } + + #Add the golden side tag to the "part" partition of PNOR` + my $userflags1 = ($pnorLayout{metadata}{sides}{$sideId}{golden} eq "yes") ? + 0x01 : 0x00; + + #add a golden bit to the misc flags in userflag1 + $userflags1 = $userflags1 << 16; + trace(2, "$g_fpartCmd --target $pnorBinName --partition-offset $tocOffset --user 1 --name part --value $userflags1 --force"); + $rc = `$g_fpartCmd --target $pnorBinName --partition-offset $tocOffset --user 1 --name part --value $userflags1 --force`; + if($rc != 0) + { + trace(0, "Call to add golden flag to PART failed. rc=$rc. Aborting!"); + exit; + } } } +#add backup TOC and other side's toc information to each TOC +$rc = addTOCInfo(\%pnorLayout, $pnorBinName); +if($rc) +{ + trace(0, "Error detected from call to addTOCInfo(). Exiting"); + exit 1; +} + # Fill all sides foreach my $sideId ( keys %{$pnorLayout{metadata}{sides}} ) { @@ -208,7 +227,7 @@ exit 0; ################################################################################ sub loadPnorLayout { - my ($i_pnorFile, $i_pnorLayoutRef) = @_; + my ($i_pnorFile, $i_pnorLayoutRef, $i_physicalOffsets) = @_; my $this_func = (caller(0))[3]; unless(-e $i_pnorFile) @@ -221,49 +240,6 @@ sub loadPnorLayout my $xs = new XML::Simple(keyattr=>[], forcearray => 1); my $xml = $xs->XMLin($i_pnorFile); - #Save the meatadata - imageSize, blockSize, etc. - # @TODO RTC:120062 enhance metadata section, fix metadataE1 to match xml - # and change TOC names accordingly - foreach my $metadataEl (@{$xml->{metadata}}) - { - # Get meta data - my $imageSize = $metadataEl->{imageSize}[0]; - my $blockSize = $metadataEl->{blockSize}[0]; - $imageSize = getNumber($imageSize); - $blockSize = getNumber($blockSize); - $$i_pnorLayoutRef{metadata}{imageSize} = $imageSize; - $$i_pnorLayoutRef{metadata}{blockSize} = $blockSize; - - # Get Side A - my $sideATocOffset = $metadataEl->{sideATocOffset}[0]; - my $sideATocBackupOffset = $metadataEl->{sideATocBackupOffset}[0]; - $sideATocOffset = getNumber($sideATocOffset); - $sideATocBackupOffset = getNumber($sideATocBackupOffset); - # @TODO RTC: 120062 change pnorLayoutRef hash to match new xml - $$i_pnorLayoutRef{metadata}{sides}{$SideOptions{A}}{toc}{primary} = $sideATocOffset; - $$i_pnorLayoutRef{metadata}{sides}{$SideOptions{A}}{toc}{backup} = $sideATocBackupOffset; - - # Get side B info (if it exists) - if (exists $metadataEl->{sideBTocOffset}[0]) - { - trace(1, "Adding Side B information ...."); - my $sideBTocOffset = $metadataEl->{sideBTocOffset}[0]; - my $sideBTocBackupOffset = $metadataEl->{sideBTocBackupOffset}[0]; - $sideBTocOffset = getNumber($sideBTocOffset); - $sideBTocBackupOffset = getNumber($sideBTocBackupOffset); - # @TODO RTC: 120062 change pnorLayoutRef hash to match new xml - $$i_pnorLayoutRef{metadata}{sides}{$SideOptions{B}}{toc}{primary} = $sideBTocOffset; - $$i_pnorLayoutRef{metadata}{sides}{$SideOptions{B}}{toc}{backup} = $sideBTocBackupOffset; - - trace(3, "$this_func: metadata: imageSize = $imageSize, blockSize=$blockSize, sideATocOffset=$sideATocOffset, sideATocBackupOffset=$sideATocBackupOffset, sideBTocOffset=$sideBTocOffset, sideBTocBackupOffset=$sideBTocBackupOffset"); - } - else - { - trace(3, "$this_func: metadata: imageSize = $imageSize, blockSize=$blockSize, sideATocOffset=$sideATocOffset, sideATocBackupOffset=$sideATocBackupOffset"); - } - - } - #Iterate over the <section> elements. foreach my $sectionEl (@{$xml->{section}}) { @@ -276,7 +252,6 @@ sub loadPnorLayout my $ecc = (exists $sectionEl->{ecc} ? "yes" : "no"); my $sha512Version = (exists $sectionEl->{sha512Version} ? "yes" : "no"); my $sha512perEC = (exists $sectionEl->{sha512perEC} ? "yes" : "no"); - my $sideless = (exists $sectionEl->{sideless} ? "yes" : "no"); my $preserved = (exists $sectionEl->{preserved} ? "yes" : "no"); my $readOnly = (exists $sectionEl->{readOnly} ? "yes" : "no"); if (($emitTestSections == 0) && ($sectionEl->{testonly}[0] eq "yes")) @@ -297,12 +272,93 @@ sub loadPnorLayout $$i_pnorLayoutRef{sections}{$physicalOffset}{ecc} = $ecc; $$i_pnorLayoutRef{sections}{$physicalOffset}{sha512Version} = $sha512Version; $$i_pnorLayoutRef{sections}{$physicalOffset}{sha512perEC} = $sha512perEC; - $$i_pnorLayoutRef{sections}{$physicalOffset}{sideless} = $sideless; $$i_pnorLayoutRef{sections}{$physicalOffset}{preserved} = $preserved; $$i_pnorLayoutRef{sections}{$physicalOffset}{readOnly} = $readOnly; + #store the physical offsets of each section in a hash, so, it is easy + #to search physicalOffsets based on the name of the section (eyecatch) + if ($side eq "sideless") + { + foreach my $metadata (@{$xml->{metadata}}) + { + foreach my $sides (@{$metadata->{side}}) + { + $$i_physicalOffsets{side}{$sides->{id}[0]}{eyecatch}{$eyeCatch} = $physicalOffset; + } + } + } + else + { + $$i_physicalOffsets{side}{$side}{eyecatch}{$eyeCatch} = $physicalOffset; + } } + # Save the metadata - imageSize, blockSize, toc Information etc. + foreach my $metadataEl (@{$xml->{metadata}}) + { + # Get meta data + my $imageSize = $metadataEl->{imageSize}[0]; + my $blockSize = $metadataEl->{blockSize}[0]; + my $tocSize = $metadataEl->{tocSize}[0]; + my $arrangement = $metadataEl->{arrangement}[0]; + $imageSize = getNumber($imageSize); + $blockSize = getNumber($blockSize); + $tocSize = getNumber($tocSize); + $$i_pnorLayoutRef{metadata}{imageSize} = $imageSize; + $$i_pnorLayoutRef{metadata}{blockSize} = $blockSize; + $$i_pnorLayoutRef{metadata}{tocSize} = $tocSize; + $$i_pnorLayoutRef{metadata}{arrangement} = $arrangement; + + my $numOfSides = scalar (@{$metadataEl->{side}}); + my $sideSize = ($imageSize)/($numOfSides); + + trace(1, " $this_func: metadata: imageSize = $imageSize, blockSize=$blockSize, arrangement = $arrangement, numOfSides: $numOfSides, sideSize: $sideSize, tocSize: $tocSize"); + + #determine the TOC offsets from the arrangement and side Information + #stored in the layout xml + # + #Arrangement A-B-D means that the layout had Primary TOC (A), then backup TOC (B), then Data (pnor section information). + #Similaryly, arrangement A-D-B means that primary toc is followed by the data (section information) and then + #the backup TOC. + if ($arrangement eq "A-B-D") + { + my $count = 0; + foreach my $side (@{$metadataEl->{side}}) + { + my $golden = (exists $side->{golden} ? "yes" : "no"); + my $sideId = $side->{id}[0]; + my $primaryTOC = ($sideSize)*($count); + my $backupTOC = ($primaryTOC)+($tocSize); + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{toc}{primary} = $primaryTOC; + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{toc}{backup} = $backupTOC; + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{golden} = $golden; + + $count = $count + 1; + trace(1, "A-B-D: side:$sideId primaryTOC:$primaryTOC, backupTOC:$backupTOC, golden: $golden"); + } + } + elsif ($arrangement eq "A-D-B") + { + foreach my $side (@{$metadataEl->{side}}) + { + my $golden = (exists $side->{golden} ? "yes" : "no"); + my $sideId = $side->{id}[0]; + my $hbbAddr = $$i_physicalOffsets{side}{$sideId}{eyecatch}{"HBB"}; + my $primaryTOC = align_down($hbbAddr, $sideSize); + my $backupTOC = align_up($hbbAddr, $sideSize) - $tocSize; + + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{toc}{primary} = $primaryTOC; + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{toc}{backup} = $backupTOC; + $$i_pnorLayoutRef{metadata}{sides}{$sideId}{golden} = $golden; + trace(1, "A-D-B: side:$sideId HBB:$hbbAddr, primaryTOC:$primaryTOC, backupTOC:$backupTOC, golden: $golden"); + } + } + else + { + trace(0, "Arrangement:$arrangement is not supported"); + exit(1); + } + } return 0; } @@ -331,7 +387,6 @@ sub createPnorImg $rc = 1; last; } - #f{fs,part} --create tuleta.pnor --partition-offset 0 --size 8MiB --block 4KiB --force trace(2, "$g_fpartCmd --target $i_pnorBinName --partition-offset $i_offset --create --size $imageSize --block $blockSize --force"); $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $i_offset --create --size $imageSize --block $blockSize --force`; @@ -394,7 +449,6 @@ sub addUserData $miscFlags |= 0x40; } - #First User Data Word #[1:chip][1:compressType][2:dataInteg] my $userflags0 = ($chip << 24) @@ -449,7 +503,6 @@ sub createPnorPartition { last; } - #get Block size my $blockSize = $$i_pnorLayoutRef{metadata}{blockSize}; @@ -498,7 +551,7 @@ sub createPnorPartition #Add Partition #f{fs,part} --add --target tuleta.pnor --partition-offset 0 --offset 0x1000 --size 0x280000 --name HBI --flags 0x0 - trace(2, "$g_fpartCmd --target $i_pnorBinName --partition-offset $offset --add --offset $physicalOffset --size $physicalRegionSize --name $eyeCatch --flags 0x0"); + trace(2, "$this_func: $g_fpartCmd --target $i_pnorBinName --partition-offset $offset --add --offset $physicalOffset --size $physicalRegionSize --name $eyeCatch --flags 0x0"); $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $offset --add --offset $physicalOffset --size $physicalRegionSize --name $eyeCatch --flags 0x0`; if($rc) { @@ -535,6 +588,67 @@ sub createPnorPartition } ################################################################################ +# addTOCInfo -- adds BACKUP_PART and OTHER_SIDE information to all the TOCs +################################################################################ +sub addTOCInfo +{ + my ($i_pnorLayout, $i_pnorBinName) = @_; + my $rc = 0; + my $other_idx = 0; + my $sideShift = 0; + my @all_tocs; + foreach my $sideId (keys %{$$i_pnorLayout{metadata}{sides}}) + { + push @all_tocs, $$i_pnorLayout{metadata}{sides}{$sideId}{toc}{primary}; + push @all_tocs, $$i_pnorLayout{metadata}{sides}{$sideId}{toc}{backup}; + } + foreach my $sideId ( keys %{$$i_pnorLayout{metadata}{sides}} ) + { + my $physicalRegionSize = $$i_pnorLayout{metadata}{tocSize}; + my $backup_part = "BACKUP_PART"; + my $other_side = "OTHER_SIDE"; + my $backup_idx = 0; + my $otherSide = getOtherSide($sideId); + my $numOfTOCs = scalar keys %{$$i_pnorLayout{metadata}{sides}{$sideId}{toc}}; + + #Adding an extra entry in the TOC that points to its backup TOC and other side's TOC (if other side exists). + #This is used to search for all the TOCs in PnorRP code. The idea is to create a link between the tocs such that + #if we can find one valid TOC, then we can look at its BACKUP_PART entry or OTHER_SIDE entry in the TOC to + #determine the location of backup TOC.Each TOC has only one BACKUP_PART entry and one OTHER_SIDE entry. + foreach my $toc (keys %{$$i_pnorLayout{metadata}{sides}{$sideId}{toc}}) + { + #adding backup_part + my $toc_offset = $$i_pnorLayout{metadata}{sides}{$sideId}{toc}{$toc}; + my $backup_offset = $all_tocs[(($backup_idx + 1)% $numOfTOCs) + $sideShift ]; + trace(1, "$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --add --offset $backup_offset --size $physicalRegionSize --name $backup_part --flags 0x0"); + $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --add --offset $backup_offset --size $physicalRegionSize --name $backup_part --flags 0x0`; + if($rc) + { + trace(0, "Call to add partition $backup_part failed. rc=$rc. Aborting!"); + exit; + } + + #Don't add OTHER_SIDE section if there is only one side in PNOR + if ((scalar keys % {$$i_pnorLayout{metadata}{sides}}) > 1) + { + #adding other_side + my $otherSide_offset = $all_tocs[(($other_idx + 2)% scalar @all_tocs)]; + trace(1, "$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --add --offset $otherSide_offset --size $physicalRegionSize --name $other_side --flags 0x0"); + $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --add --offset $otherSide_offset --size $physicalRegionSize --name $other_side --flags 0x0`; + if($rc) + { + trace(0, "Call to add partition $other_side failed. rc=$rc. Aborting!"); + exit; + } + } + $backup_idx++; + $other_idx++; + } + $sideShift = $sideShift + $numOfTOCs; + } + return $rc; +} +################################################################################ # robustifyImgs - Perform any ECC or ShawHash manipulations ################################################################################ sub robustifyImgs @@ -549,6 +663,24 @@ sub robustifyImgs } ################################################################################ +# align_down: Align the input to the lower end of the PNOR side +################################################################################ +sub align_down +{ + my ($addr,$n) = @_; + return (($addr) - ($addr)%($n)); +} + +################################################################################ +# align_up: Align the input address to the higher end of the PNOR side +################################################################################ +sub align_up +{ + my ($addr,$n) = @_; + return ((($addr) + ($n-1)) & ~($n-1)); +} + +################################################################################ # findLayoutKeyByEyeCatch - Figure out hash key based on eyeCatcher ################################################################################ sub findLayoutKeyByEyeCatch @@ -696,7 +828,7 @@ sub fillPnorImage last; } } - } + } return $rc; } @@ -792,15 +924,7 @@ sub getSideInfo my $side = ""; my $eyeCatch = $i_sectionHash{$i_key}{eyeCatch}; - - if($i_sectionHash{$i_key}{sideless} eq "yes") - { - return $SideOptions{sideless}; - } - else - { - $side = $i_sectionHash{$i_key}{side}; - } + $side = $i_sectionHash{$i_key}{side}; # Error paths if ($side eq "") diff --git a/src/build/buildpnor/defaultPnorLayout.xml b/src/build/buildpnor/defaultPnorLayout.xml index 249bdb476..897d4db05 100644 --- a/src/build/buildpnor/defaultPnorLayout.xml +++ b/src/build/buildpnor/defaultPnorLayout.xml @@ -25,12 +25,16 @@ <!-- Layout Description <metadata> Element -> Contains high-level information about the PNOR layout. - <imageSize> -> Size of PNOR image in bytes. - <blockSize> -> size of erase blocks in bytes. - <sideATocOffset> -> Location of Side A Partition Table - <sideATocBackupOffset>-> Location of Side A Backup Partition Table - <sideBTocOffset> -> Location of Side B Partition Table - <sideBTocBackupOffset>-> Location of Side B Backup Partition Table + <imageSize> -> Size of PNOR image in bytes. + <blockSize> -> size of erase blocks in bytes. + <tocSize> -> size of each partition table + <side> -> Contains information about the side + <id> -> Id of the side (A or B) + <arrangement> -> Tag that specifies the arrangement of the side + (A-B-D or A-D-B) + A-B-D: Primary TOC (A),Backup TOC (B), and Section Information (Data - D) + A-D-B: Primary TOC (A), Section Information (Data - D), Backup TOC (B) + <golden/> -> Indicates that the side of the PNOR is golden </metadata> <section> Element -> Contains information about a PNOR Partition <description> -> Text description of the partition. @@ -39,11 +43,12 @@ Layout Description <physicalOffset>-> Offset of the Partition in PNOR in bytes. <physicalSize> -> Size of the Partition in bytes. - <side> -> Side the Partition should be associated with. This - determines if the partition should be added to the - partition table at <sideATocOffset> or <sideBTocOffset> - <sideless/> -> Indicates partition will be in both TOCs but only one - copy of the partition should be created + <side> -> Side that this section is associated with. + could be (A, B, or sideless) + A - Section is associated with side A + B - Section is associated with side B + sideless - Indicates partition will be in both TOCs but + only one copy of the partition should be created <testonly/> -> Indicates partition is used for internal testing only. Partition should be skipped in production environments. <ecc/> -> Indicates Partition should be ECC protected @@ -58,16 +63,18 @@ Layout Description <metadata> <imageSize>0x4000000</imageSize> <blockSize>0x1000</blockSize> - <!-- @TODO RTC: 120062 - Enhance meta info --> - <sideATocOffset>0x0</sideATocOffset> - <sideATocBackupOffset>0x8000</sideATocBackupOffset> + <tocSize>0x8000</tocSize> + <arrangement>A-B-D</arrangement> + <side> + <id>B</id> + </side> </metadata> <section> <description>Hostboot Error Logs (144K)</description> <eyeCatch>HBEL</eyeCatch> <physicalOffset>0x10000</physicalOffset> <physicalRegionSize>0x24000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -75,7 +82,7 @@ Layout Description <eyeCatch>GUARD</eyeCatch> <physicalOffset>0x58000</physicalOffset> <physicalRegionSize>0x5000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -83,7 +90,7 @@ Layout Description <eyeCatch>HBD</eyeCatch> <physicalOffset>0x5D000</physicalOffset> <physicalRegionSize>0x120000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -92,7 +99,7 @@ Layout Description <!--NOTE: MUST update standalone.simics if offset changes --> <physicalOffset>0x17D000</physicalOffset> <physicalRegionSize>0x48000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -101,7 +108,7 @@ Layout Description <!--NOTE: MUST update standalone.simics if offset changes --> <physicalOffset>0x1C5000</physicalOffset> <physicalRegionSize>0x90000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -110,7 +117,7 @@ Layout Description <!--NOTE: MUST update standalone.simics if offset changes --> <physicalOffset>0x255000</physicalOffset> <physicalRegionSize>0x48000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -119,7 +126,7 @@ Layout Description <physicalOffset>0x29D000</physicalOffset> <physicalRegionSize>0x5A0000</physicalRegionSize> <sha512Version/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -128,7 +135,7 @@ Layout Description <physicalOffset>0x83D000</physicalOffset> <physicalRegionSize>0x90000</physicalRegionSize> <sha512perEC/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -137,7 +144,7 @@ Layout Description <physicalOffset>0x8CD000</physicalOffset> <physicalRegionSize>0x48000</physicalRegionSize> <sha512perEC/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -146,7 +153,7 @@ Layout Description <physicalOffset>0x915000</physicalOffset> <physicalRegionSize>0x120000</physicalRegionSize> <sha512Version/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -155,7 +162,7 @@ Layout Description <physicalOffset>0xA35000</physicalOffset> <physicalRegionSize>0x240000</physicalRegionSize> <sha512Version/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -163,7 +170,7 @@ Layout Description <eyeCatch>PAYLOAD</eyeCatch> <physicalOffset>0xC75000</physicalOffset> <physicalRegionSize>0x1680000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -172,7 +179,7 @@ Layout Description <physicalOffset>0x3590000</physicalOffset> <physicalRegionSize>0x9000</physicalRegionSize> <testonly/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -180,8 +187,8 @@ Layout Description <eyeCatch>TESTRO</eyeCatch> <physicalOffset>0x3599000</physicalOffset> <physicalRegionSize>0x9000</physicalRegionSize> + <side>sideless</side> <testonly/> - <sideless/> <preserved/> <readOnly/> <ecc/> @@ -189,11 +196,13 @@ Layout Description <section> <description>Hostboot Base (576K)</description> <!--NOTE: MUST update standalone.simics if offset changes --> + <!--NOTE: HBB must be at pnorSize-0x99000 for a new proc + part to be bootable --> <eyeCatch>HBB</eyeCatch> <physicalOffset>0x3F67000</physicalOffset> <physicalRegionSize>0x90000</physicalRegionSize> <sha512Version/> - <sideless/> + <side>sideless</side> <ecc/> </section> <section> @@ -201,7 +210,7 @@ Layout Description <eyeCatch>GLOBAL</eyeCatch> <physicalOffset>0x3FF7000</physicalOffset> <physicalRegionSize>0x9000</physicalRegionSize> - <sideless/> + <side>sideless</side> <ecc/> </section> </pnor> diff --git a/src/usr/pnor/common/ffs_hb.H b/src/usr/pnor/common/ffs_hb.H index c96911b3f..30a6173e4 100644 --- a/src/usr/pnor/common/ffs_hb.H +++ b/src/usr/pnor/common/ffs_hb.H @@ -66,7 +66,8 @@ enum /* Miscellaneous Bits : 1 byte */ FFS_MISC_PRESERVED = 0x80, /**< Preserved across code updates */ FFS_MISC_READ_ONLY = 0x40, /**< Read only section */ - FFS_MISC_UNUSED = 0x1F, /**< Unused MISC Flags */ + FFS_MISC_GOLDEN = 0x01, /**< Golden side of PNOR */ + FFS_MISC_UNUSED = 0x1E, /**< Unused MISC Flags */ }; /** |