Home | History | Annotate | Download | only in lib
History log of /src/sys/arch/i386/stand/lib/biosdisk.h
RevisionDateAuthorComments
 1.13  30-May-2021  mlelstv Add "root" command to provide a BTINFO_ROOTDEVICE parameter.
 1.12  13-Sep-2019  manu branches: 1.12.12; 1.12.14;
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.11  18-Aug-2019  manu Add GPT and RAIDframe support to bootloaders

Classic BIOS (/boot) and EFI bootloaders can now name devices
using the NAME=gpt_label syntax, or using raid partitions. Here
are examples:
boot NAME=root:/netbsd
boot raid0e:/netbsd
 1.10  02-Apr-2018  nonaka branches: 1.10.2; 1.10.6;
efiboot: try to read boot.cfg from /EFI/NetBSD on ESP of the booted disk.
 1.9  08-Mar-2018  nonaka efiboot: system can boot from CD/DVD-ROM media.
 1.8  24-Dec-2010  jakllsch branches: 1.8.52; 1.8.58;
Sprinkle daddr_t.
Adjust DISK_DEBUG printf formats to match.
 1.7  14-Dec-2008  christos branches: 1.7.2; 1.7.6;
ANSI and KNF from Anon Ymous
 1.6  11-Dec-2005  christos branches: 1.6.74; 1.6.78; 1.6.86;
merge ktrace-lwp.
 1.5  22-Jun-2005  junyoung Add support for cd9660 file system to the i386 BIOS bootloader.
 1.4  24-Mar-2004  drochner remove license clauses 3 and 4 from my cpoyright notices
 1.3  01-Feb-2003  dsl branches: 1.3.2;
