Home | History | Annotate | Download | only in lib
History log of /src/sys/arch/i386/stand/lib/libi386.h
RevisionDateAuthorComments
 1.56  09-Oct-2025  manu Add support for USB-to-serial adapter in UEFI bootstrap.

This change lets UEFI bootstrap use any UEFI supported serial port.
com0 to com3 remain used for EISA based serial ports. com4 and over
are used for serial ports based on something else (USB, PCI or whatever).

Support for non-EISA serial ports may be provided by UEFI. An open
source UEFI driver exists for FTDI FT232R USB-to-serial adapter.

The change also introduce the kconsdev command, to select the kernel
console device without altering the bootstrap console device. This
useful because the device names can differ in bootstrap and kernel.
For instance an USB-to-serial device could be com4 in boostrap and
ucom0 for the kernel.

An upcoming change will add console suport to ucom(4).
 1.55  06-May-2025  pgoyette Allow the dev= command when processing /boot.cfg file. This
addresses kern/59207
 1.54  18-Sep-2024  rin i386/stand: Remove XMS leftover from libi386.h, NFC

PR port-i386/58624
 1.53  29-Jun-2024  rin branches: 1.53.2;
i386: stand: Adjust for DOS-routine migration
 1.52  29-Jun-2024  rin libi386.h: Drop `I386_INCLUDE_BUS` support

This is what I intended for this commit:

https://mail-index.netbsd.org/source-changes/2024/06/29/msg151996.html

