efi loader: Call tslog_init from efi_main

We were calling tslog_init from main; no reason to wait that long.

Fixes:		f49381ccb6 efi/loader: Call tslog_init
Sponsored by:	https://www.patreon.com/cperciva
This commit is contained in:
Colin Percival 2021-09-25 12:04:06 -07:00
parent 9d324b5ffc
commit 19e4f2f289
2 changed files with 4 additions and 2 deletions

View File

@ -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);

View File

@ -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;