Skip to content

Commit 57648ad

Browse files
ardbiesheuvelIngo Molnar
authored andcommitted
efi/x86: Preserve %ebx correctly in efi_set_virtual_address_map()
Commit: 59f2a61 ("efi: Add 'runtime' pointer to struct efi") modified the assembler routine called by efi_set_virtual_address_map(), to grab the 'runtime' EFI service pointer while running with paging disabled (which is tricky to do in C code) After the change, register %ebx is not restored correctly, resulting in all kinds of weird behavior, so fix that. Reported-by: Guenter Roeck <[email protected]> Tested-by: Guenter Roeck <[email protected]> Signed-off-by: Ard Biesheuvel <[email protected]> Signed-off-by: Ingo Molnar <[email protected]> Link: https://lore.kernel.org/r/[email protected] Link: https://lore.kernel.org/r/[email protected]
1 parent dd09fad commit 57648ad

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/platform/efi/efi_stub_32.S

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ SYM_FUNC_START(efi_call_svam)
5454
orl $0x80000000, %edx
5555
movl %edx, %cr0
5656

57-
pop %ebx
57+
movl 16(%esp), %ebx
5858
leave
5959
ret
6060
SYM_FUNC_END(efi_call_svam)

0 commit comments

Comments
 (0)