]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
x86/efistub: Fix PCI ROM preservation in mixed mode
authorMikel Rychliski <mikel@mikelr.com>
Wed, 23 Aug 2023 21:51:58 +0000 (17:51 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 13 Sep 2023 07:47:59 +0000 (09:47 +0200)
commit41b18168d309f422d0106a4674e876686ca4f8c8
tree834e3f6f0d47bc865222aeb788f434c0017103c9
parent84857640c67405eed258c461b3ef909002f1e201
x86/efistub: Fix PCI ROM preservation in mixed mode

[ Upstream commit 8b94da92559f7e403dc7ab81937cc50f949ee2fd ]

preserve_pci_rom_image() was accessing the romsize field in
efi_pci_io_protocol_t directly instead of using the efi_table_attr()
helper. This prevents the ROM image from being saved correctly during a
mixed mode boot.

Fixes: 2c3625cb9fa2 ("efi/x86: Fold __setup_efi_pci32() and __setup_efi_pci64() into one function")
Signed-off-by: Mikel Rychliski <mikel@mikelr.com>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/firmware/efi/libstub/x86-stub.c