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
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.
- 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.)
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.
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 :-)
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@.
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.