OSDN Git Service

efi/x86: Decompress at start of PE image load address
authorArvind Sankar <nivedita@alum.mit.edu>
Sun, 8 Mar 2020 08:08:47 +0000 (09:08 +0100)
committerIngo Molnar <mingo@kernel.org>
Sun, 8 Mar 2020 08:58:19 +0000 (09:58 +0100)
commit1887c9b653f99577c0f8ec413b0921a32b6129e2
treea6a31605952088bd1a3aeceab795d0d96e980153
parent8ef44be393113dca5cece65bc142ebb8ef013af0
efi/x86: Decompress at start of PE image load address

When booted via PE loader, define image_offset to hold the offset of
startup_32() from the start of the PE image, and use it as the start of
the decompression buffer.

[ mingo: Fixed the grammar in the comments. ]

Signed-off-by: Arvind Sankar <nivedita@alum.mit.edu>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Ingo Molnar <mingo@kernel.org>
Link: https://lore.kernel.org/r/20200303221205.4048668-3-nivedita@alum.mit.edu
Link: https://lore.kernel.org/r/20200308080859.21568-17-ardb@kernel.org
arch/x86/boot/compressed/head_32.S
arch/x86/boot/compressed/head_64.S
drivers/firmware/efi/libstub/x86-stub.c