aboutsummaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorEddie James <eajames@linux.ibm.com>2023-10-24 10:43:51 -0500
committerIlias Apalodimas <ilias.apalodimas@linaro.org>2023-10-27 13:17:21 +0300
commit5999ea20fa42e78f872720ec3d0ee1d8df1a1f40 (patch)
tree463ea5ceebc52e22ed663e47314fa0123d984e8a /arch
parentdec166d6b2c28d971394ebe1bc0ac70b88b575c0 (diff)
downloadu-boot-5999ea20fa42e78f872720ec3d0ee1d8df1a1f40.zip
u-boot-5999ea20fa42e78f872720ec3d0ee1d8df1a1f40.tar.gz
u-boot-5999ea20fa42e78f872720ec3d0ee1d8df1a1f40.tar.bz2
test: Add sandbox TPM boot measurement
Use the sandbox TPM driver to measure some boot images in a unit test case. Signed-off-by: Eddie James <eajames@linux.ibm.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org> Signed-off-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/sandbox/dts/sandbox.dtsi13
-rw-r--r--arch/sandbox/dts/test.dts13
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi
index ff7e558..241f397 100644
--- a/arch/sandbox/dts/sandbox.dtsi
+++ b/arch/sandbox/dts/sandbox.dtsi
@@ -4,11 +4,23 @@
* and sandbox64 builds.
*/
+#include <config.h>
#include <dt-bindings/input/input.h>
#define USB_CLASS_HUB 9
/ {
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ event_log: tcg_event_log {
+ no-map;
+ reg = <(CFG_SYS_SDRAM_SIZE - 0x2000) 0x2000>;
+ };
+ };
+
binman {
};
@@ -342,6 +354,7 @@
tpm2 {
compatible = "sandbox,tpm2";
+ memory-region = <&event_log>;
};
triangle {
diff --git a/arch/sandbox/dts/test.dts b/arch/sandbox/dts/test.dts
index 9a863ea..bb2ddd9 100644
--- a/arch/sandbox/dts/test.dts
+++ b/arch/sandbox/dts/test.dts
@@ -9,6 +9,7 @@
/dts-v1/;
+#include <config.h>
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/gpio/sandbox-gpio.h>
#include <dt-bindings/input/input.h>
@@ -68,6 +69,17 @@
osd0 = "/osd";
};
+ reserved-memory {
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ event_log: tcg_event_log {
+ no-map;
+ reg = <(CFG_SYS_SDRAM_SIZE - 0x2000) 0x2000>;
+ };
+ };
+
binman: binman {
};
@@ -1422,6 +1434,7 @@
tpm2 {
compatible = "sandbox,tpm2";
+ memory-region = <&event_log>;
};
tpm {