Instead, I removed libi386.h by mistake :(
 1.51  29-Jun-2024  rin libi386.h: Restore rev 1.48
 1.50  29-Jun-2024  rin i386: stand: Restore libi386.h,v 1.47, which I removed accidentally
 1.49  29-Jun-2024  rin i386: stand: G/C `I386_INCLUDE_BUS`; only used by netboot
 1.48  29-Jun-2024  rin i386: stand: G/C unused `printmemlist`, NFC
 1.47  18-Oct-2019  manu Remove prototype added twice by mistake
 1.46  18-Oct-2019  manu Add kernel symbols for multiboot1
 1.45  13-Sep-2019  manu Add multiboot 2 support to x86 bootloaders

multiboot 2 is required to boot Xen on an EFI system.
This also require a kernel patch for properly discovering
the ACPI RSDP, which is available after 20190912, in
src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28

There are a few missing bit in this multiboot 2 implementation
(which are unused by Xen):
- Header tags Address, Freambuffer, and Relocatable are ignored
- Tags APM and Network are not provided
- Tags ACPI old and ACP new are only provided for ACPI boot
- Tag boot device does not provides the subpart (BSD disklabel partition)

Notes:
- multiboot2 is disabled in dosboot, otherwise the binary
gets too big and build fails.
- in src/sys/arch/i386/stand/efiboot, consinit() is renamed
as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h
 1.44  26-Jul-2019  nonaka branches: 1.44.2;
Pre-allocate memory for the kernel space at startup.
 1.43  24-Jun-2019  pgoyette Now that the ufs module has been split out from ffs and ext2fs, we need
to update the boot-loader to push all modules required to support the
booted filesystem. We treat the fsmod string as a slash-separated list
of module names (relative to kern.module.path), rather than as a single
module path name.

Note that ffsv1 and ffsv2 are still exempted from the boot-loader's
auto-push, but the list of required filesystems is still noted in the
source.

Also note that arch/sandpoint needs a similar change. I have not made
this change because I am totally unable to test it.

Tested on my kernel with _no_ built-in file-systems and with the ffs
bootloader settings of fsmod enabled.
 1.42  12-Mar-2017  nonaka branches: 1.42.6; 1.42.14;
efiboot: Kernel modules are loaded in pre-allocated memory.
 1.41  24-Jan-2017  nonaka Initial commit of native amd64 EFI boot loader.
 1.40  24-Nov-2013  jakllsch branches: 1.40.6; 1.40.10; 1.40.14;
The x86 kernel entry point stack arguments are always 32-bit, even on amd64.
 1.39  30-Aug-2013  jmcneill Add support for using a raw file-system image as memory disk root with
the x86 bootloader.
 1.38  28-Nov-2011  tls branches: 1.38.8; 1.38.12;

Add support for passing saved entropy (random seed file) to the kernel
from the bootloader. This can fix the problem of poor quality keys
for other kernel modules which call arc4random() early in kernel startup
(NFS startup, in particular, causes this).

We continue to rely on the etc/rc.d/random_seed script to save entropy
to the seed file at shutdown and erase the seed file at startup.

Boot loader support implemented only for i386 and amd64 ports for now but
it should be easy for other ports to do the same or similar.
 1.37  16-Jun-2011  joerg branches: 1.37.2;
Add an optional MD calling convention flag for use in libsa when space
optimisation is critical. Use this on i386 to switch to register passing
calling convention for the file system entry points and most assembler
call backs that have to preserve at least 3 registers.
 1.36  26-May-2011  uebayasi branches: 1.36.2;
Support userconf(4) command in boot(8)/boot.cfg(5) on i386/amd64.

From jmmv@, no objections seen in the proposed thread:

http://mail-index.netbsd.org/tech-kern/2009/01/22/msg004081.html
 1.35  21-Feb-2011  dyoung biosdisk_getextinfo() returns 0 on success, non-zero on failure, so
change its return type from void to int.
 1.34  06-Feb-2011  jmcneill add support for passing image files to the kernel with the 'splash' keyword:

vesa on;splash /netbsd.jpg;boot -z
 1.33  25-Jun-2010  tsutsui branches: 1.33.2; 1.33.4;
Add wait_sec() which uses BIOS function call INT 1Ah/AH=00h (GET SYSTEMTIME)
and use it for large delays (in seconds) instead of delay() that uses
INT 15h/AH=86h (WAIT) in microsecond because the latter one can't provide
precise delays on emulators.
Fixes PR port-i386/43156 (NetBSD bootloader countdown runs at 1/20 speed
in qemu 0.12).

No particular comments on the PR and port-i386@.
 1.32  13-Sep-2009  jmcneill branches: 1.32.2; 1.32.4;
Make the 'dev' command print out a list of known boot devices based on
information from the BIOS in addition to the currently selected default
partition. Handy when you don't know where to boot from. Here's a demo:

type "?" or "help" for help.
> dev
disk hd0 size 3815 MB
hd0a(4.2BSD) hd0b(swap)
disk cd0
cd0a(unknown)
default hd0a
>
 1.31  21-Mar-2009  ad Fix 'boot -z' bogons.
 1.30  16-Feb-2009  jmcneill Bootloader modifications for generic framebuffer console support on i386
and amd64 where VESA VBE 2.0+ is available.

* Add helper library and stubs to invoke VBE bioscalls.
* Bump HEAP_START as we were already dangerously close to our limits.
* bootdataseg now allows access > 16MB so in the future we can scribble
on the framebuffer.
* Pass BTINFO_FRAMEBUFFER parameters to kernel when configured.
* VBE modes are configured with the new 'vesa' command. Usage, when present:
* vesa {enabled|disabled}
Enable / disable linear framebuffer, default mode is 640x480x8. May
be changed in the future to determine mode based on VBE/DDC where
available.
* vesa list
List modes supported by the firmware that meet the following criteria:
* linear framebuffer
* packed pixel or direct colour mode
* vesa {modenum|modestr}
Enable specific VBE mode. The mode can be specified either as a
VBE mode number (eg. 0x101) or as a string (eg. 800x600x16).
 1.29  12-Jan-2009  tsutsui branches: 1.29.2;
Replace time_t values in libsa sources with the following two types
to avoid unnecessary 64 bit ops which would make binaries larger:

satime_t (currently unsigned int):
numbers in seconds returned by the machine dependent getsecs() function
which are used to measure relative time

saseconds_t (currently int):
numbers in seconds used to specify timeout to network drivers

Per discussion on current-users.
 1.28  13-Dec-2008  christos add a boot.cfg option to clear the screen; default off. From Anon Ymous
 1.27  19-Nov-2008  ad For the x86 boot loader, autoload a kernel module corresponding to the
root file system type.
 1.26  11-Oct-2008  joerg branches: 1.26.2;
Add "multiboot" command to boot multiboot compliant kernels like Xen.
Patch provided by Robert Swindell with fixes for the command line
parsing and addition of passing module options from me. The kernel now
always gets the full string for modules like for the command line,
everything before the first space/tab is the path name of the module.
 1.25  26-Sep-2008  christos The structure of our elf kernel is:

elf header/program headers/text/data/note/
section headers/symbol table/string table

We need to read the section headers first to find the offset of the note
and thus we requite backwards seek. The only reason we need to read the
note is to find the version of the kernel, and this seems not to be used
anywhere. We could potentially change the kernel ldscript to add the note
information in the program headers, but dealing with ldscripts is painful
and producing a more complex binary could break some dumb standalone loader.
So the simple solution is to just disable the note loading for floppies
which is what this patch does. If someone wants to fix it in a better way,
be my guest.
 1.24  21-May-2008  ad branches: 1.24.4;
- Stop the twiddler going awry.
- Clear screen if on a glass tty (!).
 1.23  11-Dec-2005  christos branches: 1.23.74; 1.23.76; 1.23.78; 1.23.80;
merge ktrace-lwp.
 1.22  29-Jun-2005  junyoung Massive renames for consistency:
biosdiskreset -> biosdisk_reset
biosread -> biosdisk_read
get_diskinfo -> biosdisk_getinfo
int13_extension -> biosdisk_int13ext
biosextread -> biosdisk_extread
int13_getextinfo -> biosdisk_getextinfo
struct biosdisk_ext13info -> biosdisk_extinfo
BIOSDISK_EXT13 -> BIOSDISK_INT13EXT
BIOSDISK_EXT13INFO_V{2,3} -> BIOSDISK_EXTINFO_V{2,3}
EXT13_* -> EXTINFO_*
 1.21  22-Jun-2005  dyoung Cosmetic: join line.
 1.20  22-Jun-2005  junyoung Add support for cd9660 file system to the i386 BIOS bootloader.
 1.19  13-Jun-2005  junyoung Cosmetic changes.
 1.18  27-Jan-2005  mycroft Make awaitkey() poll once even if the timeout is 0. This also fixes a problem
where a keypress within the last polling interval would not be noticed.
Add a new function, conisshift(), which is used to detect whether a shift key
is pressed. Use this via awaitkey() to allow interrupting the boot by holding
down shift (similar to LILO).

This allows setting the timeout to 0 and still being able to use the boot
program.
 1.17  23-Aug-2004  junyoung branches: 1.17.4; 1.17.6;
* Nuke __P().
* No need to use 'extern' for function prototypes.
 1.16  24-Mar-2004  drochner remove license clauses 3 and 4 from my cpoyright notices
 1.15  16-Apr-2003  dsl branches: 1.15.2;
Add prototyps for all the asm bios/dos calls
 1.14  01-Jun-2001  jdolecek branches: 1.14.2;
g/c COMPAT_OLDBOOT from bootblocks, sprinkle some const
bump bootblock version to 2.10
 1.13  24-Sep-2000  jdolecek branches: 1.13.4;
add new macro BOOT_FLAG() (defined in <sys/boot_flag.h>) - this
maps standard boot flags to corresponding RB_* values
use BOOT_FLAG() in port's MD code as appropriate

as discussed on tech-kern, add new boot flags -v, -q for booting
verbosely or quietly, and corresponding AB_VERBOSE/AB_QUIET
boot flags; also add FreeBSD-compatible bootverbose macro and
NetBSD-specific bootquiet macro

for hpcmips, use new bootverbose instead of it's own hpcmips_verbose

Tested on i386, and to limited extend (compile of affected files) also for
mvme68k, hp300, luna68k, sun3.
 1.12  31-Aug-2000  jdolecek constify first arg to parseopts()
 1.11  23-Apr-2000  tsarna Addredd port-i386/9897, but differently. Since the effect of resetting
the video mode on machines with ancient or no video cards is not clear,
for safety's sake a I created a new biosboot variant, biosboot_resetvideo
that does the call.

Anyway, now I can boot my i-opener without hitting Tab. Thanks Andrew!
 1.10  21-Dec-1999  drochner add a function which prints out the memory descriptors (for debugging)
 1.9  14-Apr-1999  christos branches: 1.9.2; 1.9.8;
Add prototype for getsecs
 1.8  28-Jan-1999  christos branches: 1.8.4;
Minor changes to prototypes.
 1.7  13-Aug-1998  rvb Make serial line debugging easier to enable and use
 1.6  17-Sep-1997  drochner Add now common menu / parsing functions.
Adapt to new console I/O functionality.
Update exec() arguments.
 1.5  14-Aug-1997  drochner Make new memory detection default.
Introduce a new option, "CONSERVATIVE_MEMDETECT", which disables the
new BIOS calls.
 1.4  14-Aug-1997  drochner New, optional, method to get size of extended memory.
It will be used for getextmem() if EXTENDED_MEMDETECT is defined.
Worked on all tested machines.
Thanks to all testers, especially Martin Husemann!
 1.3  13-Jun-1997  drochner branches: 1.3.4;
Allow to boot from DOS if a XMS manager is installed.
XMS is recognized and used as temporary buffer for the kernel image.
The processor must still be in real mode at program start, so EMM386
or QEMM are not allowed. W*95 is OK.
Written by Martin Husemann (pr port-i386/3336).
Completely separated from other bootloaders for sanity.
 1.2  13-Apr-1997  perry 1) Make carriage return start boot immediately.
