summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Schwartz <whs@us.ibm.com>2015-07-07 09:53:18 -0500
committerA. Patrick Williams III <iawillia@us.ibm.com>2015-07-17 09:19:12 -0500
commit70bff178a4453a2bffdd981e121c7a515520da47 (patch)
tree9ecf7de189118dd1cb1214532c14ca31ab4a0673
parent7cda758571fa196287da52a7313dbebc362dc547 (diff)
downloadtalos-hostboot-70bff178a4453a2bffdd981e121c7a515520da47.tar.gz
talos-hostboot-70bff178a4453a2bffdd981e121c7a515520da47.zip
Set flag for pseudo-partition as indicator to BMC code update
Set flag in the FFS to indicate that OTHER_SIDE and BACKUP_PART are not real partitions and should be ignored when doing section-based pnor updates. Change-Id: Id193ad88e1ebe5d62fef2cf793811f599ba2162d RTC: 129057 Reviewed-on: http://gfw160.aus.stglabs.ibm.com:8080/gerrit/18990 Tested-by: Jenkins Server Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Reviewed-by: Brian H. Horton <brianh@linux.ibm.com> Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com> Reviewed-by: A. Patrick Williams III <iawillia@us.ibm.com>
-rwxr-xr-xsrc/build/buildpnor/buildpnor.pl18
-rw-r--r--src/usr/pnor/common/ffs_hb.H1
2 files changed, 19 insertions, 0 deletions
diff --git a/src/build/buildpnor/buildpnor.pl b/src/build/buildpnor/buildpnor.pl
index aad7c34c4..1a18f2dfd 100755
--- a/src/build/buildpnor/buildpnor.pl
+++ b/src/build/buildpnor/buildpnor.pl
@@ -627,6 +627,16 @@ sub addTOCInfo
trace(0, "Call to add partition $backup_part failed. rc=$rc. Aborting!");
exit;
}
+ #indicate that this is a puesdo-partition and should be skipped on code update
+ my $userflags1 = 0x20;
+ $userflags1 = $userflags1 << 16;
+ trace(1, "$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --user 1 --name $backup_part --value $userflags1 --force");
+ $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --user 1 --name $backup_part --value $userflags1 --force`;
+ if($rc != 0)
+ {
+ trace(0, "Call to set BACKUP_PART as pseudo 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)
@@ -640,6 +650,14 @@ sub addTOCInfo
trace(0, "Call to add partition $other_side failed. rc=$rc. Aborting!");
exit;
}
+ #indicate that this is a puesdo-partition and should be skipped on code update
+ trace(1, "$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --user 1 --name $other_side --value $userflags1 --force");
+ $rc = `$g_fpartCmd --target $i_pnorBinName --partition-offset $toc_offset --user 1 --name $other_side --value $userflags1 --force`;
+ if($rc != 0)
+ {
+ trace(0, "Call to set OTHER_SIDE as pseudo failed. rc=$rc. Aborting!");
+ exit;
+ }
}
$backup_idx++;
$other_idx++;
diff --git a/src/usr/pnor/common/ffs_hb.H b/src/usr/pnor/common/ffs_hb.H
index 30a6173e4..23070a2e3 100644
--- a/src/usr/pnor/common/ffs_hb.H
+++ b/src/usr/pnor/common/ffs_hb.H
@@ -66,6 +66,7 @@ enum
/* Miscellaneous Bits : 1 byte */
FFS_MISC_PRESERVED = 0x80, /**< Preserved across code updates */
FFS_MISC_READ_ONLY = 0x40, /**< Read only section */
+ FFS_MISC_PSEUDO = 0x20, /**< Pseudo partition */
FFS_MISC_GOLDEN = 0x01, /**< Golden side of PNOR */
FFS_MISC_UNUSED = 0x1E, /**< Unused MISC Flags */
};
OpenPOWER on IntegriCloud