aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHeinrich Schuchardt <xypron.glpk@gmx.de>2021-03-24 17:48:01 +0100
committerHeinrich Schuchardt <xypron.glpk@gmx.de>2021-03-25 20:54:12 +0100
commit5e21958c02e20bbba444c8061f8b87405093a9b5 (patch)
treed1df1b88e0abd7de574b8c6e014b4e0432572f31
parentf69a2016b6330b70915c371491af33f5fd58c849 (diff)
downloadu-boot-5e21958c02e20bbba444c8061f8b87405093a9b5.zip
u-boot-5e21958c02e20bbba444c8061f8b87405093a9b5.tar.gz
u-boot-5e21958c02e20bbba444c8061f8b87405093a9b5.tar.bz2
efi_selfest: redefine enum efi_test_phase
Setup will always occur before ExitBootServices(). So eliminate EFI_SETUP_AFTER_BOOTTIME_EXIT. Put the SetVirtualAddressMap() test into a separate class so that we can execute it last. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
-rw-r--r--include/efi_selftest.h7
-rw-r--r--lib/efi_selftest/efi_selftest.c11
-rw-r--r--lib/efi_selftest/efi_selftest_set_virtual_address_map.c2
3 files changed, 10 insertions, 10 deletions
diff --git a/include/efi_selftest.h b/include/efi_selftest.h
index 1515fda..07b6199 100644
--- a/include/efi_selftest.h
+++ b/include/efi_selftest.h
@@ -66,11 +66,10 @@ enum efi_test_phase {
*/
EFI_SETUP_BEFORE_BOOTTIME_EXIT,
/**
- * @EFI_SETUP_AFTER_BOOTTIME_EXIT: - setup after ExitBootServices
- *
- * Setup, execute, and teardown are executed after ExitBootServices().
+ * @EFI_SETTING_VIRTUAL_ADDRESS_MAP - calls SetVirtualAddressMap()
+ * Execute calls SetVirtualAddressMap().
*/
- EFI_SETUP_AFTER_BOOTTIME_EXIT,
+ EFI_SETTING_VIRTUAL_ADDRESS_MAP,
};
extern struct efi_simple_text_output_protocol *con_out;
diff --git a/lib/efi_selftest/efi_selftest.c b/lib/efi_selftest/efi_selftest.c
index b8eed04..39ee2ed 100644
--- a/lib/efi_selftest/efi_selftest.c
+++ b/lib/efi_selftest/efi_selftest.c
@@ -160,7 +160,7 @@ static bool need_reset(const u16 *testname)
if (testname && efi_st_strcmp_16_8(testname, test->name))
continue;
if (test->phase == EFI_SETUP_BEFORE_BOOTTIME_EXIT ||
- test->phase == EFI_SETUP_AFTER_BOOTTIME_EXIT)
+ test->phase == EFI_SETTING_VIRTUAL_ADDRESS_MAP)
return true;
}
return false;
@@ -327,15 +327,16 @@ efi_status_t EFIAPI efi_selftest(efi_handle_t image_handle,
/* Execute mixed tests */
efi_st_do_tests(testname, EFI_SETUP_BEFORE_BOOTTIME_EXIT,
EFI_ST_SETUP, &failures);
+ efi_st_do_tests(testname, EFI_SETTING_VIRTUAL_ADDRESS_MAP,
+ EFI_ST_SETUP, &failures);
efi_st_exit_boot_services();
efi_st_do_tests(testname, EFI_SETUP_BEFORE_BOOTTIME_EXIT,
EFI_ST_EXECUTE | EFI_ST_TEARDOWN, &failures);
-
- /* Execute runtime tests */
- efi_st_do_tests(testname, EFI_SETUP_AFTER_BOOTTIME_EXIT,
- EFI_ST_SETUP | EFI_ST_EXECUTE | EFI_ST_TEARDOWN,
+ /* Execute test setting the virtual address map */
+ efi_st_do_tests(testname, EFI_SETTING_VIRTUAL_ADDRESS_MAP,
+ EFI_ST_EXECUTE | EFI_ST_TEARDOWN,
&failures);
/* Give feedback */
diff --git a/lib/efi_selftest/efi_selftest_set_virtual_address_map.c b/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
index b097a81..8e2e8ba 100644
--- a/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
+++ b/lib/efi_selftest/efi_selftest_set_virtual_address_map.c
@@ -201,7 +201,7 @@ static int execute(void)
EFI_UNIT_TEST(virtaddrmap) = {
.name = "virtual address map",
- .phase = EFI_SETUP_BEFORE_BOOTTIME_EXIT,
+ .phase = EFI_SETTING_VIRTUAL_ADDRESS_MAP,
.setup = setup,
.execute = execute,
};