aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/firmware/efi/libstub/arm32-stub.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/firmware/efi/libstub/arm32-stub.c')
-rw-r--r--drivers/firmware/efi/libstub/arm32-stub.c37
1 files changed, 37 insertions, 0 deletions
diff --git a/drivers/firmware/efi/libstub/arm32-stub.c b/drivers/firmware/efi/libstub/arm32-stub.c
index 6f42be4d0084..e1f0b28e1dcb 100644
--- a/drivers/firmware/efi/libstub/arm32-stub.c
+++ b/drivers/firmware/efi/libstub/arm32-stub.c
@@ -26,6 +26,43 @@ efi_status_t check_platform_features(efi_system_table_t *sys_table_arg)
26 return EFI_SUCCESS; 26 return EFI_SUCCESS;
27} 27}
28 28
29static efi_guid_t screen_info_guid = LINUX_EFI_ARM_SCREEN_INFO_TABLE_GUID;
30
31struct screen_info *alloc_screen_info(efi_system_table_t *sys_table_arg)
32{
33 struct screen_info *si;
34 efi_status_t status;
35
36 /*
37 * Unlike on arm64, where we can directly fill out the screen_info
38 * structure from the stub, we need to allocate a buffer to hold
39 * its contents while we hand over to the kernel proper from the
40 * decompressor.
41 */
42 status = efi_call_early(allocate_pool, EFI_RUNTIME_SERVICES_DATA,
43 sizeof(*si), (void **)&si);
44
45 if (status != EFI_SUCCESS)
46 return NULL;
47
48 status = efi_call_early(install_configuration_table,
49 &screen_info_guid, si);
50 if (status == EFI_SUCCESS)
51 return si;
52
53 efi_call_early(free_pool, si);
54 return NULL;
55}
56
57void free_screen_info(efi_system_table_t *sys_table_arg, struct screen_info *si)
58{
59 if (!si)
60 return;
61
62 efi_call_early(install_configuration_table, &screen_info_guid, NULL);
63 efi_call_early(free_pool, si);
64}
65
29efi_status_t handle_kernel_image(efi_system_table_t *sys_table, 66efi_status_t handle_kernel_image(efi_system_table_t *sys_table,
30 unsigned long *image_addr, 67 unsigned long *image_addr,
31 unsigned long *image_size, 68 unsigned long *image_size,