diff options
author | Corey Swenson <cswenson@us.ibm.com> | 2018-09-16 11:00:15 -0500 |
---|---|---|
committer | Daniel M. Crowell <dcrowell@us.ibm.com> | 2018-09-19 10:56:41 -0500 |
commit | f27124c1e25b0111c4fce04099db7ea2a1a4e70f (patch) | |
tree | 4ca7a57a77008c3ec6ebd1a55ed8792298906ce0 /src/usr/targeting/common/xmltohb/xmltohb.pl | |
parent | 11cc78395582d24d6f19d389841a5fa224ec1d93 (diff) | |
download | talos-hostboot-f27124c1e25b0111c4fce04099db7ea2a1a4e70f.tar.gz talos-hostboot-f27124c1e25b0111c4fce04099db7ea2a1a4e70f.zip |
Add part number and serial number to error log hw callout data
The attribute code is generated in errludattribute.C.
It is currently if-def'd out for size reasons, so
I pulled the PN/SN code from there and added it directly
to the xmltohb.pl script.
Change-Id: Idfe50b25c77147ea5e098f6c2c31b99832e264ed
CQ:SW444319
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/66197
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>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Matt Derksen <mderkse1@us.ibm.com>
Reviewed-by: Christian R. Geddes <crgeddes@us.ibm.com>
Reviewed-by: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/targeting/common/xmltohb/xmltohb.pl')
-rwxr-xr-x | src/usr/targeting/common/xmltohb/xmltohb.pl | 28 |
1 files changed, 26 insertions, 2 deletions
diff --git a/src/usr/targeting/common/xmltohb/xmltohb.pl b/src/usr/targeting/common/xmltohb/xmltohb.pl index b5d1438ec..d05aa803e 100755 --- a/src/usr/targeting/common/xmltohb/xmltohb.pl +++ b/src/usr/targeting/common/xmltohb/xmltohb.pl @@ -2717,9 +2717,31 @@ sub writeAttrErrlCFile { print $outFile " char *tmpBuffer = NULL;\n"; print $outFile " uint32_t attrSize = 0;\n"; print $outFile "\n"; - print $outFile "#if 0 //\@fixme-RTC:152874\n"; print $outFile " switch (i_attr) {\n"; + print $outFile " case (ATTR_SERIAL_NUMBER): { //simpleType:uint, :int...\n"; + print $outFile " //TRACDCOMP( g_trac_errl, \"ErrlUserDetailsAttribute: SERIAL_NUMBER entry\");\n"; + print $outFile " AttributeTraits<ATTR_SERIAL_NUMBER>::Type tmp;\n"; + print $outFile " if( iv_pTarget->tryGetAttr<ATTR_SERIAL_NUMBER>(tmp) ) {\n"; + print $outFile " tmpBuffer = new char[sizeof(tmp)];\n"; + print $outFile " memcpy(tmpBuffer, &tmp, sizeof(tmp));\n"; + print $outFile " attrSize = sizeof(tmp);\n"; + print $outFile " }\n"; + print $outFile " break;\n"; + print $outFile " }\n"; + print $outFile " case (ATTR_PART_NUMBER): { //simpleType:uint, :int...\n"; + print $outFile " //TRACDCOMP( g_trac_errl, \"ErrlUserDetailsAttribute: PART_NUMBER entry\");\n"; + print $outFile " AttributeTraits<ATTR_PART_NUMBER>::Type tmp;\n"; + print $outFile " if( iv_pTarget->tryGetAttr<ATTR_PART_NUMBER>(tmp) ) {\n"; + print $outFile " tmpBuffer = new char[sizeof(tmp)];\n"; + print $outFile " memcpy(tmpBuffer, &tmp, sizeof(tmp));\n"; + print $outFile " attrSize = sizeof(tmp);\n"; + print $outFile " }\n"; + print $outFile " break;\n"; + print $outFile " }\n"; + + print $outFile "#if 0 //\@fixme-RTC:152874\n"; + # loop through every attribute to make the swith/case foreach my $attribute (@{$attributes->{attribute}}) { @@ -2822,9 +2844,11 @@ sub writeAttrErrlCFile { print $outFile " TRACDCOMP( g_trac_errl, \"ErrlUserDetailsAttribute: UNKNOWN i_attr %x\", i_attr);\n"; print $outFile " break;\n"; print $outFile " }\n"; + + print $outFile "#endif //\@fixme-RTC:152874\n"; + print $outFile " } //switch\n"; print $outFile "\n"; - print $outFile "#endif //\@fixme-RTC:152874\n"; print $outFile " // if we generated one, copy the string into the buffer\n"; print $outFile " if (attrSize) { // we have something to output\n"; |