summaryrefslogtreecommitdiffstats
path: root/src/usr/hdat
diff options
context:
space:
mode:
authorStephen Cprek <smcprek@us.ibm.com>2017-05-11 15:15:52 -0500
committerWilliam G. Hoffa <wghoffa@us.ibm.com>2017-06-06 00:47:30 -0400
commit728c7744334fe34ecd7c4a8c51835527aa032ec5 (patch)
treebe029afa12d6c823bdfe05423b2471922a86cfb7 /src/usr/hdat
parentd6edfb5f14ce156929ead04874972c5e40f5f19b (diff)
downloadtalos-hostboot-728c7744334fe34ecd7c4a8c51835527aa032ec5.tar.gz
talos-hostboot-728c7744334fe34ecd7c4a8c51835527aa032ec5.zip
Populate HDAT sections with Secureboot Hash and Verify Function info
HB Resv Mem - Add Secureboot Cryptographic Algorithm info - Relocate SecureROM code Secure and Trusted boot data - Fill in new section for Hash and Verification offsets Change-Id: Ibfd60cc4d0d738fb209357332932af7aca9c61b8 RTC: 156485 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/40445 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Nicholas E. Bofferding <bofferdn@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Michael Baiocchi <mbaiocch@us.ibm.com> Reviewed-by: Marshall J. Wilks <mjwilks@us.ibm.com> Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/hdat')
-rw-r--r--src/usr/hdat/hdatcommonutil.C7
-rw-r--r--src/usr/hdat/hdattpmdata.H17
2 files changed, 22 insertions, 2 deletions
diff --git a/src/usr/hdat/hdatcommonutil.C b/src/usr/hdat/hdatcommonutil.C
index 4e40119dd..1bb9d43ac 100644
--- a/src/usr/hdat/hdatcommonutil.C
+++ b/src/usr/hdat/hdatcommonutil.C
@@ -30,6 +30,7 @@
#include <targeting/common/util.H>
#include <targeting/common/target.H>
#include <targeting/common/targetservice.H>
+#include <securerom/ROM.H>
namespace HDAT
{
@@ -98,6 +99,12 @@ uint32_t hdatTpmDataCalcMaxSize()
// and Host I2C device information pointers
l_size += sizeof(hdatPhysInterMechInfo_t);
+ // account for the size of the Hash and Verfication Function array header
+ l_size += sizeof(hdatHDIFDataArray_t);
+
+ // account for each element of the Hash and Verfication Function array
+ l_size += sizeof(hdatHashVerifyFunc_t) * SecRomFuncTypes.size();
+
// Align size value to match actual allocated size, because we also want to
// zero the padded part, and thus simplify multinode support going forward.
l_size = ALIGN_X(l_size, HDAT_HDIF_ALIGN);
diff --git a/src/usr/hdat/hdattpmdata.H b/src/usr/hdat/hdattpmdata.H
index b9ee44552..5c8b54f88 100644
--- a/src/usr/hdat/hdattpmdata.H
+++ b/src/usr/hdat/hdattpmdata.H
@@ -39,6 +39,7 @@
#include "hdatutil.H"
#include <hdat/hdat.H>
#include <sys/misc.h>
+#include <securerom/ROM.H>
#define TPM_SRTM_EVENT_LOG_MAX (64 * KILOBYTE)
@@ -54,7 +55,7 @@ namespace HDAT
*/
enum {
TpmDataInstance = 0,
- TpmDataVersion = 0x10,
+ TpmDataVersion = 0x11,
TpmDataHdrSize = 0x20,
TpmDataPtrOffset = 0x20,
TpmDataPtrCnt = 1,
@@ -80,7 +81,8 @@ struct hdatTpmData_t
hdatHDIF_t hdatHdr;
hdatHDIFDataHdr_t hdatSbTpmInfo; // Pointer pair to secure boot TPM info
hdatHDIFDataHdr_t hdatPhysInter; // Physical interaction mechanism details
- uint8_t hdatReserved1[16]; // Padding for alignment and growth/compatibility
+ hdatHDIFDataHdr_t hdatHashVerifyFunc; // Hash and Verification functions
+ uint8_t hdatReserved1[8]; // Padding for alignment and growth/compatibility
} __attribute__ ((packed));
/**
@@ -130,6 +132,17 @@ struct hdatPhysInterMechInfo_t
} __attribute__ ((packed));
+/**
+ * @brief Structure definition for HDAT Hash and Verification Function instances
+ */
+struct hdatHashVerifyFunc_t
+{
+ sbFuncType_t sbFuncType; // Type of secureboot function
+ sbFuncVer_t sbFuncVer; // Version of verify function
+ uint32_t dbobId; // Drawer/Book/Octant/Blade ID
+ uint32_t sbFuncOffset; // Offset of function within SecureROM
+};
+
extern const char g_hdatTpmDataEyeCatch[];
/** Begin Class Description
OpenPOWER on IntegriCloud