2) Make "quit" reboot machine. This works by adding a reboot assembler
hook that calls INT 19h
 1.1  14-Mar-1997  perry branches: 1.1.1;
Initial revision
 1.1.1.1  14-Mar-1997  perry Initial import of new boot code, created by Matthias Drochner with a
little hacking by me. This isn't strictly identical to his 920312
release -- I've hacked it a bit -- but since we are taking over change
control it doesn't matter much.
 1.3.4.2  22-Sep-1997  thorpej Update marc-pcmcia branch from trunk.
 1.3.4.1  23-Aug-1997  thorpej Update marc-pcmcia branch from trunk.
 1.8.4.1  21-Jun-1999  thorpej Sync w/ -current.
 1.9.8.1  27-Dec-1999  wrstuden Pull up to last week's -current.
 1.9.2.1  20-Nov-2000  bouyer Update thorpej_scsipi to -current as of a month ago
A i386 GENERIC kernel compiles without the siop, ahc and bha drivers
(will be updated later). i386 IDE/ATAPI and ncr work, as well as
sparc/esp_sbus. alpha should work as well (untested yet).
siop, ahc and bha will be updated once I've updated the branch to current
-current, as well as machine-dependant code.
 1.13.4.1  21-Jun-2001  nathanw Catch up to -current.
 1.14.2.2  01-Jun-2001  jdolecek g/c COMPAT_OLDBOOT from bootblocks, sprinkle some const
