Now that the stub code is unified, switch over to it, dropping the
individual efi_main() functions.
Series-to: concept
Cover-letter:
efi: Unify the scripts and start-up code
We have two scripts which run QEMU, one for EFI and one for bare metal.
They have similar options so it seems reasonable to try to unify them a
bit. This series creates a common file and adjusts arguments so they are
consistent across both scripts.
The EFI app for ARM and x86 have different start-up code but in fact
the code is quiet similar. This series creates a new common main
program, called efi_main_common() which is used for both architectures.
The small number of differences are handled in arch-specific code.
END
Fill in the required helper functions and call efi_main_common() to
do everything else.
Delete the old efi_main() function.
Signed-off-by: Simon Glass <sjg@chromium.org>
At present x86 and ARM have different implementations, but they are
similar enough that it is not too hard to unify them.
Create a new common function, with arch-specific pieces at the start
(setting up the address to which to copy U-Boot) and end (to jump to
U-Boot).
For now, nothing uses this code.
Signed-off-by: Simon Glass <sjg@chromium.org>
The x86 and ARM implementations use a different variable for the same
thing, just inverted.
Invent a third name for this, adjust both files to use it and store it
in the common stub.c file.
Signed-off-by: Simon Glass <sjg@chromium.org>
When running U-Boot as an EFI payload with CONFIG_EFI_STUB, the reserved
regions from the previous stage EFI bootloader should be carried over
since they may not fully align with the reserved-memory regions in
devicetree.
Implement a helper to map these pages when the EFI subsystem starts up.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Introduce two new helpers dram_init_banksize_from_efi() and
of_populate_from_efi(). These populate the DRAM bank info and simplefb
framebuffer OF node respectively using the EFI table populated by the
EFI stub.
dram_init_banksize_from_efi() is directly moved from the x86 payload
code to make it available for other boards.
Populating the simplefb node allows for an easy way to bring up video
without the full heft of VIDEO_EFI which is not particularly well-suited
to ARM.
Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
Avoid changing the devicetree with the EFI app; fix build error on x86:
Signed-off-by: Simon Glass <sjg@chromium.org>