summaryrefslogtreecommitdiff
path: root/lib/efi/efi_app.c
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2022-01-04 03:51:10 -0700
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>2022-01-15 10:57:22 +0100
commit866e2ac5aa4b8a36db5bb4afd8b4e8302029849a (patch)
treeaef9add80fe56f4144c01e3d13eef5d9bc4501e5 /lib/efi/efi_app.c
parentbf59c46bcb51251442a8366005b31f6f8528a780 (diff)
efi: Move exit_boot_services into a function
At present this code is inline in the app and stub. But they do the same thing. The difference is that the stub does it immediately and the app doesn't want to do it until the end (when it boots a kernel) or not at all, if returning to UEFI. Move it into a function so it can be called as needed. Add a comment showing how to store the memory map so that it can be accessed within the app if needed, for debugging purposes only. The map can change without notice. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'lib/efi/efi_app.c')
-rw-r--r--lib/efi/efi_app.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/efi/efi_app.c b/lib/efi/efi_app.c
index d60f2f6c28f..5c2593bc4d9 100644
--- a/lib/efi/efi_app.c
+++ b/lib/efi/efi_app.c
@@ -321,6 +321,15 @@ efi_status_t EFIAPI efi_main(efi_handle_t image,
return ret;
}
+ /*
+ * We could store the EFI memory map here, but it changes all the time,
+ * so this is only useful for debugging.
+ *
+ * ret = efi_store_memory_map(priv);
+ * if (ret)
+ * return ret;
+ */
+
printf("starting\n");
board_init_f(GD_FLG_SKIP_RELOC);