summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/include/usr/secureboot/containerheader.H2
-rw-r--r--src/usr/secureboot/base/makefile1
-rw-r--r--src/usr/secureboot/common/common.mk1
-rw-r--r--src/usr/secureboot/common/containerheader.C (renamed from src/usr/secureboot/base/containerheader.C)8
4 files changed, 10 insertions, 2 deletions
diff --git a/src/include/usr/secureboot/containerheader.H b/src/include/usr/secureboot/containerheader.H
index 528fef9d5..5a554f0fc 100644
--- a/src/include/usr/secureboot/containerheader.H
+++ b/src/include/usr/secureboot/containerheader.H
@@ -195,7 +195,9 @@ class ContainerHeader
* and then take sha512 hash.
* Also sets iv_hwKeyHash private member
*/
+#ifndef __HOSTBOOT_RUNTIME
void genHwKeyHash();
+#endif
/**
* @brief Weak check to determine if secureboot header looks right.
diff --git a/src/usr/secureboot/base/makefile b/src/usr/secureboot/base/makefile
index 58d79be86..e898204e9 100644
--- a/src/usr/secureboot/base/makefile
+++ b/src/usr/secureboot/base/makefile
@@ -34,7 +34,6 @@ OBJS += securerommgr.o
OBJS += rom_entry.o
OBJS += trustedboot_base.o
OBJS += $(if $(CONFIG_TPMDD),trustedbootMsg.o,)
-OBJS += containerheader.o
OBJS += ${SECUREBOOT_COMMON_OBJS}
OBJS += targutilbase.o
diff --git a/src/usr/secureboot/common/common.mk b/src/usr/secureboot/common/common.mk
index 8e2b4f8d4..06f7a0bae 100644
--- a/src/usr/secureboot/common/common.mk
+++ b/src/usr/secureboot/common/common.mk
@@ -25,4 +25,5 @@
SECUREBOOT_COMMON_OBJS += securetrace.o
SECUREBOOT_COMMON_OBJS += errlud_secure.o
+SECUREBOOT_COMMON_OBJS += containerheader.o
diff --git a/src/usr/secureboot/base/containerheader.C b/src/usr/secureboot/common/containerheader.C
index e01ab381f..3671b75c7 100644
--- a/src/usr/secureboot/base/containerheader.C
+++ b/src/usr/secureboot/common/containerheader.C
@@ -1,7 +1,7 @@
/* IBM_PROLOG_BEGIN_TAG */
/* This is an automatically generated prolog. */
/* */
-/* $Source: src/usr/secureboot/base/containerheader.C $ */
+/* $Source: src/usr/secureboot/common/containerheader.C $ */
/* */
/* OpenPOWER HostBoot Project */
/* */
@@ -80,8 +80,10 @@ void ContainerHeader::parse_header(const void* i_header)
// Parse hw and sw flags
parseFlags();
+#ifndef __HOSTBOOT_RUNTIME
// Generate hw hash key
genHwKeyHash();
+#endif
// After parsing check if header is valid, do some quick bound checks
validate();
@@ -239,11 +241,15 @@ void ContainerHeader::parseFlags()
& KEY_TRANSITION_FLAG);
}
+#ifndef __HOSTBOOT_RUNTIME
void ContainerHeader::genHwKeyHash()
{
+
// Generate and store hw hash key
SECUREBOOT::hashBlob(&iv_headerInfo.hw_hdr.hw_pkey_a,
totalHwKeysSize, iv_hwKeyHash);
+
}
+#endif
}; //end of SECUREBOOT namespace
OpenPOWER on IntegriCloud