@@ -13,6 +13,17 @@
reg = <0x80000000 0x40000000>;
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ event_log: tcg_event_log@b3d00000 {
+ no-map;
+ reg = <0xb3d00000 0x100000>;
+ };
+ };
+
chosen {
stdout-path = &uart5;
};
@@ -107,12 +118,23 @@
u-boot,dm-pre-reloc;
};
+&i2c {
+ u-boot,dm-pre-reloc;
+};
+
+&i2cglobal {
+ u-boot,dm-pre-reloc;
+};
+
&i2c12 {
+ u-boot,dm-pre-reloc;
status = "okay";
tpm@2e {
+ u-boot,dm-pre-reloc;
compatible = "nuvoton,npct75x";
reg = <0x2e>;
+ memory-region = <&event_log>;
};
};
@@ -3,41 +3,7 @@
* Copyright 2022 IBM Corp.
*/
-#include <common.h>
-#include <dm/uclass.h>
-#include <tpm-common.h>
-#include <tpm-v2.h>
-
int board_late_init(void)
{
- int rc;
- struct udevice *dev;
- /*
- * The digest is just an arbitrary sequence for now to ensure that the
- * TPM gets "poisoned."
- */
- const unsigned char digest[32] = {
- 0x6e, 0x65, 0x76, 0x65, 0x72, 0x67, 0x6f, 0x6e,
- 0x6e, 0x61, 0x67, 0x69, 0x76, 0x65, 0x79, 0x6f,
- 0x75, 0x75, 0x70, 0x6e, 0x65, 0x76, 0x65, 0x72,
- 0x67, 0x6f, 0x6e, 0x6e, 0x61, 0x6c, 0x65, 0x74
- };
-
- rc = uclass_first_device_err(UCLASS_TPM, &dev);
- if (rc)
- return 0;
-
- rc = tpm_init(dev);
- if (rc)
- return 0;
-
- rc = tpm2_startup(dev, TPM2_SU_CLEAR);
- if (rc)
- return 0;
-
- rc = tpm2_pcr_extend(dev, 0, digest);
- if (!rc)
- printf("TPM: PCR0 extended.\n");
-
return 0;
}
@@ -136,4 +136,5 @@ CONFIG_USE_TINY_PRINTF=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_TPM=y
CONFIG_SPL_TPM=y
+CONFIG_MEASURED_BOOT=y
# CONFIG_EFI_LOADER is not set
Add the configuration option for measured boot and add the event log reserved memory to the device tree. Signed-off-by: Eddie James <eajames@linux.ibm.com> --- arch/arm/dts/ast2600-p10bmc.dts | 22 ++++++++++++++ board/aspeed/ast2600_ibm/ibm.c | 34 ---------------------- configs/ast2600_openbmc_spl_emmc_defconfig | 1 + 3 files changed, 23 insertions(+), 34 deletions(-)