Update the FPDT boot performance record's ebs_entry and ebs_exit
fields in bootm_final() to record the time when we're about to
hand off to the operating system.
The timing is recorded just before we start the kernel, after all
device cleanup and before interrupts are disabled, which corresponds
to the ExitBootServices phase in UEFI.
If EFI is used to boot, a further update could be made, but that is
left for later.
Avoid including asm/acpi_table.h on platforms without ACPI. Ad a special
case for the QEMU RISC-V ACPI board.
Series-changes: 2
- Depend on ACPIGEN instead of GENERATE_ACPI_TABLE
- Avoid including asm/acpi_table.h on platforms without ACPI
Co-developed-by: Claude <noreply@anthropic.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
For a fake go, we should tell the event not to actually do anything
irreversable, so pass the flag along.
Move the enum into a separate event_decl.h header file since otherwise
we must include bootm.h which causes a breakage with qemu-ppce500
We also don't want to pull event.h into the tools build, since it uses
types like u8 which are not available outside U-Boot
Signed-off-by: Simon Glass <sjg@chromium.org>
In some cases a board may wish to do some final processing before
starting the OS. An example is the EFI app, which may wish to call
exit-boot-services.
Add an event to permit this.
Series-to: concept
Cover-letter:
boot: Allow lmb-allocation of compression buffer with booti
ARM 'booti' images (as created by Linux 'make Image') typically need to
be compressed. At present the decompression buffer is described by a
pair of environment variables: kernel_comp_addr_r and kernel_comp_size
This is quite inflexible, since the buffer size and location must be
pre-set in the environment, before the OS size is known.
For the EFI app, it is quite difficult to work with a fixed buffer. It
is not in control of the memory map so it may be that the requested
buffer address is not available.
This series updates the boot implementation to allow the variables to
be omitted, with lmb allocations done in this case. This resolves the
problem in the EFI app, with kernels which come from extlinux.conf
When the EFI app loads another app, a similar problem is present, but
with the EFI bootmeth, also resolved in this series.
END
Signed-off-by: Simon Glass <sjg@chromium.org>
Now that ARM's announce_and_cleanup() function includes the same steps
as bootm_final(), just use the latter.
Move over part of a comment which seems useful.
Signed-off-by: Simon Glass <sjg@chromium.org>
Move disabling of interrupts to bootm_final() so it is done for bootm
and EFI boot paths. Drop the now-duplicate calls.
Signed-off-by: Simon Glass <sjg@chromium.org>
Add this call to the bootm_final() function, dropping it from RISC-V
Add a flag to ensure that cleanup_before_linux() is not called when
booting an EFI app.
Signed-off-by: Simon Glass <sjg@chromium.org>
Make use of this function, adding some pieces needed by RISC-V
Drop the udc_disconnect() from EFI_LOADER since it is now done in
bootm_final()
Signed-off-by: Simon Glass <sjg@chromium.org>
The x86 code in bootm_announce_and_cleanup() is very similar to the new
bootm_final() function, so just use the latter. Move over a useful
comment.
Signed-off-by: Simon Glass <sjg@chromium.org>
There are various functions which announce that booting is imminent and
do related preparation. Most of these are arch-specific.
In practice, most archs do the a similar thing. It would be better to
have a common function, with perhaps some events for things that are
really arch- and board-specific.
Create a new function for this. For now, nothing uses it.
Signed-off-by: Simon Glass <sjg@chromium.org>