efi: Move exit_boot_services into a function
authorSimon Glass <sjg@chromium.org>
Tue, 4 Jan 2022 10:51:10 +0000 (03:51 -0700)
committerHeinrich Schuchardt <heinrich.schuchardt@canonical.com>
Sat, 15 Jan 2022 09:57:22 +0000 (10:57 +0100)
commit866e2ac5aa4b8a36db5bb4afd8b4e8302029849a
treeaef9add80fe56f4144c01e3d13eef5d9bc4501e5
parentbf59c46bcb51251442a8366005b31f6f8528a780
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>
include/efi.h
lib/efi/efi.c
lib/efi/efi_app.c
lib/efi/efi_stub.c