diff options
author | Eddie James | 2023-10-24 10:43:51 -0500 |
---|---|---|
committer | Ilias Apalodimas | 2023-10-27 13:17:21 +0300 |
commit | 5999ea20fa42e78f872720ec3d0ee1d8df1a1f40 (patch) | |
tree | 463ea5ceebc52e22ed663e47314fa0123d984e8a /arch/sandbox/dts | |
parent | dec166d6b2c28d971394ebe1bc0ac70b88b575c0 (diff) |
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/sandbox/dts')
-rw-r--r-- | arch/sandbox/dts/sandbox.dtsi | 13 | ||||
-rw-r--r-- | arch/sandbox/dts/test.dts | 13 |
2 files changed, 26 insertions, 0 deletions
diff --git a/arch/sandbox/dts/sandbox.dtsi b/arch/sandbox/dts/sandbox.dtsi index ff7e5584c55..241f397ba6e 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 9a863ea732f..bb2ddd9bf29 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 { |