summaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/efi-stub.c
diff options
context:
space:
mode:
authorArd Biesheuvel <ardb@kernel.org>2022-10-11 17:10:39 +0200
committerArd Biesheuvel <ardb@kernel.org>2022-11-09 12:42:02 +0100
commit732ea9db9d8a6a0444d18ed810cccb2428d8766b (patch)
tree186ea3e313ea11d0d5edae397074828c263e98d6 /drivers/firmware/efi/libstub/efi-stub.c
parentefi: loongarch: Drop exports of unused string routines (diff)
downloadlinux-732ea9db9d8a6a0444d18ed810cccb2428d8766b.tar.xz
linux-732ea9db9d8a6a0444d18ed810cccb2428d8766b.zip
efi: libstub: Move screen_info handling to common code
Currently, arm64, RISC-V and LoongArch rely on the fact that struct screen_info can be accessed directly, due to the fact that the EFI stub and the core kernel are part of the same image. This will change after a future patch, so let's ensure that the screen_info handling is able to deal with this, by adopting the arm32 approach of passing it as a configuration table. While at it, switch to ACPI reclaim memory to hold the screen_info data, which is more appropriate for this kind of allocation. Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Diffstat (limited to 'drivers/firmware/efi/libstub/efi-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/efi-stub.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c
index b55d1009d4c8..8521dc09c6ae 100644
--- a/drivers/firmware/efi/libstub/efi-stub.c
+++ b/drivers/firmware/efi/libstub/efi-stub.c
@@ -47,6 +47,15 @@
static u64 virtmap_base = EFI_RT_VIRTUAL_BASE;
static bool flat_va_mapping = (EFI_RT_VIRTUAL_OFFSET != 0);
+struct screen_info * __weak alloc_screen_info(void)
+{
+ return &screen_info;
+}
+
+void __weak free_screen_info(struct screen_info *si)
+{
+}
+
static struct screen_info *setup_graphics(void)
{
efi_guid_t gop_proto = EFI_GRAPHICS_OUTPUT_PROTOCOL_GUID;