The 32-bit EFI handover entry point requires segments to be setup in the same way as for the regular 32-bit boot. Signed-off-by: Arvind Sankar <nivedita@xxxxxxxxxxxx> --- Documentation/x86/boot.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Documentation/x86/boot.rst b/Documentation/x86/boot.rst index c9c201596c3e..3e13b7d57271 100644 --- a/Documentation/x86/boot.rst +++ b/Documentation/x86/boot.rst @@ -1412,6 +1412,12 @@ from the boot media and jump to the EFI handover protocol entry point which is hdr->handover_offset bytes from the beginning of startup_{32,64}. +For the 32-bit handover entry point, the GDT and segments must be setup as for +the 32-bit boot protocol, i.e. a GDT must be loaded with the descriptors for +selectors __BOOT_CS(0x10) and __BOOT_DS(0x18); both descriptors must be 4G flat +segment; __BOOT_CS must have execute/read permission, and __BOOT_DS must have +read/write permission; CS must be __BOOT_CS and DS, ES, SS must be __BOOT_DS. + The function prototype for the handover entry point looks like this:: efi_main(void *handle, efi_system_table_t *table, struct boot_params *bp) -- 2.24.1