bump bootblock version to 2.10
 1.14.2.1  01-Jun-2001  jdolecek file libi386.h was added on branch sommerfeld_i386mp_1 on 2001-06-01 23:26:32 +0000
 1.15.2.6  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.15.2.5  04-Feb-2005  skrll Sync with HEAD.
 1.15.2.4  21-Sep-2004  skrll Fix the sync with head I botched.
 1.15.2.3  18-Sep-2004  skrll Sync with HEAD.
 1.15.2.2  25-Aug-2004  skrll Sync with HEAD.
 1.15.2.1  03-Aug-2004  skrll Sync with HEAD
 1.17.6.1  12-Feb-2005  yamt sync with head.
 1.17.4.1  29-Apr-2005  kent sync with -current
 1.23.80.2  10-Oct-2008  skrll Sync with HEAD.
 1.23.80.1  23-Jun-2008  wrstuden Sync w/ -current. 34 merge conflicts to follow.
 1.23.78.3  11-Aug-2010  yamt sync with head.
 1.23.78.2  16-Sep-2009  yamt sync with head
 1.23.78.1  04-May-2009  yamt sync with head.
 1.23.76.1  04-Jun-2008  yamt sync with head
 1.23.74.3  17-Jan-2009  mjf Sync with HEAD.
 1.23.74.2  28-Sep-2008  mjf Sync with HEAD.
 1.23.74.1  02-Jun-2008  mjf Sync with HEAD.
 1.24.4.2  13-Dec-2008  haad Update haad-dm branch to haad-dm-base2.
 1.24.4.1  19-Oct-2008  haad Sync with HEAD.
 1.26.2.3  28-Apr-2009  skrll Sync with HEAD.
 1.26.2.2  03-Mar-2009  skrll Sync with HEAD.
 1.26.2.1  19-Jan-2009  skrll Sync with HEAD.
 1.29.2.5  27-Aug-2011  jym Sync with HEAD. Most notably: uvm/pmap work done by rmind@, and MP Xen
work of cherry@.

No regression observed on suspend/restore.
 1.29.2.4  28-Mar-2011  jym Cure sync hiccups. Code with compile errors is not really useful, heh.
 1.29.2.3  28-Mar-2011  jym Sync with HEAD. TODO before merge:
- shortcut for suspend code in sysmon, when powerd(8) is not running.
Borrow ``xs_watch'' thread context?
- bug hunting in xbd + xennet resume. Rings are currently thrashed upon
resume, so current implementation force flush them on suspend. It's not
really needed.
 1.29.2.2  01-Nov-2009  jym Sync with HEAD.
 1.29.2.1  13-May-2009  jym Sync with HEAD.

