efi_pe_entry
If the kernel is booted in 64-bit mode on a 32-bit EFI firmware, efi_pe_entry is called from startup_64_mixed_mode.
The signature of efi_pe_entry is
efi_status_t __efiapi efi_pe_entry(
efi_handle_t handle,
efi_system_table_t *sys_table_arg
)
Among others,
efi_pe_entry creates a
boot_params struct (because this is expected to be passed in the x86 boot code) and copies the fields of
jump and above of the setup header from the «second sector» (of
bzImage) to this
boot_params and fills a few other values in the struct:
-
root_flags = 1
-
vid_mode = 0xffff
-
boot_flag = 0xAA55
-
type_of_laoder = 0x21
-
cmd_line_ptr
-
ramdisk_image = 0
-
ramdisk_size = 0
-
setup_data = 0
When the struct is set up, it calls
efi_stub_entry and passes the struct to it.
In earlier releases (when exactly did it change?),
efi_stub_entry was defined as
SYM_FUNC_ALIAS for
In a mixed environment, efi_pe_entry is called from startup_64_mixed_mode.
Note: drivers/firmware/libstub/efi-stub-entry.c defines an efi_pe_entry function to be used for ARM, arm64, RISC-v and LoongArch.