Link in libefi for boot1

Add libefi to the list of libraries we'll link in. Move EFI table
definitions back to libefi so we don't have drift between the two
efi_main routines.

Sponsored by: Netflix
This commit is contained in:
Warner Losh 2017-08-26 18:30:14 +00:00
parent abc3c1089d
commit 57d7e4f502
4 changed files with 8 additions and 13 deletions

View File

@ -76,13 +76,15 @@ CFLAGS+= -fPIC
LDFLAGS+= -Wl,-znocombreloc
.endif
LIBEFI= ${.OBJDIR}/../libefi/libefi.a
#
# Add libstand for the runtime functions used by the compiler - for example
# __aeabi_* (arm) or __divdi3 (i386).
# as well as required string and memory functions for all platforms.
#
DPADD+= ${LIBSTAND}
LDADD+= -lstand
DPADD+= ${LIBEFI} ${LIBSTAND}
LDADD+= ${LIBEFI} -lstand
DPADD+= ${LDSCRIPT}

View File

@ -47,11 +47,6 @@ static const boot_module_t *boot_modules[] =
/* The initial number of handles used to query EFI for partitions. */
#define NUM_HANDLES_INIT 24
EFI_HANDLE IH;
EFI_SYSTEM_TABLE *ST;
EFI_BOOT_SERVICES *BS;
EFI_RUNTIME_SERVICES *RS;
static EFI_GUID BlockIoProtocolGUID = BLOCK_IO_PROTOCOL;
static EFI_GUID DevicePathGUID = DEVICE_PATH_PROTOCOL;
static EFI_GUID LoadedImageGUID = LOADED_IMAGE_PROTOCOL;

View File

@ -32,7 +32,10 @@ __FBSDID("$FreeBSD$");
#include <efilib.h>
#include <stand.h>
extern EFI_SYSTEM_TABLE *ST;
EFI_HANDLE IH;
EFI_SYSTEM_TABLE *ST;
EFI_BOOT_SERVICES *BS;
EFI_RUNTIME_SERVICES *RS;
void *
efi_get_table(EFI_GUID *tbl)

View File

@ -32,11 +32,6 @@ __FBSDID("$FreeBSD$");
#include <efilib.h>
#include <stand.h>
EFI_HANDLE IH;
EFI_SYSTEM_TABLE *ST;
EFI_BOOT_SERVICES *BS;
EFI_RUNTIME_SERVICES *RS;
static EFI_PHYSICAL_ADDRESS heap;
static UINTN heapsize;