summaryrefslogtreecommitdiffstats
path: root/src/usr/secureboot/common/plugins
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-06-14 09:52:01 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2017-07-10 15:56:19 -0400
commit775aa58f353212903f5f479deaf0cc3c6485d1ea (patch)
tree72ceaf78d7f3b6889a931f1d3c13d1c934bb34fe /src/usr/secureboot/common/plugins
parentbd0a3c712cb0b2caeb728e2979a4d5e4af928e59 (diff)
downloadtalos-hostboot-775aa58f353212903f5f479deaf0cc3c6485d1ea.tar.gz
talos-hostboot-775aa58f353212903f5f479deaf0cc3c6485d1ea.zip
Add Security Settings User Details to Error Logs
Change-Id: Ife4a19ea7f94670143b701f740c80f991f924601 RTC:165693 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41904 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-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/usr/secureboot/common/plugins')
-rw-r--r--src/usr/secureboot/common/plugins/errludP_secure.H64
-rw-r--r--src/usr/secureboot/common/plugins/secureUdParserFactory.H3
2 files changed, 67 insertions, 0 deletions
diff --git a/src/usr/secureboot/common/plugins/errludP_secure.H b/src/usr/secureboot/common/plugins/errludP_secure.H
index 02305a4c1..39a8126d6 100644
--- a/src/usr/secureboot/common/plugins/errludP_secure.H
+++ b/src/usr/secureboot/common/plugins/errludP_secure.H
@@ -165,6 +165,70 @@ private:
UdParserTargetHwKeyHash & operator=(const UdParserTargetHwKeyHash&);
};
+/**
+ * @class UdParserSecuritySettings
+ *
+ * Parses UdSecuritySettings
+ */
+class UdParserSecuritySettings : public ERRORLOG::ErrlUserDetailsParser
+{
+ public:
+ /**
+ * @brief Constructor
+ */
+ UdParserSecuritySettings() {}
+
+ /**
+ * @brief Destructor
+ */
+ virtual ~UdParserSecuritySettings() {}
+
+ /**
+ * @brief Parses string user detail data from an error log
+ *
+ * @param i_version Version of the data
+ * @param i_parse ErrlUsrParser object for outputting information
+ * @param i_pBuffer Pointer to buffer containing detail data
+ * @param i_buflen Length of the buffer
+ */
+ virtual void parse(errlver_t i_version,
+ ErrlUsrParser & i_parser,
+ void * i_pBuffer,
+ const uint32_t i_buflen) const
+ {
+ //***** Version 1 Memory Layout *****
+ // 1 byte : Secure Access Bit
+ // 1 byte : Security Override
+ // 1 byte : Allow Attribute Overrides
+
+ detailsLayout* l_databuf = static_cast<detailsLayout*>(i_pBuffer);
+
+ i_parser.PrintHeading("Security Settings");
+ if (i_version >= 1)
+ {
+ i_parser.PrintNumber("Secure Access Bit","0x%.2X",
+ l_databuf->secAccessBit);
+ i_parser.PrintNumber("Security Override","0x%.2X",
+ l_databuf->secOverride);
+ i_parser.PrintNumber("Allow Attribute Overrides","0x%.2X",
+ l_databuf->allowAttrOverride);
+ }
+ }
+
+ private:
+ // Disabled
+ UdParserSecuritySettings(const UdParserSecuritySettings&);
+ UdParserSecuritySettings & operator=(const UdParserSecuritySettings&);
+
+ // Errl User Details layout
+ struct detailsLayout
+ {
+ uint8_t secAccessBit;
+ uint8_t secOverride;
+ uint8_t allowAttrOverride;
+ };
+};
+
} // end SECUREBOOT namespace
diff --git a/src/usr/secureboot/common/plugins/secureUdParserFactory.H b/src/usr/secureboot/common/plugins/secureUdParserFactory.H
index e3ab91d48..5b6d540fa 100644
--- a/src/usr/secureboot/common/plugins/secureUdParserFactory.H
+++ b/src/usr/secureboot/common/plugins/secureUdParserFactory.H
@@ -41,6 +41,9 @@ namespace SECUREBOOT
registerParser<SECUREBOOT::UdParserTargetHwKeyHash>
(SECURE_UDT_TARGET_HW_KEY_HASH);
+
+ registerParser<SECUREBOOT::UdParserSecuritySettings>
+ (SECURE_UDT_SECURITY_SETTINGS);
}
private:
OpenPOWER on IntegriCloud