aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch/amd64/elf64_freebsd.c
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2021-02-05 10:15:19 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2021-02-16 14:26:10 +0000
commited87efbe24a5734c7150153cf201f3db42b6ddab (patch)
treef3b2ed556213dc4b9a096b7c31ffe7dd4b865837 /stand/efi/loader/arch/amd64/elf64_freebsd.c
parent3c40e1d52cd86168779cf99dbabe58df465d7e3f (diff)
downloadsrc-ed87efbe24a5734c7150153cf201f3db42b6ddab.tar.gz
src-ed87efbe24a5734c7150153cf201f3db42b6ddab.zip
stand/efi: allow not exiting boot services
Xen requires that UEFI BootServices are enabled in order to boot, so introduce a new parameter to bi_load in order to select whether BS should be exited. No functional change introduced in this patch, as all current users of bi_load request BS to be exited. Further changes will make use of this functionality. Note the memory map is still appended to the kernel metadata, even when it could be modified by further calls to the Boot Services, as it will be used to detect if the kernel has been booted from UEFI. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28495
Diffstat (limited to 'stand/efi/loader/arch/amd64/elf64_freebsd.c')
-rw-r--r--stand/efi/loader/arch/amd64/elf64_freebsd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c
index 896041e066c9..cbaeb35cc952 100644
--- a/stand/efi/loader/arch/amd64/elf64_freebsd.c
+++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c
@@ -54,7 +54,8 @@ __FBSDID("$FreeBSD$");
static EFI_GUID acpi_guid = ACPI_TABLE_GUID;
static EFI_GUID acpi20_guid = ACPI_20_TABLE_GUID;
-extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp);
+extern int bi_load(char *args, vm_offset_t *modulep, vm_offset_t *kernendp,
+ bool exit_bs);
static int elf64_exec(struct preloaded_file *amp);
static int elf64_obj_exec(struct preloaded_file *amp);
@@ -186,7 +187,7 @@ elf64_exec(struct preloaded_file *fp)
printf("Start @ 0x%lx ...\n", ehdr->e_entry);
efi_time_fini();
- err = bi_load(fp->f_args, &modulep, &kernend);
+ err = bi_load(fp->f_args, &modulep, &kernend, true);
if (err != 0) {
efi_time_init();
return(err);