Change all .S files to use .code16 and .code32
Support 32bit addresses >64k as valid on bios calls.
Move stack for dosboot and biosboot to >64 so stack doesn't hit data.
Use disk sector number passed by mbr code to select default partition
(the mbr code doesn't do this yet).
NB only biosboot and dosboot have been tested so far.
(changes approved by christos and fvdl)
 1.2  22-Mar-1997  thorpej Purely cosmetic whitespace/indentation changes (mmm, indent(1))
 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.2.4  10-Nov-2005  skrll Sync with HEAD. Here we go again...
 1.3.2.3  21-Sep-2004  skrll Fix the sync with head I botched.
 1.3.2.2  18-Sep-2004  skrll Sync with HEAD.
 1.3.2.1  03-Aug-2004  skrll Sync with HEAD
 1.6.86.1  19-Jan-2009  skrll Sync with HEAD.
 1.6.78.1  04-May-2009  yamt sync with head.
 1.6.74.1  17-Jan-2009  mjf Sync with HEAD.
 1.7.6.1  05-Mar-2011  rmind sync with head
 1.7.2.1  10-Jan-2011  jym Sync with HEAD
 1.8.58.2  07-Apr-2018  pgoyette Sync with HEAD. 77 conflicts resolved - all of them $NetBSD$
 1.8.58.1  15-Mar-2018  pgoyette Synch with HEAD
 1.8.52.4  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.8.52.3  17-Sep-2019  martin Pull up following revision(s) (requested by manu in ticket #1373):

sys/arch/i386/stand/boot/boot2.c: revision 1.72 (patch)
sys/arch/i386/stand/lib/biosdisk.c: revision 1.50
sys/arch/i386/stand/lib/biosdisk.c: revision 1.51
sys/arch/i386/stand/efiboot/devopen.c: revision 1.6
sys/arch/i386/stand/efiboot/devopen.h: revision 1.4
sys/arch/i386/stand/efiboot/devopen.c: revision 1.7
sys/arch/i386/stand/efiboot/efidisk.c: revision 1.8
share/man/man8/man8.x86/boot.8: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.17
sys/arch/i386/stand/lib/Makefile: revision 1.46
sys/arch/i386/stand/boot/devopen.h: revision 1.5
sys/arch/i386/stand/boot/devopen.c: revision 1.9
sys/arch/i386/stand/efiboot/boot.c: revision 1.14 (patch)
sys/arch/i386/stand/efiboot/boot.c: revision 1.15
sys/arch/i386/stand/lib/biosdisk.h: revision 1.11
sys/arch/i386/stand/boot/boot2.c: revision 1.71

Add GPT and RAIDframe support to bootloaders

Classic BIOS (/boot) and EFI bootloaders can now name devices
using the NAME=gpt_label syntax, or using raid partitions. Here
are examples:

boot NAME=root:/netbsd
boot raid0e:/netbsd

Correct the memset(3)'s third argument in i386 biosdisk.c

The size of allocation is the size of the structure biosdisk, not the size
of a pointer.

Document new GPT and RAIDframe capacity of bootstrap code
While there, also document EFI setup and some bugs

Typo fixes, 'file system'; new sentence, new line; expand IA-32.

Bump date for previous.

Make sure devices names are copied including last byte
Fix from M. Levinson.
 1.8.52.2  04-Apr-2018  martin Pull up following revision(s) (requested by nonaka in ticket #692):

sys/arch/i386/stand/efiboot/devopen.c: revision 1.4
sys/arch/i386/stand/efiboot/efidisk.c: revision 1.5
sys/arch/i386/stand/efiboot/devopen.h: revision 1.2
sys/arch/i386/stand/efiboot/efidisk.h: revision 1.3
sys/lib/libsa/bootcfg.h: revision 1.2
sys/arch/i386/stand/efiboot/boot.c: revision 1.9
sys/lib/libsa/bootcfg.c: revision 1.3
sys/arch/i386/stand/lib/bootmenu.c: revision 1.17
sys/arch/i386/stand/lib/biosdisk.c: revision 1.49
sys/arch/i386/stand/efiboot/TODO.efiboot: revision 1.5
sys/arch/i386/stand/lib/bootmenu.h: revision 1.6
sys/arch/i386/stand/lib/biosdisk.h: revision 1.10

efiboot: try to read boot.cfg from /EFI/NetBSD on ESP of the booted disk.
 1.8.52.1  13-Mar-2018  martin Pull up following revision(s) (requested by nonaka in ticket #625):
sys/arch/i386/stand/efiboot/efidisk.c: revision 1.2
sys/arch/i386/stand/efiboot/devopen.c: revision 1.2
sys/arch/i386/stand/efiboot/efidisk.h: revision 1.2
sys/arch/i386/stand/efiboot/boot.c: revision 1.6
sys/arch/i386/stand/efiboot/efidisk_ll.c: revision 1.2
sys/arch/i386/stand/efiboot/efidev.c: revision 1.1
sys/arch/i386/stand/lib/biosdisk_ll.h: revision 1.16
sys/arch/i386/stand/lib/biosdisk.h: revision 1.9
sys/lib/libsa/cd9660.c: revision 1.31
sys/arch/i386/stand/efiboot/efiboot.c: revision 1.5
sys/arch/i386/stand/efiboot/efiboot.h: revision 1.6
sys/arch/i386/stand/lib/biosdisk.c: revision 1.47
sys/arch/i386/stand/efiboot/Makefile.efiboot: revision 1.10
sys/arch/i386/stand/efiboot/TODO.efiboot: revision 1.4
efiboot: system can boot from CD/DVD-ROM media.

Add missed file in previous commit.
 1.10.6.2  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.10.6.1  13-Sep-2019  martin Pull up following revision(s) (requested by manu in ticket #200):

sys/arch/i386/stand/boot/boot2.c: revision 1.72
sys/arch/i386/stand/lib/biosdisk.c: revision 1.50
sys/arch/i386/stand/lib/biosdisk.c: revision 1.51
sys/arch/i386/stand/efiboot/devopen.c: revision 1.6
sys/arch/i386/stand/efiboot/devopen.h: revision 1.4
sys/arch/i386/stand/efiboot/devopen.c: revision 1.7
sys/arch/i386/stand/efiboot/efidisk.c: revision 1.8
share/man/man8/man8.x86/boot.8: revision 1.16
share/man/man8/man8.x86/boot.8: revision 1.17
sys/arch/i386/stand/lib/Makefile: revision 1.46
sys/arch/i386/stand/boot/devopen.h: revision 1.5
sys/arch/i386/stand/boot/devopen.c: revision 1.9
sys/arch/i386/stand/efiboot/boot.c: revision 1.14
sys/arch/i386/stand/efiboot/boot.c: revision 1.15
sys/arch/i386/stand/lib/biosdisk.h: revision 1.11
sys/arch/i386/stand/boot/boot2.c: revision 1.71

Add GPT and RAIDframe support to bootloaders

Classic BIOS (/boot) and EFI bootloaders can now name devices
using the NAME=gpt_label syntax, or using raid partitions. Here
are examples:

boot NAME=root:/netbsd
boot raid0e:/netbsd

Correct the memset(3)'s third argument in i386 biosdisk.c

The size of allocation is the size of the structure biosdisk, not the size
of a pointer.

Document new GPT and RAIDframe capacity of bootstrap code
While there, also document EFI setup and some bugs

Typo fixes, 'file system'; new sentence, new line; expand IA-32.
Bump date for previous.

Make sure devices names are copied including last byte
Fix from M. Levinson.
 1.10.2.1  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.12.14.1  31-May-2021  cjep sync with head
 1.12.12.1  17-Jun-2021  thorpej Sync w/ HEAD.

RSS XML Feed