efi: libstub: unify initrd loading between architectures

Use a EFI configuration table to pass the initrd to the core kernel,
instead of per-arch methods. This cleans up the code considerably, and
should make it easier for architectures to get rid of their reliance on
DT for doing EFI boot in the future.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
This commit is contained in:
Ard Biesheuvel
2022-09-16 14:03:06 +02:00
parent a12b78b571
commit f4dc7fffa9
9 changed files with 103 additions and 101 deletions

View File

@@ -1330,6 +1330,11 @@ struct linux_efi_coco_secret_area {
u64 size;
};
struct linux_efi_initrd {
unsigned long base;
unsigned long size;
};
/* Header of a populated EFI secret area */
#define EFI_SECRET_TABLE_HEADER_GUID EFI_GUID(0x1e74f542, 0x71dd, 0x4d66, 0x96, 0x3e, 0xef, 0x42, 0x87, 0xff, 0x17, 0x3b)