Commit is split, to avoid a "too many arguments" protocol error.
 1.32.4.3  31-May-2011  rmind sync with head
 1.32.4.2  05-Mar-2011  rmind sync with head
 1.32.4.1  03-Jul-2010  rmind sync with head
 1.32.2.1  17-Aug-2010  uebayasi Sync with HEAD.
 1.33.4.2  05-Mar-2011  bouyer Sync with HEAD
 1.33.4.1  08-Feb-2011  bouyer Sync with HEAD
 1.33.2.1  06-Jun-2011  jruoho Sync with HEAD.
 1.36.2.1  23-Jun-2011  cherry Catchup with rmind-uvmplock merge.
 1.37.2.2  22-May-2014  yamt sync with head.

for a reference, the tree before this commit was tagged
as yamt-pagecache-tag8.

this commit was splitted into small chunks to avoid
a limitation of cvs. ("Protocol error: too many arguments")
 1.37.2.1  17-Apr-2012  yamt sync with head
 1.38.12.1  18-May-2014  rmind sync with head
 1.38.8.2  03-Dec-2017  jdolecek update from HEAD
 1.38.8.1  20-Aug-2014  tls Rebase to HEAD as of a few days ago.
 1.40.14.1  21-Apr-2017  bouyer Sync with HEAD
 1.40.10.1  20-Mar-2017  pgoyette Sync with HEAD
 1.40.6.2  28-Aug-2017  skrll Sync with HEAD
 1.40.6.1  05-Feb-2017  skrll Sync with HEAD
 1.42.14.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.42.6.2  18-Sep-2019  martin Pull up following revision(s) [adapted, via patch]
