x86/boot/compressed: Move startup32_load_idt() into .text section
authorArd Biesheuvel <ardb@kernel.org>
Tue, 22 Nov 2022 16:10:11 +0000 (17:10 +0100)
committerBorislav Petkov <bp@suse.de>
Thu, 24 Nov 2022 07:57:41 +0000 (08:57 +0100)
commitc6355995ba471d7ad574174e593192ce805c7e1a
tree169ca4498e04573ddd1d0ea37a97b0a3e8c326dc
parentd73a257f7f86871c3aac24dc20538e3983096647
x86/boot/compressed: Move startup32_load_idt() into .text section

Convert startup32_load_idt() into an ordinary function and move it into
the .text section. This involves turning the rva() immediates into ones
derived from a local label, and preserving/restoring the %ebp and %ebx
as per the calling convention.

Also move the #ifdef to the only existing call site. This makes it clear
that the function call does nothing if support for memory encryption is
not compiled in.

Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/r/20221122161017.2426828-12-ardb@kernel.org
arch/x86/boot/compressed/head_64.S