History log of /src/sys/stand/efiboot/
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.31 02-Dec-2024 rin

stand/efiboot: Enable to override `DEFAULT_TIMEOUT`

by `EFIBOOT_TIMEOUT` make(1) variable.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.30 20-Jan-2024 kre

branches: 1.30.2;
Compensate for src/common/lib/libc/atomic/atomic_init_cas.c losing
the extern declaration of __libc_atomic_init() and instead using a
new one added to src/lib/libc/include/extern.h

That file is outside src/common and src/sys so is unavailable to
kernel builds, so instead make a new include file in src/common
which the kernel can read which contains the needed extern decl
for __libc_atomic_init()

This seems to fix the evbarm builds (maybe others) - but it is
all MUCH TOO UGLY to keep. Someone please make a better fix,
even if that just means reverting rev 1.5 of
src/common/lib/libc/atomic/atomic_init_cas.c
and all of the changes here (the addition to libc/include/extern.h
should be harmless to keep).


Revision tags: thorpej-ifq-base thorpej-altq-separation-base
1.29 15-Jun-2023 rin

Add missing include paths for libz. Not used at the moment although.


1.28 03-Jun-2023 lukem

adapt to ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}

Simplify CWARNFLAGS to use ${CC_WNO_ADDRESS_OF_PACKED_MEMBER}
which works for both clang and gcc, and remove compiler-specific
equivalents.


1.27 03-Jun-2023 lukem

bsd.own.mk: rename to CC_WNO_ADDRESS_OF_PACKED_MEMBER

Provide a single variable
CC_WNO_ADDRESS_OF_PACKED_MEMBER
with options for both clang and gcc, to replace
CLANG_NO_ADDR_OF_PACKED_MEMBER
CC_NO_ADDR_OF_PACKED_MEMBER
GCC_NO_ADDR_OF_PACKED_MEMBER

Using the convention CC_compilerflag, where compilerflag
is based on the full compiler flag name.


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
1.26 25-Mar-2022 jmcneill

branches: 1.26.4;
efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.25 17-Oct-2021 jmcneill

Honour the timeout= entry in boot.cfg


1.24 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


1.23 28-Sep-2021 jmcneill

efiboot: Add support for changing the video mode.

Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.

The "version" command prints the current display mode.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.22 20-Jun-2021 jmcneill

Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.21 27-May-2021 mrg

add bi-endian support to the libsa ufs reader and enable it in efiboot.

