HomeFreeBSD

loader: fix multiboot loading on UEFI

Description

loader: fix multiboot loading on UEFI

The Xen kernel has no symbol tables, so calling lookup_symbol against
it triggers the following Divide by Zero fault:

Loading Xen kernel...
/boot/xen data=0x2809c8+0x149638 |
!! X64 Exception Type - 00(#DE - Divide Error) CPU Apic ID - 00000000 !!

Fix lookup_symbol to prevent the #DE fault from happening if the
symbol table is not loaded and also fix loadfile_raw to mark multiboot
kernels as relocatable, since the only multiboot kernel supported is
Xen and was already unconditionally booted as relocatable.

Fixes: f75caed644a5 ('amd64 UEFI loader: stop copying staging area to 2M physical')
Reviewed by: imp, kib
Differential Revision: https://reviews.freebsd.org/D31507

Details

Provenance
roygerAuthored on Aug 11 2021, 2:55 PM
Reviewer
imp
Differential Revision
D31507: loader: fix multiboot loading on UEFI
Parents
rGf4c6843ec2b9: xen: use correct cache attributes for Xen specific memory regions
Branches
Unknown
Tags
Unknown