(requested by manu in ticket #1382):

sys/arch/i386/include/multiboot2.h: revision 1.1
sys/arch/i386/stand/lib/exec.c: revision 1.74
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.11
sys/arch/i386/stand/efiboot/bootia32/multiboot32.S: revision 1.1
sys/arch/i386/stand/lib/biosdisk.c: revision 1.52
sys/arch/i386/stand/efiboot/bootx64/efibootx64.c: revision 1.5
distrib/sets/lists/comp/md.amd64: revision 1.273
sys/arch/i386/stand/efiboot/eficons.c: revision 1.7
sys/arch/i386/stand/efiboot/bootia32/efibootia32.c: revision 1.5
distrib/sets/lists/comp/md.i386: revision 1.191
sys/arch/i386/stand/lib/libi386.h: revision 1.45
sys/arch/i386/stand/lib/bootinfo_memmap.c: revision 1.6
sys/arch/i386/stand/lib/pread.c: revision 1.8
sys/arch/i386/stand/efiboot/efiboot.h: revision 1.10
sys/arch/i386/stand/efiboot/bootia32/Makefile: revision 1.3
sys/arch/i386/stand/lib/Makefile: revision 1.47
sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.2
sys/arch/i386/stand/lib/multiboot.S: revision 1.3
sys/arch/i386/stand/efiboot/bootx64/multiboot64.S: revision 1.1
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.9
sys/arch/i386/stand/efiboot/boot.c: revision 1.16
sys/arch/i386/include/Makefile: revision 1.50
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.20
sys/arch/i386/stand/boot/Makefile.boot: revision 1.73
sys/arch/i386/stand/pxeboot/Makefile: revision 1.26
sys/arch/i386/stand/lib/exec_multiboot1.c: revision 1.1
sys/arch/i386/stand/netboot/Makefile.netboot: revision 1.11
sys/arch/i386/stand/lib/exec_multiboot2.c: revision 1.1
sys/arch/i386/stand/lib/biosdisk.h: revision 1.12
sys/arch/i386/stand/lib/exec_multiboot2.c: revision 1.2
sys/arch/i386/stand/dosboot/Makefile: revision 1.32
sys/external/bsd/gnu-efi/dist/inc/efiapi.h (apply patch)

Add multiboot 2 support to x86 bootloaders

multiboot 2 is required to boot Xen on an EFI system.

This also require a kernel patch for properly discovering
the ACPI RSDP, which is available after 20190912, in
src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28

There are a few missing bit in this multiboot 2 implementation
(which are unused by Xen):
- Header tags Address, Freambuffer, and Relocatable are ignored
- Tags APM and Network are not provided
- Tags ACPI old and ACP new are only provided for ACPI boot
- Tag boot device does not provides the subpart (BSD disklabel partition)

Notes:
- multiboot2 is disabled in dosboot, otherwise the binary
gets too big and build fails.
- in src/sys/arch/i386/stand/efiboot, consinit() is renamed
as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h

Remove debug define.

It remained there unseen because it was misspelled!

Remove obsoeolete BUGS note that UEFI bootloader does not support multiboot

Add new multiboot2.h header.
 1.42.6.1  01-Aug-2019  martin Pull up following revision(s) (requested by nonaka in ticket #1309):

sys/arch/i386/stand/lib/exec.c: revision 1.73
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.10
sys/arch/i386/stand/lib/libi386.h: revision 1.44
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.6
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.7
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.8
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.9
sys/arch/i386/stand/efiboot/boot.c: revision 1.12
sys/arch/i386/stand/efiboot/boot.c: revision 1.13
sys/arch/i386/stand/efiboot/efiboot.h: revision 1.9
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.15
sys/arch/i386/stand/efiboot/dev_net.c: revision 1.2

Added tftp support to x86 efiboot.

Pre-allocate memory for the kernel space at startup.

Added BTINFO_EFIMEMMAP compaction support to x86 efiboot.

Sync the output of memmap command to the output of stand/efiboot mem command.

Added missing efi_memory_probe() call.
 1.44.2.1  17-Sep-2019  martin Pull up following revision(s) (requested by manu in ticket #203):

sys/arch/i386/include/multiboot2.h: revision 1.1
sys/arch/i386/stand/lib/exec.c: revision 1.74
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.11
sys/arch/i386/stand/efiboot/bootia32/multiboot32.S: revision 1.1
sys/arch/i386/stand/lib/biosdisk.c: revision 1.52
sys/arch/i386/stand/efiboot/bootx64/efibootx64.c: revision 1.5
sys/arch/i386/stand/efiboot/eficons.c: revision 1.7
sys/arch/i386/stand/efiboot/bootia32/efibootia32.c: revision 1.5
sys/arch/i386/stand/lib/libi386.h: revision 1.45
sys/arch/i386/stand/lib/bootinfo_memmap.c: revision 1.6
sys/arch/i386/stand/lib/pread.c: revision 1.8
sys/arch/i386/stand/efiboot/efiboot.h: revision 1.10
sys/arch/i386/stand/efiboot/bootia32/Makefile: revision 1.3
sys/arch/i386/stand/lib/Makefile: revision 1.47
sys/arch/i386/stand/efiboot/bootx64/Makefile: revision 1.2
sys/arch/i386/stand/lib/multiboot.S: revision 1.3
sys/arch/i386/stand/efiboot/bootx64/multiboot64.S: revision 1.1
sys/arch/i386/stand/efiboot/efimemory.c: revision 1.9
sys/arch/i386/stand/efiboot/boot.c: revision 1.16
sys/arch/i386/include/Makefile: revision 1.50
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.20
sys/arch/i386/stand/boot/Makefile.boot: revision 1.73
sys/arch/i386/stand/pxeboot/Makefile: revision 1.26
sys/arch/i386/stand/lib/exec_multiboot1.c: revision 1.1
sys/arch/i386/stand/netboot/Makefile.netboot: revision 1.11
sys/arch/i386/stand/lib/exec_multiboot2.c: revision 1.1
sys/arch/i386/stand/lib/biosdisk.h: revision 1.12
sys/arch/i386/stand/lib/exec_multiboot2.c: revision 1.2
sys/arch/i386/stand/dosboot/Makefile: revision 1.32

Add multiboot 2 support to x86 bootloaders

multiboot 2 is required to boot Xen on an EFI system.

This also require a kernel patch for properly discovering
the ACPI RSDP, which is available after 20190912, in
src/sys/arch/x86/acpi/acpi_machdep.c 1.26-1.28

There are a few missing bit in this multiboot 2 implementation
(which are unused by Xen):
- Header tags Address, Freambuffer, and Relocatable are ignored
- Tags APM and Network are not provided
- Tags ACPI old and ACP new are only provided for ACPI boot
- Tag boot device does not provides the subpart (BSD disklabel partition)
Notes:
- multiboot2 is disabled in dosboot, otherwise the binary
gets too big and build fails.
- in src/sys/arch/i386/stand/efiboot, consinit() is renamed
as efi_consinit() to avoid prototype conflicts in src/sys/sys/systm.h

Remove debug define.

It remained there unseen because it was misspelled!

Remove obsoeolete BUGS note that UEFI bootloader does not support multiboot
 1.53.2.1  02-Aug-2025  perseant Sync with HEAD

RSS XML Feed