]> git.ipfire.org Git - people/ms/linux.git/commit
arm64: head: tidy up the Image header definition
authorArd Biesheuvel <ardb@kernel.org>
Tue, 17 Nov 2020 12:47:29 +0000 (13:47 +0100)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 17 Nov 2020 16:14:20 +0000 (16:14 +0000)
commit7919385b9fb3cefe495310e5c44ca8a6d9c446e8
tree875d2aa41d96a4b68c68ed2b404791e636577c19
parentb50a3225cdffef43b76b294fa7fb3cd1f32f50d0
arm64: head: tidy up the Image header definition

Even though support for EFI boot remains entirely optional for arm64,
it is unlikely that we will ever be able to repurpose the image header
fields that the EFI loader relies on, i.e., the magic NOP at offset
0x0 and the PE header address at offset 0x3c.

So let's factor out the differences into a 'efi_signature_nop' macro and
a local symbol representing the PE header address, and move the
conditional definitions into efi-header.S, taking into account whether
CONFIG_EFI is enabled or not. While at it, switch to a signature NOP
that behaves more like a NOP, i.e., one that only clobbers the
flags.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Will Deacon <will@kernel.org>
Link: https://lore.kernel.org/r/20201117124729.12642-4-ardb@kernel.org
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/efi-header.S
arch/arm64/kernel/head.S