]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
efi_selftest: can't have measured device-tree with kaslr-seed
authorHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Tue, 18 Jun 2024 12:23:48 +0000 (14:23 +0200)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sun, 30 Jun 2024 11:58:31 +0000 (13:58 +0200)
Test that we don't have a /chosen/kaslr-seed property if we measure the
device-tree.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
lib/efi_selftest/efi_selftest_fdt.c

index aa3b13ae3ab00d210abdccd55f86a22c8a09ad60..a4b0cef20e4bf09234e34bc9d008ce7fff7c20fe 100644 (file)
@@ -227,6 +227,13 @@ static int execute(void)
                        return EFI_ST_FAILURE;
                }
        }
+       if (IS_ENABLED(CONFIG_EFI_TCG2_PROTOCOL_MEASURE_DTB)) {
+               str = get_property(u"kaslr-seed", u"chosen");
+               if (str) {
+                       efi_st_error("kaslr-seed with measured fdt\n");
+                       return EFI_ST_FAILURE;
+               }
+       }
        if (IS_ENABLED(CONFIG_RISCV)) {
                u32 fdt_hartid;