arm64: efi: clean up Image header after PE header has been split off
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 23 Mar 2017 19:00:47 +0000 (19:00 +0000)
committerCatalin Marinas <catalin.marinas@arm.com>
Tue, 4 Apr 2017 16:50:28 +0000 (17:50 +0100)
After having split off the PE header, clean up the bits that remain:
use .long consistently, merge two adjacent #ifdef CONFIG_EFI blocks,
fix the offset of the PE header pointer and remove the redundant .align
that follows it.

Also, since we will be eliminating all open coded constants from the
EFI header in subsequent patches, let's replace the open coded "ARM\x64"
magic number with its .ascii equivalent.

No changes to the resulting binary image are intended.

Acked-by: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
arch/arm64/kernel/head.S

index c1977bed01db27cb9954b353770ad69102e8cabd..6d49e716bf405c8c298f445e2b98d21759dc3c82 100644 (file)
@@ -91,20 +91,14 @@ _head:
        .quad   0                               // reserved
        .quad   0                               // reserved
        .quad   0                               // reserved
-       .byte   0x41                            // Magic number, "ARM\x64"
-       .byte   0x52
-       .byte   0x4d
-       .byte   0x64
+       .ascii  "ARM\x64"                       // Magic number
 #ifdef CONFIG_EFI
        .long   pe_header - _head               // Offset to the PE header.
-#else
-       .word   0                               // reserved
-#endif
 
-#ifdef CONFIG_EFI
-       .align 3
 pe_header:
        __EFI_PE_HEADER
+#else
+       .long   0                               // reserved
 #endif
 
        __INIT