aboutsummaryrefslogtreecommitdiff
path: root/stand/efi/loader/arch/amd64/elf64_freebsd.c
diff options
context:
space:
mode:
authorRoger Pau Monné <royger@FreeBSD.org>2021-01-27 11:23:32 +0000
committerRoger Pau Monné <royger@FreeBSD.org>2021-02-16 14:26:11 +0000
commitadda2797eb2a29487fe26640a9c990fea7e6585d (patch)
treee3268ac02c268d67c305e8a053c62446863f0bf1 /stand/efi/loader/arch/amd64/elf64_freebsd.c
parent7d3259775cb69f250df3e7fe51d6fff2283c6f20 (diff)
downloadsrc-adda2797eb2a29487fe26640a9c990fea7e6585d.tar.gz
src-adda2797eb2a29487fe26640a9c990fea7e6585d.zip
stand/multiboot2: add support for booting a Xen dom0 in UEFI mode
Add some basic multiboot2 infrastructure to the EFI loader in order to be capable of booting a FreeBSD/Xen dom0 when booted from UEFI. Only a very limited subset of the multiboot2 protocol is implemented in order to support enough to boot into Xen, the implementation doesn't intend to be a full multiboot2 capable implementation. Such multiboot2 functionality is hooked up into the amd64 EFI loader, which is the only architecture that supports Xen dom0 on FreeBSD. The options to boot a FreeBSD/Xen dom0 system are exactly the same as on BIOS, and requires setting the xen_kernel and xen_cmdline options in loader.conf. Sponsored by: Citrix Systems R&D Reviewed by: tsoome, imp Differential revision: https://reviews.freebsd.org/D28497
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, 5 insertions, 0 deletions
diff --git a/stand/efi/loader/arch/amd64/elf64_freebsd.c b/stand/efi/loader/arch/amd64/elf64_freebsd.c
index cbaeb35cc952..a950ca55e843 100644
--- a/stand/efi/loader/arch/amd64/elf64_freebsd.c
+++ b/stand/efi/loader/arch/amd64/elf64_freebsd.c
@@ -69,7 +69,12 @@ static struct file_format amd64_elf_obj = {
.l_exec = elf64_obj_exec,
};
+extern struct file_format multiboot2;
+extern struct file_format multiboot2_obj;
+
struct file_format *file_formats[] = {
+ &multiboot2,
+ &multiboot2_obj,
&amd64_elf,
&amd64_elf_obj,
NULL