History log of /netbsd-current/sys/arch/i386/stand/efiboot/efiboot.h
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.12 20-Apr-2023 manu

Add reloc keyworkd to let EFI bootstrap load amd64 kernel at any address

EFI bootstrap assumes it can copy the amd64 kernel to its ELF load
address (that is KERNTEXTOFF - KERNBASE = 0x200000), but it can
clash with previous UEFI memory allocation, as described here:
http://mail-index.netbsd.org/tech-kern/2023/04/07/msg028833.html

This change adds a reloc keyword for controling where the EFI
boostrap will copy the kernel image. Possible values are:
default - the default and prior behavior, copy at 0x200000.
none - do not copy and use the kernel image where it was loaded.
address - specify an explicit address where to copy the kernel.

This comes with an amd64 kernel patch that makes it self-relocatable.
It first discover where it was loaded in memory, and if this is
different than the expected 0x200000, hhe the kernel relocates
itself and start over at the right address.


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
# 1.11 07-Sep-2021 nia

Remove banner printing code from bootloaders, add it to libsa.

This harmonizes efiboot and the various x86 bootloaders to use shared
code for printing the banner. By friendly coincidence, it also adds
support for specifying 'banner=' in arm efiboot's boot.cfg, as on x86.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.10 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


Revision tags: netbsd-9-base
# 1.9 29-Jul-2019 nonaka

branches: 1.9.2;
Added BTINFO_EFIMEMMAP compaction support to x86 efiboot.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415
# 1.8 11-Apr-2018 nonaka

branches: 1.8.2;
efiboot: Added network boot support.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330
# 1.7 27-Mar-2018 nonaka

efiboot: Added serial console support.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315
# 1.6 08-Mar-2018 nonaka

efiboot: system can boot from CD/DVD-ROM media.


Revision tags: pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1
# 1.5 01-May-2017 nonaka

branches: 1.5.2; 1.5.8; 1.5.10;
efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.6; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


# 1.11 07-Sep-2021 nia

Remove banner printing code from bootloaders, add it to libsa.

This harmonizes efiboot and the various x86 bootloaders to use shared
code for printing the banner. By friendly coincidence, it also adds
support for specifying 'banner=' in arm efiboot's boot.cfg, as on x86.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 ad-namecache-base2 ad-namecache-base1 ad-namecache-base phil-wifi-20191119
# 1.10 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


Revision tags: netbsd-9-base
# 1.9 29-Jul-2019 nonaka

branches: 1.9.2;
Added BTINFO_EFIMEMMAP compaction support to x86 efiboot.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415
# 1.8 11-Apr-2018 nonaka

branches: 1.8.2;
efiboot: Added network boot support.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330
# 1.7 27-Mar-2018 nonaka

efiboot: Added serial console support.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315
# 1.6 08-Mar-2018 nonaka

efiboot: system can boot from CD/DVD-ROM media.


Revision tags: pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1
# 1.5 01-May-2017 nonaka

branches: 1.5.2; 1.5.8; 1.5.10;
efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.6; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


# 1.10 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


Revision tags: netbsd-9-base
# 1.9 29-Jul-2019 nonaka

Added BTINFO_EFIMEMMAP compaction support to x86 efiboot.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415
# 1.8 11-Apr-2018 nonaka

efiboot: Added network boot support.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330
# 1.7 27-Mar-2018 nonaka

efiboot: Added serial console support.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315
# 1.6 08-Mar-2018 nonaka

efiboot: system can boot from CD/DVD-ROM media.


Revision tags: pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1
# 1.5 01-May-2017 nonaka

branches: 1.5.2; 1.5.8; 1.5.10;
efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.6; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


# 1.9 29-Jul-2019 nonaka

Added BTINFO_EFIMEMMAP compaction support to x86 efiboot.


Revision tags: phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415
# 1.8 11-Apr-2018 nonaka

efiboot: Added network boot support.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330
# 1.7 27-Mar-2018 nonaka

efiboot: Added serial console support.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315
# 1.6 08-Mar-2018 nonaka

efiboot: system can boot from CD/DVD-ROM media.


Revision tags: pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1
# 1.5 01-May-2017 nonaka

branches: 1.5.2; 1.5.8; 1.5.10;
efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.6; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906 pgoyette-compat-0728 phil-wifi-base pgoyette-compat-0625 pgoyette-compat-0521 pgoyette-compat-0502 pgoyette-compat-0422 pgoyette-compat-0415
# 1.8 11-Apr-2018 nonaka

efiboot: Added network boot support.


Revision tags: pgoyette-compat-0407 pgoyette-compat-0330
# 1.7 27-Mar-2018 nonaka

efiboot: Added serial console support.


Revision tags: pgoyette-compat-0322 pgoyette-compat-0315
# 1.6 08-Mar-2018 nonaka

efiboot: system can boot from CD/DVD-ROM media.


Revision tags: pgoyette-compat-base tls-maxphys-base-20171202 matt-nb8-mediatek-base nick-nhusb-base-20170825 perseant-stdc-iso10646-base netbsd-8-base prg-localcount2-base3 prg-localcount2-base2 prg-localcount2-base1
# 1.5 01-May-2017 nonaka

branches: 1.5.2; 1.5.8; 1.5.10;
efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.6; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


Revision tags: prg-localcount2-base1
# 1.5 01-May-2017 nonaka

efiboot: implement consdev command.

no support to change console device for efiboot yet.
only pass console parameters to kernel.


Revision tags: prg-localcount2-base pgoyette-localcount-20170426 bouyer-socketcan-base1 jdolecek-ncq-base pgoyette-localcount-20170320
# 1.4 11-Feb-2017 nonaka

branches: 1.4.2; 1.4.8;
PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


# 1.4 11-Feb-2017 nonaka

PR/51953: fix unable to boot on some AMD machine.

Delayed the timing to copy the kernel to actual address.
copy routine from common/lib/libc/arch/x86_64/string/bcopy.S


# 1.3 11-Feb-2017 nonaka

efiboot: don't call WaitForSingleEvent after ExitBootServices is called.


# 1.2 11-Feb-2017 nonaka

efiboot: pass memory map after ExitBootService is called to kernel.


Revision tags: nick-nhusb-base-20170204
# 1.1 24-Jan-2017 nonaka

branches: 1.1.2;
Initial commit of native amd64 EFI boot loader.


# 1.1 24-Jan-2017 nonaka

Initial commit of native amd64 EFI boot loader.