OSDN Git Service

efi/x86: Add true mixed mode entry point into .compat section
authorArd Biesheuvel <ardb@kernel.org>
Wed, 12 Feb 2020 11:18:17 +0000 (12:18 +0100)
committerArd Biesheuvel <ardb@kernel.org>
Sun, 23 Feb 2020 20:59:42 +0000 (21:59 +0100)
commit97aa276579b28b86f4a3e235b50762c0191c2ac3
tree3a596783c9cb995088e7d2b6c6c815150e0cfff9
parent17054f492dfd4d91e093ebb87013807812ec42a4
efi/x86: Add true mixed mode entry point into .compat section

Currently, mixed mode is closely tied to the EFI handover protocol
and relies on intimate knowledge of the bootparams structure, setup
header etc, all of which are rather byzantine and entirely specific
to x86.

Even though no other EFI supported architectures are currently known
that could support something like mixed mode, it still makes sense to
abstract a bit from this, and make it part of a generic Linux on EFI
boot protocol.

To that end, add a .compat section to the mixed mode binary, and populate
it with the PE machine type and entry point address, allowing firmware
implementations to match it to their native machine type, and invoke
non-native binaries using a secondary entry point.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
arch/x86/boot/Makefile
arch/x86/boot/header.S
arch/x86/boot/tools/build.c