summaryrefslogtreecommitdiffstats
path: root/src/import/tools
diff options
context:
space:
mode:
authorMatt Derksen <mderkse1@us.ibm.com>2017-07-11 13:28:06 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2019-07-03 08:35:44 -0500
commit52e9d9eb5546bc83867ec35b179f2145ffbabe12 (patch)
tree83f4a90d657258179b30f0664eaad0ee07ea9c88 /src/import/tools
parentb5499344e2e1b2eb5bb5414cb2622edef0cca685 (diff)
downloadtalos-hostboot-52e9d9eb5546bc83867ec35b179f2145ffbabe12.tar.gz
talos-hostboot-52e9d9eb5546bc83867ec35b179f2145ffbabe12.zip
Add a version nibble to the end of VM VPD
Change-Id: I968f6bfb57c71218e7a8984111050fa70b51f4f4 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/42996 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: FEIHONG YAN <fyan@us.ibm.com> Reviewed-by: ANUWAT SAETOW <asaetow@us.ibm.com> Reviewed-by: Martin Gloff <mgloff@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79904 Tested-by: FSP CI Jenkins <fsp-CI-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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/import/tools')
-rwxr-xr-xsrc/import/tools/genMemVpd.pl21
1 files changed, 19 insertions, 2 deletions
diff --git a/src/import/tools/genMemVpd.pl b/src/import/tools/genMemVpd.pl
index 4be4f278a..3fd49ba35 100755
--- a/src/import/tools/genMemVpd.pl
+++ b/src/import/tools/genMemVpd.pl
@@ -272,11 +272,13 @@ my $cfgInputVpdTextDir = ".";
my $cfgOutputVpdBinDir = ".";
my $cfgHelp = 0;
my $cfgVerbose = 0;
+my $cfgVersion = undef;
my %ckeKeywordData; # CKE hash table (mcsMask -> hash ref with blob data for those masked mcs's)
# Process command line parameters, issue help text if needed
GetOptions(
- "prefix:s" => \$cfgPrefix,
+ "prefix=s" => \$cfgPrefix,
+ "version:s" => \$cfgVersion,
"input-vpd-text-dir:s" => \$cfgInputVpdTextDir,
"output-vpd-bin-dir:s" => \$cfgOutputVpdBinDir,
"help" => \$cfgHelp,
@@ -381,6 +383,15 @@ elsif ( "CKE_MAP" eq $g_tarType )
}
elsif ( "VM" eq $g_tarType )
{
+ unless (defined ($cfgVersion))
+ {
+ fatal( "Need to supply a version (0-F) for VM keyword" );
+ }
+ unless ($cfgVersion =~ m/^(0x)?[[:xdigit:]]$/)
+ {
+ fatal( "Invalid VM version ($cfgVersion), must be a single character (0-F)" );
+ }
+
createVMFile();
# createVMFile already reported created file
verbose("Support file created:");
@@ -1348,10 +1359,13 @@ sub createVMFile
trace( "Create output binary file: " . $fileInfo{FILE_NAME} );
my $time = time;
+ $time = $time & 0xfffffff0;
+ $time = $time | hex($cfgVersion);
my %num = newNum( $time, "u32" );
filePushNum( \%fileInfo, \%num );
fileWrite( \%fileInfo );
- verbose( "\nTranslated VM timestamp in file: ". scalar localtime($num{NUM_VALUE}) );
+ verbose( "\nTranslated VM timestamp in file: ".
+ scalar localtime($num{NUM_VALUE}) );
verbose( "Created " . $cfgOutputVpdBinDir . $fileInfo{FILE_NAME} );
}
@@ -1602,11 +1616,14 @@ sub display_help
usage:
$scriptname --help
$scriptname --prefix <system_kw>
+ [--version <single hex character>]
[--input-vpd-text-dir=./] [--output-vpd-bin-dir=./]
[--verbose]
--prefix
Prefix of vpd input files to process (template_MR or template_MT)
Available kw = MR, MT, CKE_MAP, DQ_MAP and VM
+ --version
+ Hex character used in the last nibble of the VM keyword
--input-vpd-text-dir
Optional path to directory with input vpd files.
Defaults to current directory (./)
OpenPOWER on IntegriCloud