ffs frontends to "ufs.c" now also define ufs_dinode_swap, ufs_indp_swap,
and FS_MAGIC (moved from ufs.c #if segments.) these are used to call
the right (32/64 bit) ffsv1/v2 version.

ufs.c 'struct file' gains f_swapped member. accessors for d_magic,
d_reclen, and d_ino are introduced (they need to be swapped.) sfter
reading an inode from disk, read_inode() may call ufs_dinode_swap().
indirect block number and caches may be swapped.

error handling in ffs_find_superblock() is cleaned up. (size is slightly
reduced on some ports with this part.)

defaults for new defines added to ufs.c. (XXX: we build ufs.c but i think
all the consumers don't use it, and we can stop building it.)

LFS support is not included.

add a cut-down copy of ffs_bswap.c from the kernel.

also enable bi-endian disklabel support in efiboot.

most ports build and sizes compared for platforms that don't enable this
code and all but one saw reduced code size. booted several platforms with
new boot code.


Revision tags: cjep_staticlib_x-base
1.20 04-May-2021 jmcneill

branches: 1.20.2;
Set VERSIONMACHINE to ${MACHINE} instead of evbarm (oops)


Revision tags: thorpej-cfargs-base thorpej-futex-base
1.19 11-Oct-2020 jmcneill

branches: 1.19.6;
Add ISO9660 support.


1.18 06-Sep-2020 mrg

add support for new GCC 9 warnings that may be too much to fix
right now. new address-of-packed-member and format-overflow
warnings have new GCC_NO_ADDR_OF_PACKED_MEMBER amd
GCC_NO_FORMAT_OVERFLOW variables to remove these warnings.

apply to a bunch of the tree. mostly, these are real bugs that
should be fixed, but in many cases, only by removing the 'packed'
attribute from some structure that doesn't really need it. (i
looked at many different ones, and while perhaps 60-80% were
already properly aligned, it wasn't clear to me that the uses
were always coming from sane data vs network alignment, so it
doesn't seem safe to remove packed without careful research for
each affect struct.) clang already warned (and was not erroring)
for many of these cases, but gcc picked up dozens more.


1.17 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.16 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.15 21-Jun-2020 jmcneill

Add boot.cfg support.


1.14 21-Jun-2020 jmcneill

Add module support.


1.13 14-May-2020 riastradh

Draft logic to get at EFI RNG.


1.12 26-Apr-2020 rin

Adjust for binutils 2.34 in the same manner as efiboot/x86:
http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/arch/i386/stand/efiboot/Makefile.efiboot#rev1.17


Revision tags: bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base phil-wifi-20200406
1.11 01-Apr-2020 tnn

efiboot: add clang fix from i386/stand/efiboot/bootx64/Makefile here too


Revision tags: is-mlppp-base ad-namecache-base3 ad-namecache-base2
1.10 25-Jan-2020 jmcneill

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


Revision tags: ad-namecache-base1 ad-namecache-base
1.9 30-Nov-2019 jmcneill

branches: 1.9.2;
Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
1.8 21-Jul-2019 rin

branches: 1.8.2;
Enable us to load kernel image of different byte order. Now, earmv7hf-eb
kernel can successfully boot from EFI bootloader.

XXX
We need to recognize disklabel and filesystem written in opposite byte oder.


Revision tags: phil-wifi-20190609
1.7 21-Apr-2019 thorpej

branches: 1.7.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020
1.6 12-Oct-2018 jmcneill

Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: pgoyette-compat-0930
1.5 15-Sep-2018 jmcneill

Suppress printing size info when calling loadfile with COUNT_KERNEL


1.4 09-Sep-2018 jmcneill

Add support for setting environment variables. Currently the following env
vars are supported: "fdtfile", "initrd", and "rootdev".


Revision tags: pgoyette-compat-0906
1.3 03-Sep-2018 jmcneill

branches: 1.3.2;
Add PXE support.


1.2 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.45 14-Jun-2023 rin

Add missing member for terminating sentinel.


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
1.44 14-Aug-2022 jmcneill

branches: 1.44.4;
Align output of "version" command.


1.43 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.42 04-Nov-2021 skrll

Fix non-ACPI builds.


1.41 03-Nov-2021 skrll

Provide the ablity to ignore ACPI with an 'acpi' command:

acpi [{on|off}]


1.40 17-Oct-2021 jmcneill

Honour the timeout= entry in boot.cfg


1.39 09-Oct-2021 jmcneill

efiboot: add "setup" command

The "setup" command sets the 64-bit "OsIndications" variable to the value of
EFI_OS_INDICATIONS_BOOT_TO_FW_UI and requests a reboot. On firmware that
supports this, after reboot the user will be presented with the firmware
setup menu.


1.38 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


1.37 28-Sep-2021 jmcneill

efiboot: Add support for changing the video mode.

Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.

The "version" command prints the current display mode.


1.36 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 thorpej-i2c-spi-conf-base
1.35 24-Jul-2021 jmcneill

efiboot: Allow "fs" as alias for "initrd", for compat with x86


1.34 23-Jun-2021 jmcneill

When printing memory size, don't promote to next unit size unless it is at
two digits.


1.33 23-Jun-2021 jmcneill

print_banner: Print memory size like x86 does


1.32 21-Jun-2021 jmcneill

efiboot: Add readahead support.

Reading data through libsa file-systems ends up breaking block I/O
accesses into very small (512-byte or 2048-byte) accesses. This can be
very inefficient, and causes Ampere eMAG w/ BMC image direction to take
_minutes_ to load the install image and kernel. So slow in fact that
the default watchdog timeout will fire before it finishes.

So, when loading big files, optimistically read ahead up to 64KB of data.
Brings the time to boot the install ISO down to around 40 seconds -- still
not ideal but way better than before.


1.31 21-Jun-2021 nia

efiboot: Add ASCII art.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.30 31-May-2021 rin

Generalize boot.cfg workaround for ISO9660; fallback to default_device
whenever efi_file_path() fails (due to broken firmware), in addition to
the case of ISO9660 (for which efi_file_path() succeeds but does not
work correctly).


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.29 28-Nov-2020 jmcneill

branches: 1.29.4; 1.29.6;
Add a hook for MD specific info to print in the "ver" command. Use this
to print the value of the current execution level in bootaa64.


1.28 11-Oct-2020 jmcneill

branches: 1.28.2;
Add ISO9660 support.


1.27 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.26 27-Jun-2020 jmcneill

command_version: print config file path


1.25 27-Jun-2020 jmcneill

Load boot.cfg from the EFI system partition instead of the first FFS
partition on that device.


1.24 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.23 21-Jun-2020 jmcneill

Add boot.cfg support.


1.22 21-Jun-2020 jmcneill

Add module support.


1.21 14-May-2020 riastradh

Draft logic to get at EFI RNG.


Revision tags: 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
1.20 25-Jan-2020 jmcneill

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


Revision tags: ad-namecache-base1 ad-namecache-base
1.19 18-Dec-2019 riastradh

branches: 1.19.2;
Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
1.18 21-Apr-2019 thorpej

branches: 1.18.2; 1.18.4;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base
1.17 20-Apr-2019 jmcneill

ST FirmwareRevision field is in a vendor defined format, so just print the raw value


1.16 10-Apr-2019 skrll

Print bootargs from the environment

Pass the enironment boot args if none are provided by the boot command


Revision tags: pgoyette-compat-20190127
1.15 18-Jan-2019 skrll

Add support for "bootargs" environment variable from jmcneill@

Doesn't work with some (all?) u-boots.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.14 15-Nov-2018 jmcneill

Add support for loading kernels over NFS.


1.13 02-Nov-2018 jmcneill

Add a "mem" command to print the EFI memory map.


1.12 29-Oct-2018 mrg

avoid sign/unsigned issue and for NUMNAMES to an integer when it is
compared against a value that may be -1.

fixes autoboot when boot-file is set. (serves me right for removing
code that looked odd when it was tested :-)


1.11 26-Oct-2018 mrg

add "boot-file" support. now one can automatically boot a
non-default kernel with "setenv boot-file host/netbsd".

this is particularly useful with the current net / tftp
kernel boot, so the tftproot does not need a "/netbsd"
visible to all hosts, but some host-specific path.

some minor clean up.

version 1.4.

ok jmcneill@.


Revision tags: pgoyette-compat-1020
1.10 12-Oct-2018 jmcneill

Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: pgoyette-compat-0930
1.9 09-Sep-2018 jmcneill

Add a reboot command to the bootloader


1.8 09-Sep-2018 jmcneill

Add support for setting environment variables. Currently the following env
vars are supported: "fdtfile", "initrd", and "rootdev".


1.7 09-Sep-2018 jmcneill

Add "dtb" command for loading a custom .dtb file.


1.6 07-Sep-2018 jmcneill

Add initrd support.


Revision tags: pgoyette-compat-0906
1.5 03-Sep-2018 jmcneill

branches: 1.5.2;
Print FDT model and compatible strings with "version" command


1.4 03-Sep-2018 jmcneill

Add PXE support.


1.3 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.2 24-Aug-2018 jmcneill

Use absolute paths for default kernel filenames


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.5 08-Jun-2022 wiz

Remove now unused bootdefault() function.

Part of PR 56862.


1.4 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.3 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


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
1.2 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.1 21-Jun-2020 jmcneill

Add boot.cfg support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.2 08-Jun-2022 wiz

Remove now unused bootdefault() function.

Part of PR 56862.


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
1.1 21-Jun-2020 jmcneill

Add boot.cfg support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.6 24-Apr-2022 mlelstv

Use physical sector size as unit for disk addresses.
Provide new ioctl to libsa to query for sector size.


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
1.5 11-Oct-2020 jmcneill

Add ISO9660 support.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.4 15-Nov-2018 jmcneill

branches: 1.4.4;
Add support for loading kernels over NFS.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.3 03-Sep-2018 jmcneill

branches: 1.3.2;
Add PXE support.


1.2 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.2 15-Sep-2018 jmcneill

branches: 1.2.4;
Some U-Boot implementations (notably U-Boot) do not implement WaitForKey. Do the same as FreeBSD EFI loader here (I wrote the original patch there as well).


Revision tags: pgoyette-compat-0906
1.1 24-Aug-2018 jmcneill

branches: 1.1.2;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.3 15-Aug-2024 skrll

Trailing whitespace.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.2 15-Nov-2018 jmcneill

branches: 1.2.4; 1.2.38;
Add support for loading kernels over NFS.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.1 03-Sep-2018 jmcneill

branches: 1.1.2;
Add PXE support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.4 15-Nov-2018 jmcneill

branches: 1.4.4;
Add support for loading kernels over NFS.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.3 03-Sep-2018 jmcneill

branches: 1.3.2;
Add PXE support.


1.2 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 24-Aug-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.13 14-Aug-2022 jmcneill

Align output of "version" command.


1.12 03-Nov-2021 skrll

Provide the ablity to ignore ACPI with an 'acpi' command:

acpi [{on|off}]


1.11 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.10 23-Jul-2021 jmcneill

efiboot: Add support for SMBIOS 2.x tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.9 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.8 10-Oct-2020 jmcneill

branches: 1.8.6; 1.8.8;
Support EFI runtime and GOP FB for devicetree (non-ACPI) setups.


1.7 14-May-2020 riastradh

Draft logic to get at EFI RNG.


Revision tags: 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
1.6 25-Jan-2020 jmcneill

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


Revision tags: ad-namecache-base1 ad-namecache-base
1.5 30-Nov-2019 jmcneill

branches: 1.5.2;
Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.


Revision tags: phil-wifi-20191119
1.4 01-Aug-2019 jmcneill

Add full UEFI memory map to the /chosen node.


Revision tags: netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.3 28-Oct-2018 jmcneill

branches: 1.3.4; 1.3.6;
Make EFI runtime services available to the kernel. Bump version to 1.5.


1.2 23-Oct-2018 jmcneill

If an SMBIOS3 table is found, pass the address to the kernel via /chosen
"netbsd,smbios-table" property.


Revision tags: pgoyette-compat-1020
1.1 12-Oct-2018 jmcneill

branches: 1.1.2;
Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.3 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
1.2 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020
1.1 12-Oct-2018 jmcneill

branches: 1.1.2; 1.1.6; 1.1.20; 1.1.22;
Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.20 14-Jun-2023 rin

Avoid void * pointer arithmetic; cast to UINT8 * explicitly.
No binary changes for aarch64 at least.


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
1.19 24-Apr-2022 mlelstv

branches: 1.19.4;
Use physical sector size as unit for disk addresses.
Provide new ioctl to libsa to query for sector size.


1.18 30-Oct-2021 jmcneill

If a path is not specified, assume /. This makes "ls" and "ls hd0b:" work
as expected.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.17 23-Jun-2021 jmcneill

fix typo


1.16 23-Jun-2021 jmcneill

Fix buffer size for alignment adjusted block I/O reads.


1.15 22-Jun-2021 jmcneill

efiboot: Use EFI_BLOCK_IO_PROTOCOL if EFI_DISK_IO_PROTOCOL is missing

UEFI spec says that firmware should automatically add EFI_DISK_IO_PROTOCOL
for all produced EFI_BLOCK_IO_PROTOCOL interfaces. Unfortunately U-Boot
doesn't do this, so fallback to block I/O if disk I/O is not there.


1.14 21-Jun-2021 jmcneill

efiboot: Add readahead support.

Reading data through libsa file-systems ends up breaking block I/O
accesses into very small (512-byte or 2048-byte) accesses. This can be
very inefficient, and causes Ampere eMAG w/ BMC image direction to take
_minutes_ to load the install image and kernel. So slow in fact that
the default watchdog timeout will fire before it finishes.

So, when loading big files, optimistically read ahead up to 64KB of data.
Brings the time to boot the install ISO down to around 40 seconds -- still
not ideal but way better than before.


1.13 21-Jun-2021 jmcneill

efiboot: Use disk I/O protocol for block device access.

EFI_DISK_IO_PROTOCOL is a simplified interface to block devices. Use this
instead of EFI_BLOCK_IO_PROTOCOL for accessing block devices to simplify
the code -- we no longer need to worry about the underlying media's block
I/O size and alignment requirements.


1.12 20-Jun-2021 jmcneill

Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.11 26-May-2021 mrg

add basic raidframe support to efiboot.

if raid disklabel or gpt is found, add this partition with
the offset/size adjusted by RF_PROTECTED_SECTORS. note

don't le32toh() the disklabel. if it was wrong-endian, then
getdisklabel() will have swapped it.

ok jmcneill thorpej.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.10 28-Nov-2020 jmcneill

branches: 1.10.4; 1.10.6;
Deal with devices that report either 512 or 2048 as logical block size
for CD9660 file-systems.


1.9 18-Oct-2020 tnn

branches: 1.9.2;
efiboot: recognize the EFI system partition as fstype MSDOS


1.8 11-Oct-2020 jmcneill

Add ISO9660 support.


Revision tags: 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.7 27-Sep-2019 jakllsch

Use roundup2() instead of open coding something almost the same that
truncates 64-bit quantities.

Fixes disk access and booting in bootaa64.efi on SoftIron OverDrive 1000
(which does not have any memory below 4GiB).


1.6 21-Sep-2019 jmcneill

Honour block device's IO alignment requirements.

Patch from Simon South <simon@simonsouth.net> in PR# 54554


Revision tags: netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.5 09-Mar-2019 jmcneill

branches: 1.5.4; 1.5.6;
Workaround a bug with ROCKPro64's U-Boot EFI implementation. The booted
device path when booting from SD card sometimes does not include a
MEDIA_DEVICE_PATH component, so in this case fallback to doing an exact
match on the booted device path with the block device path to detect the
default boot device.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.4 01-Nov-2018 jmcneill

Add GPT support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.3 14-Sep-2018 jakllsch

MI efiboot: avoid LBA overflow in efi_block_find_partitions_disklabel()


Revision tags: pgoyette-compat-0906
1.2 27-Aug-2018 jmcneill

branches: 1.2.2;
Pass a hash of the MBR and the booted partition to the kernel.


1.1 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.7 24-Apr-2022 mlelstv

Use physical sector size as unit for disk addresses.
Provide new ioctl to libsa to query for sector size.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.6 21-Jun-2021 jmcneill

efiboot: Add readahead support.

Reading data through libsa file-systems ends up breaking block I/O
accesses into very small (512-byte or 2048-byte) accesses. This can be
very inefficient, and causes Ampere eMAG w/ BMC image direction to take
_minutes_ to load the install image and kernel. So slow in fact that
the default watchdog timeout will fire before it finishes.

So, when loading big files, optimistically read ahead up to 64KB of data.
Brings the time to boot the install ISO down to around 40 seconds -- still
not ideal but way better than before.


1.5 21-Jun-2021 jmcneill

efiboot: Use disk I/O protocol for block device access.

EFI_DISK_IO_PROTOCOL is a simplified interface to block devices. Use this
instead of EFI_BLOCK_IO_PROTOCOL for accessing block devices to simplify
the code -- we no longer need to worry about the underlying media's block
I/O size and alignment requirements.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.4 11-Oct-2020 jmcneill

branches: 1.4.6;
Add ISO9660 support.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.3 01-Nov-2018 jmcneill

branches: 1.3.4;
Add GPT support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.2 27-Aug-2018 jmcneill

branches: 1.2.2;
Pass a hash of the MBR and the booted partition to the kernel.


1.1 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.24 15-Aug-2024 skrll

Rename some symbols for consistency with the style used elsewhere
in efiboot.

NFCI.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.23 28-Mar-2024 riastradh

branches: 1.23.2;
efiboot: Duplicate efi_bootdp before we clobber it in efi_net_probe.

Patch from jakllsch@. Makes Socionext Synquacer boot considerably
more reliably.

PR kern/58075


Revision tags: netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.22 06-Oct-2021 jmcneill

branches: 1.22.4;
efiboot: Make FDT support optional on a per-arch basis.


1.21 28-Sep-2021 jmcneill

efiboot: Add support for changing the video mode.

Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.

The "version" command prints the current display mode.


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
1.20 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.19 21-Jun-2020 jmcneill

Add boot.cfg support.


1.18 14-May-2020 riastradh

Pass EFI RNG output via /chosen/netbsd,efirng-{start,end}.

This is separate from /chosen/netbsd,rndseed-{start,end}, which
specifies NetBSD's persistent on-disk seed; efirng is the firmware's
RNG device.


Revision tags: 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.17 26-Sep-2019 jmcneill

Do a full reset of the console at startup


Revision tags: netbsd-9-base phil-wifi-20190609
1.16 21-Apr-2019 thorpej

branches: 1.16.2; 1.16.4;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base
1.15 20-Apr-2019 jmcneill

Skip clearing the screen when efiboot starts, it may end up hiding useful information


1.14 10-Apr-2019 skrll

Fixup EFIBOT_DEBUG output for non-_LP64 case


1.13 30-Mar-2019 jmcneill

Build fixes for 32-bit targets.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.12 01-Nov-2018 jmcneill

Add GPT support.


1.11 31-Oct-2018 jmcneill

Assign VAs for EFI runtime mmio ranges


1.10 28-Oct-2018 jmcneill

Make EFI runtime services available to the kernel. Bump version to 1.5.


Revision tags: pgoyette-compat-1020
1.9 12-Oct-2018 jmcneill

Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: pgoyette-compat-0930
1.8 15-Sep-2018 jmcneill

Suppress printing size info when calling loadfile with COUNT_KERNEL


1.7 15-Sep-2018 jmcneill

Claer the screen at startup


1.6 09-Sep-2018 jmcneill

Add a reboot command to the bootloader


Revision tags: pgoyette-compat-0906
1.5 03-Sep-2018 jmcneill

branches: 1.5.2;
Add PXE support.


1.4 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.3 24-Aug-2018 jmcneill

If we could not query the DevicePathProtocol handle, just select no default boot device instead of exiting.


1.2 24-Aug-2018 jmcneill

EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL.Reset() may not be supported. Failing to reset is not a fatal error, so ignore the status.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.22 15-Aug-2024 skrll

Move function declarations into correct header.

NFCI.


1.21 15-Aug-2024 skrll

Rename some symbols for consistency with the style used elsewhere
in efiboot.

NFCI.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.20 14-Aug-2022 jmcneill

branches: 1.20.10;
Align output of "version" command.


1.19 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.18 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


1.17 28-Sep-2021 jmcneill

efiboot: Add support for changing the video mode.

Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.

The "version" command prints the current display mode.


1.16 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 thorpej-i2c-spi-conf-base
1.15 20-Jun-2021 jmcneill

Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.14 11-Oct-2020 jmcneill

branches: 1.14.6;
Add ISO9660 support.


1.13 15-Jul-2020 jmcneill

Fixup OpenSimpleReadFile usage:
- The "EFI_DEVICE_PATH **FilePath" parameter can change, so do not free
the output. This was causing crashes on U-Boot when attempting to load
boot.cfg, even if it didn't exist.
- Allocate the SIMPLE_READ_FILE in advance and store a pointer to it in
struct open_file.


1.12 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


Revision tags: 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
1.11 18-Dec-2019 riastradh

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


Revision tags: netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
1.10 21-Apr-2019 thorpej

branches: 1.10.2; 1.10.4;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.9 15-Nov-2018 jmcneill

Add support for loading kernels over NFS.


1.8 26-Oct-2018 mrg

add "boot-file" support. now one can automatically boot a
non-default kernel with "setenv boot-file host/netbsd".

this is particularly useful with the current net / tftp
kernel boot, so the tftproot does not need a "/netbsd"
visible to all hosts, but some host-specific path.

some minor clean up.

version 1.4.

ok jmcneill@.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.7 15-Sep-2018 jmcneill

Suppress printing size info when calling loadfile with COUNT_KERNEL


1.6 09-Sep-2018 jmcneill

Add a reboot command to the bootloader


1.5 09-Sep-2018 jmcneill

Add "dtb" command for loading a custom .dtb file.


1.4 07-Sep-2018 jmcneill

Add initrd support.


Revision tags: pgoyette-compat-0906
1.3 03-Sep-2018 jmcneill

branches: 1.3.2;
Add PXE support.


1.2 26-Aug-2018 jmcneill

Add support for booting kernels from FFS partitions.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.5 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.4 01-Aug-2023 mrg

branches: 1.4.6;
fix simple mis-matched function prototype and definitions.

most of these are like, eg

void foo(int[2]);

with either of these

void foo(int*) { ... }
void foo(int[]) { ... }

in some cases (such as stat or utimes* calls found in our header files),
we now match standard definition from opengroup.

found by GCC 12.


Revision tags: netbsd-10-1-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.3 28-Nov-2020 jmcneill

Add a hook for MD specific info to print in the "ver" command. Use this
to print the value of the current execution level in bootaa64.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.2 07-Sep-2018 jmcneill

branches: 1.2.4; 1.2.14;
Disable MMU and dcache before jumping to the kernel.


Revision tags: pgoyette-compat-0906
1.1 24-Aug-2018 jmcneill

branches: 1.1.2;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 24-Aug-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.2 15-Jul-2020 jmcneill

Fixup OpenSimpleReadFile usage:
- The "EFI_DEVICE_PATH **FilePath" parameter can change, so do not free
the output. This was causing crashes on U-Boot when attempting to load
boot.cfg, even if it didn't exist.
- Allocate the SIMPLE_READ_FILE in advance and store a pointer to it in
struct open_file.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 26-Aug-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add support for booting kernels from FFS partitions.


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base bouyer-sunxi-drm-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-futex-base
1.7 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.6 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.5 14-May-2020 msaitoh

Remove extra semicolon.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
1.4 21-Apr-2019 thorpej

branches: 1.4.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base
1.3 30-Mar-2019 jmcneill

Build fixes for 32-bit targets.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.2 18-Sep-2018 jmcneill

branches: 1.2.2;
utf8_to_ucs2 second param (nmp) needs to be initialized before calling this function


1.1 09-Sep-2018 jmcneill

Add support for setting environment variables. Currently the following env
vars are supported: "fdtfile", "initrd", and "rootdev".


Revision tags: perseant-exfatfs-base-20250801 perseant-exfatfs-base-20240630 perseant-exfatfs-base bouyer-sunxi-drm-base cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-futex-base
1.4 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.3 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609
1.2 21-Apr-2019 thorpej

branches: 1.2.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.1 09-Sep-2018 jmcneill

branches: 1.1.2;
Add support for setting environment variables. Currently the following env
vars are supported: "fdtfile", "initrd", and "rootdev".


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.38 07-Dec-2024 jmcneill

efiboot: Use 1:1 PA to VA mappings for RT services.

UEFI firmware on Snapdragon X Elite devices crashes when
SetVirtualAddressMap is called with runtime mappings that are not 1:1.
Always do this on arm64 as it won't interfere with KVA and will help us
avoid avoid a very common class of firmware bugs.


1.37 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


1.36 15-Aug-2024 skrll

Rename some symbols for consistency with the style used elsewhere
in efiboot.

NFCI.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.35 14-Aug-2022 jmcneill

branches: 1.35.10;
Align output of "version" command.


1.34 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.33 06-Nov-2021 jmcneill

Revert part of previous commit that broke DT booting.


1.32 03-Nov-2021 skrll

Provide the ablity to ignore ACPI with an 'acpi' command:

acpi [{on|off}]


1.31 06-Oct-2021 jmcneill

Fix bootarm build.


1.30 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base
1.29 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.28 19-Dec-2020 skrll

branches: 1.28.4; 1.28.6;
Various clean ups
- cache node where possible
- remove a compiler warning
- improve a comment (the round_page might not be needed)


1.27 22-Oct-2020 jmcneill

branches: 1.27.2;
Fix previous.


1.26 22-Oct-2020 jmcneill

If the framebuffer node already exists, we don't need to create one


1.25 10-Oct-2020 jmcneill

Support EFI runtime and GOP FB for devicetree (non-ACPI) setups.


1.24 21-Jun-2020 jmcneill

Add module support.


1.23 14-May-2020 riastradh

Deduplicate lazy /chosen node creation logic.


1.22 14-May-2020 riastradh

Pass EFI RNG output via /chosen/netbsd,efirng-{start,end}.

This is separate from /chosen/netbsd,rndseed-{start,end}, which
specifies NetBSD's persistent on-disk seed; efirng is the firmware's
RNG device.


Revision tags: 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
1.21 03-Jan-2020 skrll

Fix EFIBOOT_DEBUG build on arm


1.20 18-Dec-2019 riastradh

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


Revision tags: phil-wifi-20191119
1.19 30-Aug-2019 jmcneill

Only set #address-cells and #size-cells properties on /chosen if we are
fabricating a devicetree (ACPI mode). Fixes PR# 54494


1.18 01-Aug-2019 jmcneill

Add full UEFI memory map to the /chosen node.


Revision tags: netbsd-9-base
1.17 25-Jul-2019 skrll

branches: 1.17.2;
Fix arm build


1.16 24-Jul-2019 jmcneill

Add support for simple framebuffers when booting in ACPI mode.


Revision tags: phil-wifi-20190609
1.15 21-Apr-2019 thorpej

branches: 1.15.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.14 15-Nov-2018 jmcneill

Add support for loading kernels over NFS.


1.13 02-Nov-2018 jmcneill

Add a "mem" command to print the EFI memory map.


1.12 01-Nov-2018 jmcneill

Add GPT support.


1.11 31-Oct-2018 jmcneill

When building /memory, skip EFI runtime memory ranges


1.10 31-Oct-2018 jmcneill

No longer need to delete reserved memory ranges.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.9 09-Sep-2018 jmcneill

Add "dtb" command for loading a custom .dtb file.


1.8 07-Sep-2018 jmcneill

Add initrd support.


Revision tags: pgoyette-compat-0906
1.7 03-Sep-2018 jmcneill

branches: 1.7.2;
Print FDT model and compatible strings with "version" command


1.6 02-Sep-2018 jmcneill

Dump memory map if EFI_MEMORY_DEBUG is defined


1.5 28-Aug-2018 jmcneill

Remove call to fdt_pack, it is causing problems with memory detection


1.4 27-Aug-2018 alnsn

Fix typo in a panic string.


1.3 27-Aug-2018 jmcneill

Pass a hash of the MBR and the booted partition to the kernel.


1.2 24-Aug-2018 jmcneill

Sanitize the memory map passed to the kernel.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.14 15-Aug-2024 riastradh

efifdt.h: Break overlong line.


1.13 15-Aug-2024 skrll

Move function declarations into correct header.

NFCI.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.12 25-Mar-2022 jmcneill

branches: 1.12.10;
efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.11 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


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
1.10 10-Oct-2020 jmcneill

Support EFI runtime and GOP FB for devicetree (non-ACPI) setups.


1.9 21-Jun-2020 jmcneill

Add module support.


1.8 14-May-2020 riastradh

Pass EFI RNG output via /chosen/netbsd,efirng-{start,end}.

This is separate from /chosen/netbsd,rndseed-{start,end}, which
specifies NetBSD's persistent on-disk seed; efirng is the firmware's
RNG device.


Revision tags: 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
1.7 18-Dec-2019 riastradh

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


Revision tags: netbsd-9-0-RC2 netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
1.6 24-Jul-2019 jmcneill

branches: 1.6.2;
Add support for simple framebuffers when booting in ACPI mode.


Revision tags: phil-wifi-20190609
1.5 21-Apr-2019 thorpej

branches: 1.5.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.4 09-Sep-2018 jmcneill

Add "dtb" command for loading a custom .dtb file.


1.3 07-Sep-2018 jmcneill

Add initrd support.


Revision tags: pgoyette-compat-0906
1.2 03-Sep-2018 jmcneill

branches: 1.2.2;
Print FDT model and compatible strings with "version" command


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.5 15-Jul-2020 jmcneill

Fixup OpenSimpleReadFile usage:
- The "EFI_DEVICE_PATH **FilePath" parameter can change, so do not free
the output. This was causing crashes on U-Boot when attempting to load
boot.cfg, even if it didn't exist.
- Allocate the SIMPLE_READ_FILE in advance and store a pointer to it in
struct open_file.


1.4 27-Jun-2020 jmcneill

Load boot.cfg from the EFI system partition instead of the first FFS
partition on that device.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.3 26-Aug-2018 jmcneill

branches: 1.3.2; 1.3.6;
Add support for booting kernels from FFS partitions.


1.2 24-Aug-2018 jmcneill

If the boot device could not be determined, use the first one found as
the default. While here, remove unnecessary calls to LibFileSystemInfo().


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.2 27-Jun-2020 jmcneill

Load boot.cfg from the EFI system partition instead of the first FFS
partition on that device.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 24-Aug-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.5 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.4 30-Mar-2019 jmcneill

branches: 1.4.4;
Build fixes for 32-bit targets.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.3 03-Sep-2018 jmcneill

branches: 1.3.2;
Add PXE support.


1.2 24-Aug-2018 jmcneill

Remove unused file.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.3 14-Aug-2022 jmcneill

Align output of "version" command.


1.2 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


1.1 28-Sep-2021 jmcneill

efiboot: Add efigop.c


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base
1.9 01-Jan-2024 rin

MI efiboot: Revert "Stop using efi_bootdp after exclusive open for PXE"

http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/stand/efiboot/efinet.c#rev1.7

Some UEFI implementations pass multiple boot options as boot device path,
and NULL-clearing it results in boot failures.

Thanks skrll@ for pointing it out.


1.8 27-Dec-2023 rin

MI efiboot: efi_net_probe: Examine Messaging Device Path also

Network devices can be found as Hardware or Messaging Device Paths,
see Sec 10.4.4 of UEFI Spec 2.10.

In addition to Hardware Device Path, try Messaging Device Path also.
This fixes PXE boot on implementations with the latter choice, e.g.,
Raspberry Pi 4 UEFI firmware.


1.7 27-Dec-2023 rin

MI efiboot: Stop using efi_bootdp after exclusive open for PXE

Once boot device is exclusively opened for Simple Network Protocol,
further access via device path (efi_bootdp) is illegal.

For some implementations, boot device path gets corrupted by
exclusive open, and subsequent access by efi_device_path_depth(),
e.g., causes infinite recursion.

Fix PXE boot for QEMU/aarch64 with EDK2 on some Linux distributions.

Thanks yamaguchi@ for comments and tests.


Revision tags: netbsd-9-4-RELEASE thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.6 31-Mar-2019 jmcneill

branches: 1.6.4; 1.6.32;
Add support for netbooting with non-PCI network devices.


1.5 05-Mar-2019 msaitoh

Centralize ETHER_ALIGN into net/if_ether.h. Note that this commit also changes
if_upgt.c's ETHER_ALIGN from 0 to 2.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.4 15-Nov-2018 jmcneill

Add support for loading kernels over NFS.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.3 04-Sep-2018 jmcneill

branches: 1.3.2;
If the loader is loaded from the network, try to load the kernel from the
same network device.


1.2 04-Sep-2018 riastradh

Fix some min/max -> uimin/uimax stragglers.

Confirmed by the 2018-09-04T04:40Z autobuild.


1.1 03-Sep-2018 jmcneill

Add PXE support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 03-Sep-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add PXE support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.3 24-Jul-2023 rin

MI and x86 efiboot: Fix device path type for PXE boot device.

It should be Messaging, not Media Device Path. Taken from OpenBSD, for
which this code was originally written:

https://cvsweb.openbsd.org/src/sys/arch/amd64/stand/efiboot/efipxe.c#rev1.6

> Network-based device paths use Messaging and not Media types. Thus
> in reality the depth was always -1 which made the compare function
> a No-Op. Properly check the device path depth value and look for
> the Messaging type instead to find the correct NIC. This check
> never worked before and was uncovered by the last change.
>
> Regression noticed by bluhm@


Revision tags: netbsd-9-4-RELEASE netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.2 15-Nov-2018 jmcneill

branches: 1.2.4; 1.2.32;
Add support for loading kernels over NFS.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930 pgoyette-compat-0906
1.1 03-Sep-2018 jmcneill

branches: 1.1.2;
Add PXE support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 14-Aug-2022 jmcneill

Align output of "version" command.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.3 22-Jun-2021 jmcneill

efirng: fix va_num arg to uefi_call_wrapper for GetRNG calls

As far as I can tell this param isn't actually used, but it is supposed to
be the number of arguments passed to the called method.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.2 14-May-2020 jmcneill

branches: 1.2.6;
Make efi_rng_show return early if RNG protocol is not available. While
here, use efi_rng_available() consistently, prefix all show messages with
"RNG: ", and use sizeof(foo) instead of sizeof foo.


1.1 14-May-2020 riastradh

Draft logic to get at EFI RNG.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.1 14-May-2020 riastradh

Draft logic to get at EFI RNG.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-i2c-spi-conf-base thorpej-cfargs2-base
1.1 20-Jun-2021 jmcneill

branches: 1.1.4;
Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.26 19-Sep-2024 mlelstv

when freeing pages, pass page count instead of byte count.


1.25 15-Aug-2024 skrll

Rename some symbols for consistency with the style used elsewhere
in efiboot.

NFCI.


Revision tags: perseant-exfatfs-base-20240630 perseant-exfatfs-base thorpej-ifq-base thorpej-altq-separation-base
1.24 14-Jun-2023 rin

branches: 1.24.6;
Use %zd instead of %ld for ssize_t.


Revision tags: netbsd-10-base bouyer-sunxi-drm-base
1.23 06-Oct-2021 jmcneill

branches: 1.23.4;
efiboot: Make FDT support optional on a per-arch basis.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.22 20-Jun-2021 jmcneill

Enable the twiddle spinner when loading the kernel, ramdisk images, and
modules.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.21 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


1.20 11-May-2021 skrll

Consistently have ALIGN sizes as the power of two size, i.e. change
FDT_ALIGN, and use the same math(s) to round.

In the process fix the load_offset for the kernel to use the EFIBOOT_ALIGN
aligned address if that's what we get from AllocatePages.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.19 10-Oct-2020 jmcneill

branches: 1.19.6; 1.19.8;
Support EFI runtime and GOP FB for devicetree (non-ACPI) setups.


1.18 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.17 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.16 21-Jun-2020 jmcneill

Add module support.


1.15 23-May-2020 thorpej

If a device tree overlay does not have a "compatible" match, don't
load it. (Oops, missing return statement.)


1.14 14-May-2020 riastradh

Pass EFI RNG output via /chosen/netbsd,efirng-{start,end}.

This is separate from /chosen/netbsd,rndseed-{start,end}, which
specifies NetBSD's persistent on-disk seed; efirng is the firmware's
RNG device.


Revision tags: 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
1.13 25-Jan-2020 jmcneill

Hide the twiddle while loading efiboot plist


Revision tags: ad-namecache-base1 ad-namecache-base
1.12 18-Dec-2019 riastradh

branches: 1.12.2;
Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


Revision tags: netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base
1.11 24-Jul-2019 jmcneill

branches: 1.11.2;
Add support for simple framebuffers when booting in ACPI mode.


Revision tags: phil-wifi-20190609
1.10 21-Apr-2019 thorpej

branches: 1.10.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base
1.9 30-Mar-2019 jmcneill

Build fixes for 32-bit targets.


Revision tags: pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.8 28-Oct-2018 jmcneill

Make EFI runtime services available to the kernel. Bump version to 1.5.


Revision tags: pgoyette-compat-1020
1.7 12-Oct-2018 jmcneill

Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: pgoyette-compat-0930
1.6 15-Sep-2018 jmcneill

Suppress printing size info when calling loadfile with COUNT_KERNEL


1.5 09-Sep-2018 jmcneill

Add "dtb" command for loading a custom .dtb file.


1.4 07-Sep-2018 jmcneill

Add initrd support.


Revision tags: pgoyette-compat-0906
1.3 02-Sep-2018 jmcneill

branches: 1.3.2;
Support loading kernels at PAs above 0x3fffffffff on arm64


1.2 27-Aug-2018 jmcneill

Pass a hash of the MBR and the booted partition to the kernel.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.2 21-Sep-2022 riastradh

efiboot: Handle 9.99.100 by taking four, not two, digits.

We haven't used the revision part of __NetBSD_Version__ = MMmmrrpp00
in almos two decades so we're apparently reclaiming it as MMmmpppp00.


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
1.1 21-Jun-2020 jmcneill

Add module support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.1 21-Jun-2020 jmcneill

Add module support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.1 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.1 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base 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
1.1 24-Aug-2018 jmcneill

branches: 1.1.2; 1.1.6;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.6 25-Jan-2020 jmcneill

Fix for disappearing counters on graphics consoles


Revision tags: ad-namecache-base1 ad-namecache-base phil-wifi-20191119
1.5 29-Sep-2019 jakllsch

branches: 1.5.2;
Increase MI efiboot bootprompt() input buffer from 80 bytes to LINE_MAX.

This allows you to load a kernel from a build directory deep in some file
system after you accidentally boot an old kernel with a new userland and
are otherwise unable to get yourself back to a matching kernel.


Revision tags: netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.4 31-Oct-2018 jmcneill

branches: 1.4.4; 1.4.6;
No need to re-print the countdown timer if the number of seconds hasn't changed.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.3 15-Sep-2018 jmcneill

Only need to ischar() once when polling for input


Revision tags: pgoyette-compat-0906
1.2 24-Aug-2018 jmcneill

branches: 1.2.2;
Start counting down at 5 instead of 4


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.4 16-Sep-2021 andvar

fix typos in word "successful".


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.3 23-Jul-2021 jmcneill

efiboot: Add support for SMBIOS 2.x tables.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 cjep_staticlib_x-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
1.2 27-Dec-2019 msaitoh

branches: 1.2.6; 1.2.14;
s/sucess/success/ in comment.


1.1 30-Nov-2019 jmcneill

branches: 1.1.2;
Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.1 30-Nov-2019 jmcneill

branches: 1.1.2; 1.1.8;
Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.1 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.33 07-Dec-2024 jmcneill

efiboot: Use 1:1 PA to VA mappings for RT services.

UEFI firmware on Snapdragon X Elite devices crashes when
SetVirtualAddressMap is called with runtime mappings that are not 1:1.
Always do this on arm64 as it won't interfere with KVA and will help us
avoid avoid a very common class of firmware bugs.


1.32 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.31 02-Apr-2022 skrll

branches: 1.31.10;
Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.


1.30 25-Mar-2022 jmcneill

efiboot: Add support for 'userconf' command.

Add support for the 'userconf' command at the boot prompt and in boot.cfg,
and for FDT based booting, pass the commands as a string list property
named "netbsd,userconf" on the /chosen node.


1.29 28-Sep-2021 jmcneill

efiboot: Add support for changing the video mode.

Add a new "gop" command that can query the list of available video modes.
With a mode number as argument (eg. "gop 16"), the new display mode will
be selected.

The "version" command prints the current display mode.


Revision tags: thorpej-i2c-spi-conf2-base
1.28 08-Aug-2021 andvar

s/partion/partition/ s/arrray/array/ in comments.


Revision tags: thorpej-futex2-base thorpej-cfargs2-base thorpej-i2c-spi-conf-base
1.27 21-Jun-2021 jmcneill

efiboot: Use disk I/O protocol for block device access.

EFI_DISK_IO_PROTOCOL is a simplified interface to block devices. Use this
instead of EFI_BLOCK_IO_PROTOCOL for accessing block devices to simplify
the code -- we no longer need to worry about the underlying media's block
I/O size and alignment requirements.


1.26 20-Jun-2021 jmcneill

Add support for the boot services watchdog and pet it on every block I/O
access. For slow media (like ISO image redirection on Lenovo HR330A BMC)
this is needed because otherwise the default watchdog timeout fires before
we can finish loading the kernel from install media.


Revision tags: cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1
1.25 27-May-2021 mrg

add bi-endian support to the libsa ufs reader and enable it in efiboot.

ffs frontends to "ufs.c" now also define ufs_dinode_swap, ufs_indp_swap,
and FS_MAGIC (moved from ufs.c #if segments.) these are used to call
the right (32/64 bit) ffsv1/v2 version.

ufs.c 'struct file' gains f_swapped member. accessors for d_magic,
d_reclen, and d_ino are introduced (they need to be swapped.) sfter
reading an inode from disk, read_inode() may call ufs_dinode_swap().
indirect block number and caches may be swapped.

error handling in ffs_find_superblock() is cleaned up. (size is slightly
reduced on some ports with this part.)

defaults for new defines added to ufs.c. (XXX: we build ufs.c but i think
all the consumers don't use it, and we can stop building it.)

LFS support is not included.

add a cut-down copy of ffs_bswap.c from the kernel.

also enable bi-endian disklabel support in efiboot.

most ports build and sizes compared for platforms that don't enable this
code and all but one saw reduced code size. booted several platforms with
new boot code.


1.24 26-May-2021 mrg

add basic raidframe support to efiboot.

if raid disklabel or gpt is found, add this partition with
the offset/size adjusted by RF_PROTECTED_SECTORS. note

don't le32toh() the disklabel. if it was wrong-endian, then
getdisklabel() will have swapped it.

ok jmcneill thorpej.


1.23 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


Revision tags: cjep_staticlib_x-base thorpej-cfargs-base thorpej-futex-base
1.22 18-Oct-2020 tnn

branches: 1.22.6; 1.22.8;
efiboot: bump version


1.21 11-Oct-2020 jmcneill

Add ISO9660 support.


1.20 10-Oct-2020 jmcneill

Support EFI runtime and GOP FB for devicetree (non-ACPI) setups.


1.19 28-Jun-2020 jmcneill

Remove support for storing settings in EFI environment variables now that
we have boot.cfg support.


1.18 26-Jun-2020 thorpej

Add dtoverlay command to specify device tree overlays from the boot
loader command line. Add support for specifying device tree overlays
in boot.cfg, with the syntax:

dtoverlay=/path/to/overlay.dtbo
dtoverlay=hd0e:/overlays/example.dtbo

Multiple overlays can be specified, and they are loaded in the order
they appear in boot.cfg.

Remove support for efiboot.plist.


1.17 21-Jun-2020 jmcneill

Add boot.cfg support.


1.16 21-Jun-2020 jmcneill

Add module support.


1.15 14-May-2020 riastradh

Bump efiboot version to note EFI RNG support.


Revision tags: 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
1.14 18-Dec-2019 riastradh

Implement rndseed support in efiboot and fdt arm.

The EFI environment variable `rndseed' specifies the path to the
random seed. It is loaded only for fdt platforms at the moment.

Since the rndseed (an rndsave_t object as defined in <sys/rndio.h>)
is 536 bytes long (for hysterical raisins), and to avoid having to
erase parts of the fdt tree, we load it into a physical page whose
address is passed in the fdt tree, rather than passing the content of
the file as an fdt node directly; the kernel then reserves the page
from uvm, and maps it into kva to call rnd_seed.

For now, the only kernel that does use efiboot with fdt is evbarm,
which knows to handle the rndseed. Any new kernels that use efiboot
with fdt must do the same; otherwise uvm may hand out the page with
the secret key on it for a normal page allocation in the kernel --
which should be OK if there are no kernel memory disclosure bugs, but
would lead to worse consequences than simply loading the seed late in
userland with /etc/rc.d/random_seed otherwise.

ok jmcneill


1.13 30-Nov-2019 jmcneill

Use SMBIOS system vendor and product strings to create a "model" string
for the root node in the fabricated ACPI device tree, when possible.


Revision tags: phil-wifi-20191119
1.12 01-Aug-2019 jmcneill

Add full UEFI memory map to the /chosen node.


Revision tags: netbsd-9-base
1.11 24-Jul-2019 jmcneill

branches: 1.11.2;
Add support for simple framebuffers when booting in ACPI mode.


Revision tags: phil-wifi-20190609
1.10 21-Apr-2019 thorpej

branches: 1.10.2;
- Add support for a boot configuration file, defaulting to /etc/efiboot.plist.
- Add support for pre-loading EFI environment variables from efiboot.plist.
- Add support for device tree overlays specified in efiboot.plist.

(Man page for efiboot forthcoming.)


Revision tags: isaki-audio2-base pgoyette-compat-20190127
1.9 18-Jan-2019 skrll

Add support for "bootargs" environment variable from jmcneill@

Doesn't work with some (all?) u-boots.


Revision tags: pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.8 15-Nov-2018 jmcneill

Add support for loading kernels over NFS.


1.7 01-Nov-2018 jmcneill

Add GPT support.


1.6 28-Oct-2018 jmcneill

Make EFI runtime services available to the kernel. Bump version to 1.5.


1.5 26-Oct-2018 mrg

add "boot-file" support. now one can automatically boot a
non-default kernel with "setenv boot-file host/netbsd".

this is particularly useful with the current net / tftp
kernel boot, so the tftproot does not need a "/netbsd"
visible to all hosts, but some host-specific path.

some minor clean up.

version 1.4.

ok jmcneill@.


1.4 21-Oct-2018 jmcneill

Enable ACPI support.


Revision tags: pgoyette-compat-1020 pgoyette-compat-0930
1.3 09-Sep-2018 jmcneill

Add support for setting environment variables. Currently the following env
vars are supported: "fdtfile", "initrd", and "rootdev".


Revision tags: pgoyette-compat-0906
1.2 03-Sep-2018 jmcneill

branches: 1.2.2;
Add PXE support.


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.13 07-Dec-2024 jmcneill

efiboot: Use 1:1 PA to VA mappings for RT services.

UEFI firmware on Snapdragon X Elite devices crashes when
SetVirtualAddressMap is called with runtime mappings that are not 1:1.
Always do this on arm64 as it won't interfere with KVA and will help us
avoid avoid a very common class of firmware bugs.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.12 02-Apr-2022 skrll

branches: 1.12.10;
Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.


1.11 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


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
1.10 10-Sep-2020 jakllsch

bootaa64: explicitly set GNUEFIARCH and LIBGNUEFI_ARCH to aarch64


1.9 08-Sep-2020 jmcneill

Be explicit about building for little endian. This allows efiboot to be
built with the aarch64eb toolchain.


1.8 21-Jun-2020 jmcneill

Add module support.


Revision tags: 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
1.7 25-Jan-2020 jmcneill

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


Revision tags: ad-namecache-base1 ad-namecache-base phil-wifi-20191119
1.6 23-Sep-2019 christos

branches: 1.6.2;
Consistently use ${RELEASEDIR}/${RELEASEMACHINE} instead of
${RELEASEDIR}/${MACHINE} (Paul Ripke)


Revision tags: netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126
1.5 28-Oct-2018 jmcneill

branches: 1.5.4; 1.5.6;
Make EFI runtime services available to the kernel. Bump version to 1.5.


1.4 21-Oct-2018 jmcneill

Enable ACPI support.


Revision tags: pgoyette-compat-1020
1.3 12-Oct-2018 jmcneill

Add ACPI support (enable with -DEFIBOOT_ACPI, currently disabled).

When UEFI reports that ACPI tables are available, generate a DTB with
compatible string "netbsd,generic-acpi" and pass this to the booted
kernel.

The DTB contains a /chosen property "netbsd,acpi-root-table" that contains
the physical address of the ACPI RSDP, along with a special /acpi node
with compatible string "netbsd,acpi" for the kernel to attach an acpi(4)
device driver.


Revision tags: pgoyette-compat-0930 pgoyette-compat-0906
1.2 27-Aug-2018 jmcneill

branches: 1.2.2;
Add release target


1.1 24-Aug-2018 jmcneill

Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.2 07-Sep-2018 jmcneill

branches: 1.2.4;
Disable MMU and dcache before jumping to the kernel.


Revision tags: pgoyette-compat-0906
1.1 24-Aug-2018 jmcneill

branches: 1.1.2;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.7 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.6 14-Aug-2022 jmcneill

branches: 1.6.10;
Align output of "version" command.


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
1.5 09-Jan-2021 jmcneill

Flush from kernel start, not the entry point.


1.4 09-Jan-2021 jmcneill

Style fixes, NFCI.


1.3 28-Nov-2020 jmcneill

Add a hook for MD specific info to print in the "ver" command. Use this
to print the value of the current execution level in bootaa64.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base pgoyette-compat-20190127 pgoyette-compat-20190118 pgoyette-compat-1226 pgoyette-compat-1126 pgoyette-compat-1020 pgoyette-compat-0930
1.2 07-Sep-2018 jmcneill

branches: 1.2.4; 1.2.14;
Disable MMU and dcache before jumping to the kernel.


Revision tags: pgoyette-compat-0906
1.1 24-Aug-2018 jmcneill

branches: 1.1.2;
Add MI EFI bootloader and AArch64 glue.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.9 02-Apr-2022 skrll

Update to support EFI runtime outside the kernel virtual address space
by creating an EFI RT pmap that can be activated / deactivated when
required.

Adds support for EFI RT to ARM_MMU_EXTENDED (ASID) 32-bit Arm machines.

On Arm64 the usage of pmapboot_enter is reduced and the mappings are
created much later in the boot process -- now in cpu_startup_hook.
Backward compatiblity for KVA mapped RT from old bootaa64.efi is
maintained.

Adding support to other platforms should be easier as a result.


1.8 06-Oct-2021 jmcneill

Fix bootarm build.


1.7 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


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
1.6 08-Sep-2020 jmcneill

Be explicit about building for little endian. This allows efiboot to be
built with the armv7be toolchain.


1.5 21-Jun-2020 jmcneill

Add module support.


Revision tags: 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
1.4 25-Jan-2020 jmcneill

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.


Revision tags: ad-namecache-base1 ad-namecache-base
1.3 03-Jan-2020 skrll

branches: 1.3.2;
Add -mfloat-abi=soft so that gcc 8 doesn't emit FP instructions. This
fixes bootarm.efi compiled by gcc 8.


Revision tags: phil-wifi-20191119
1.2 23-Sep-2019 christos

Consistently use ${RELEASEDIR}/${RELEASEMACHINE} instead of
${RELEASEDIR}/${MACHINE} (Paul Ripke)


Revision tags: netbsd-9-0-RC1 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.1 30-Mar-2019 jmcneill

branches: 1.1.4; 1.1.6;
Add efiboot support for 32-bit ARM targets.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.2 18-Sep-2024 skrll

Clean and invalidate the full data cache as the armv6_start.S code assumes
that the caches are disabled on entry which armv7_exec_kernel ensures.
When caches are disabled armv6_start.S will invalidate (not clean) the
cache and this can lose u-boot data for the u-boots that now don't
perform their own cache maintenance.

An example of such a u-boot is the banana pro that chuq@ has tried which
has

commit 8b5dea33584261cc5d600614970d1cbed6d99f91
Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Wed Mar 3 14:05:05 2021 +0100

efi_loader: disable GRUB_ARM32_WORKAROUND on ARCH_SUNXI

applied.

Improving things so that the architected caches could remain on would be
better, but that's a much bigger change / set of changes.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-9-4-RELEASE netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base netbsd-9-3-RELEASE thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 netbsd-9-2-RELEASE cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.1 30-Mar-2019 jmcneill

branches: 1.1.4; 1.1.38;
Add efiboot support for 32-bit ARM targets.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.5 18-Sep-2024 skrll

Clean and invalidate the full data cache as the armv6_start.S code assumes
that the caches are disabled on entry which armv7_exec_kernel ensures.
When caches are disabled armv6_start.S will invalidate (not clean) the
cache and this can lose u-boot data for the u-boots that now don't
perform their own cache maintenance.

An example of such a u-boot is the banana pro that chuq@ has tried which
has

commit 8b5dea33584261cc5d600614970d1cbed6d99f91
Author: Heinrich Schuchardt <xypron.glpk@gmx.de>
Date: Wed Mar 3 14:05:05 2021 +0100

efi_loader: disable GRUB_ARM32_WORKAROUND on ARCH_SUNXI

applied.

Improving things so that the architected caches could remain on would be
better, but that's a much bigger change / set of changes.


1.4 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base 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
1.3 28-Nov-2020 jmcneill

branches: 1.3.24;
Add a hook for MD specific info to print in the "ver" command. Use this
to print the value of the current execution level in bootaa64.


Revision tags: netbsd-9-4-RELEASE netbsd-9-3-RELEASE netbsd-9-2-RELEASE netbsd-9-1-RELEASE bouyer-xenpvh-base2 phil-wifi-20200421 bouyer-xenpvh-base1 phil-wifi-20200411 bouyer-xenpvh-base is-mlppp-base phil-wifi-20200406 ad-namecache-base3 netbsd-9-0-RELEASE netbsd-9-0-RC2 ad-namecache-base2 ad-namecache-base1 ad-namecache-base netbsd-9-0-RC1 phil-wifi-20191119 netbsd-9-base phil-wifi-20190609 isaki-audio2-base
1.2 30-Mar-2019 jmcneill

branches: 1.2.4; 1.2.14;
Jump to MARK_ENTRY instead of MARK_START


1.1 30-Mar-2019 jmcneill

Add efiboot support for 32-bit ARM targets.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base
1.3 06-Oct-2021 jmcneill

EFIBOOT_FDT=yes for riscv64 too


1.2 06-Oct-2021 jmcneill

efiboot: Make FDT support optional on a per-arch basis.


Revision tags: thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base cjep_staticlib_x-base
1.1 02-May-2021 jmcneill

branches: 1.1.4;
Add RISC-V 64-bit support.


Revision tags: perseant-exfatfs-base-20250801 netbsd-11-base
1.2 15-Aug-2024 skrll

Allow an MD check in prepare_boot and use it on arm64 (aarch64) to check
that, if a big endian kernel is seen, the CPU is capable of supporting BE
data accesses at EL0 via ID_AA64MMFR0_EL1.BigEnd.


Revision tags: netbsd-10-1-RELEASE perseant-exfatfs-base-20240630 perseant-exfatfs-base netbsd-10-0-RELEASE netbsd-10-0-RC6 netbsd-10-0-RC5 netbsd-10-0-RC4 netbsd-10-0-RC3 netbsd-10-0-RC2 thorpej-ifq-base thorpej-altq-separation-base netbsd-10-0-RC1 netbsd-10-base bouyer-sunxi-drm-base thorpej-i2c-spi-conf2-base thorpej-futex2-base thorpej-cfargs2-base cjep_sun2x-base1 cjep_sun2x-base cjep_staticlib_x-base1 thorpej-i2c-spi-conf-base cjep_staticlib_x-base
1.1 02-May-2021 jmcneill

branches: 1.1.4; 1.1.22;
Add RISC-V 64-bit support.