History log of /netbsd-current/sys/stand/efiboot/efifdt.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.35 14-Aug-2022 jmcneill

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.


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


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


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


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


# 1.29 21-May-2021 jmcneill

Disable ACPI support when booting big endian kernels.


Revision tags: cjep_staticlib_x-base thorpej-i2c-spi-conf-base thorpej-cfargs-base thorpej-futex-base
# 1.28 19-Dec-2020 skrll

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.


# 1.28 19-Dec-2020 skrll

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


Revision tags: thorpej-futex-base
# 1.27 22-Oct-2020 jmcneill

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.


# 1.27 22-Oct-2020 jmcneill

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.


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


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


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


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


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


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


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


# 1.17 25-Jul-2019 skrll

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.


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


# 1.15 21-Apr-2019 thorpej

- 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.