Home | History | Annotate | Download | only in efiboot
History log of /src/sys/stand/efiboot/exec.c
RevisionDateAuthorComments
 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.
 1.24  14-Jun-2023  rin Use %zd instead of %ld for ssize_t.
 1.23  06-Oct-2021  jmcneill branches: 1.23.4;
efiboot: Make FDT support optional on a per-arch basis.
 1.22  20-Jun-2021  jmcneill Enable the twiddle spinner when loading the kernel, ramdisk images, and
modules.
 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.
 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.
 1.13  25-Jan-2020  jmcneill Hide the twiddle while loading efiboot plist
 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
 1.11  24-Jul-2019  jmcneill branches: 1.11.2;
Add support for simple framebuffers when booting in ACPI mode.
 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.)
 1.9  30-Mar-2019  jmcneill Build fixes for 32-bit targets.
 1.8  28-Oct-2018  jmcneill Make EFI runtime services available to the kernel. Bump version to 1.5.
 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.
 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.
 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.
 1.3.2.5  26-Nov-2018  pgoyette Sync with HEAD, resolve a couple of conflicts
 1.3.2.4  20-Oct-2018  pgoyette Sync with head
 1.3.2.3  30-Sep-2018  pgoyette Ssync with HEAD
 1.3.2.2  06-Sep-2018  pgoyette Sync with HEAD

Resolve a couple of conflicts (result of the uimin/uimax changes)
 1.3.2.1  02-Sep-2018  pgoyette file exec.c was added on branch pgoyette-compat on 2018-09-06 06:56:47 +0000
 1.10.2.4  13-Apr-2020  martin Mostly merge changes from HEAD upto 20200411
 1.10.2.3  08-Apr-2020  martin Merge changes from current as of 20200406
 1.10.2.2  10-Jun-2019  christos Sync with HEAD
 1.10.2.1  21-Apr-2019  christos file exec.c was added on branch phil-wifi on 2019-06-10 22:09:56 +0000
 1.11.2.2  12-Feb-2020  martin Pull up following revision(s) (requested by riastradh in ticket #705):

sys/arch/aarch64/aarch64/aarch64_machdep.c: revision 1.35
sys/stand/efiboot/efifdt.c: revision 1.20
sys/stand/efiboot/efifdt.h: revision 1.7
sys/arch/aarch64/include/machdep.h: revision 1.9
sys/stand/efiboot/efiboot.h: revision 1.11
sys/arch/arm/arm32/arm32_machdep.c: revision 1.129
sys/arch/arm/include/arm32/machdep.h: revision 1.30
sys/stand/efiboot/exec.c: revision 1.12
sys/arch/evbarm/fdt/fdt_machdep.c: revision 1.65
sys/stand/efiboot/version: revision 1.14
sys/stand/efiboot/boot.c: revision 1.19

New function cpu_startup_hook on arm.

Called at end of cpu_startup. Can be defined in, e.g., evbarm to do
additional stuff after cpu_startup. Defined as a weak alias to a
function that does nothing, so optional.
ok jmcneill

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.11.2.1  26-Jan-2020  martin Pull up following revision(s) (requested by jmcneill in ticket #653):

sys/stand/efiboot/prompt.c: revision 1.6
sys/stand/efiboot/boot.c: revision 1.20
sys/stand/efiboot/bootarm/Makefile: revision 1.4
sys/stand/efiboot/efiacpi.c: revision 1.6
sys/stand/efiboot/exec.c: revision 1.13
sys/stand/efiboot/Makefile.efiboot: revision 1.10
sys/stand/efiboot/bootaa64/Makefile: revision 1.7

Fix for disappearing counters on graphics consoles

Hide the twiddle while loading efiboot plist

Clean up the banner so it fits in 80 columns and add some extra details
to the "version" command output.
 1.12.2.1  25-Jan-2020  ad Sync with head.
 1.19.8.1  31-May-2021  cjep sync with head
 1.19.6.3  01-Aug-2021  thorpej Sync with HEAD.
 1.19.6.2  17-Jun-2021  thorpej Sync w/ HEAD.
 1.19.6.1  13-May-2021  thorpej Sync with HEAD.
 1.23.4.2  21-Sep-2024  martin Pull up following revision(s) (requested by rin in ticket #898):

sys/stand/efiboot/exec.c: revision 1.26

When freeing pages, pass page count instead of byte count.
 1.23.4.1  03-Nov-2023  martin Pull up following revision(s) (requested by rin in ticket #451):

sys/stand/efiboot/efiblock.c: revision 1.20
sys/stand/efiboot/exec.c: revision 1.24
sys/stand/efiboot/Makefile.efiboot: revision 1.29
sys/stand/efiboot/boot.c: revision 1.45

Add missing member for terminating sentinel.

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

Use %zd instead of %ld for ssize_t.

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

RSS XML Feed