diff options
author | Colin Percival <cperciva@FreeBSD.org> | 2021-09-25 19:04:06 +0000 |
---|---|---|
committer | Colin Percival <cperciva@FreeBSD.org> | 2021-09-25 19:06:07 +0000 |
commit | 19e4f2f289fb8d2b14576a65ca9e6f931dbb6a02 (patch) | |
tree | d772f7bd7b7256b1c9754730876dcd6f0b1498b1 /stand/efi/loader | |
parent | 9d324b5ffc8a783ceff2a78dea19602a1d8f045a (diff) | |
download | src-19e4f2f289fb8d2b14576a65ca9e6f931dbb6a02.tar.gz src-19e4f2f289fb8d2b14576a65ca9e6f931dbb6a02.zip |
efi loader: Call tslog_init from efi_main
We were calling tslog_init from main; no reason to wait that long.
Fixes: f49381ccb6bc efi/loader: Call tslog_init
Sponsored by: https://www.patreon.com/cperciva
Diffstat (limited to 'stand/efi/loader')
-rw-r--r-- | stand/efi/loader/efi_main.c | 4 | ||||
-rw-r--r-- | stand/efi/loader/main.c | 2 |
2 files changed, 4 insertions, 2 deletions
diff --git a/stand/efi/loader/efi_main.c b/stand/efi/loader/efi_main.c index fa3c765c36ab..736c1aa56c99 100644 --- a/stand/efi/loader/efi_main.c +++ b/stand/efi/loader/efi_main.c @@ -27,6 +27,7 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <bootstrap.h> #include <efi.h> #include <eficonsctl.h> #include <efilib.h> @@ -101,6 +102,9 @@ efi_main(EFI_HANDLE image_handle, EFI_SYSTEM_TABLE *system_table) setheap((void *)(uintptr_t)heap, (void *)(uintptr_t)(heap + heapsize)); + /* Start tslog now that we have a heap.*/ + tslog_init(); + /* Use efi_exit() from here on... */ status = OpenProtocolByHandle(IH, &image_protocol, (void**)&img); diff --git a/stand/efi/loader/main.c b/stand/efi/loader/main.c index b687255181e3..d8b3b1d19b15 100644 --- a/stand/efi/loader/main.c +++ b/stand/efi/loader/main.c @@ -924,8 +924,6 @@ main(int argc, CHAR16 *argv[]) char buf[32]; bool uefi_boot_mgr; - tslog_init(); - archsw.arch_autoload = efi_autoload; archsw.arch_getdev = efi_getdev; archsw.arch_copyin = efi_copyin; |