Skip to content
Commit 22aa45cb authored by Joerg Roedel's avatar Joerg Roedel Committed by Borislav Petkov
Browse files

x86/efi: Restore Firmware IDT before calling ExitBootServices()

Commit

  79419e13 ("x86/boot/compressed/64: Setup IDT in startup_32 boot path")

introduced an IDT into the 32-bit boot path of the decompressor stub.
But the IDT is set up before ExitBootServices() is called, and some UEFI
firmwares rely on their own IDT.

Save the firmware IDT on boot and restore it before calling into EFI
functions to fix boot failures introduced by above commit.

Fixes: 79419e13

 ("x86/boot/compressed/64: Setup IDT in startup_32 boot path")
Reported-by: default avatarFabio Aiuto <fabioaiuto83@gmail.com>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
Signed-off-by: default avatarBorislav Petkov <bp@suse.de>
Acked-by: default avatarArd Biesheuvel <ardb@kernel.org>
Cc: stable@vger.kernel.org # 5.13+
Link: https://lkml.kernel.org/r/20210820125703.32410-1-joro@8bytes.org
parent 7c60610d
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment