summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/efi_selftest/efi_selftest_fdt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/lib/efi_selftest/efi_selftest_fdt.c b/lib/efi_selftest/efi_selftest_fdt.c
index 52a963084e..eae98208f6 100644
--- a/lib/efi_selftest/efi_selftest_fdt.c
+++ b/lib/efi_selftest/efi_selftest_fdt.c
@@ -219,6 +219,21 @@ static int execute(void)
return EFI_ST_FAILURE;
}
}
+ str = get_property(L"boot-hartid", L"chosen");
+ if (IS_ENABLED(CONFIG_RISCV)) {
+ if (str) {
+ efi_st_printf("boot-hartid: %u\n",
+ f2h(*(fdt32_t *)str));
+ ret = boottime->free_pool(str);
+ if (ret != EFI_SUCCESS) {
+ efi_st_error("FreePool failed\n");
+ return EFI_ST_FAILURE;
+ }
+ } else {
+ efi_st_error("boot-hartid not found\n");
+ return EFI_ST_FAILURE;
+ }
+ }
return EFI_ST_SUCCESS;
}