Skip to content

Commit 8b94da9

Browse files
mikelrardbiesheuvel
authored andcommitted
x86/efistub: Fix PCI ROM preservation in mixed mode
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: 2c3625c ("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>
1 parent 06c2afb commit 8b94da9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/firmware/efi/libstub/x86-stub.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
7272
rom->data.type = SETUP_PCI;
7373
rom->data.len = size - sizeof(struct setup_data);
7474
rom->data.next = 0;
75-
rom->pcilen = pci->romsize;
75+
rom->pcilen = romsize;
7676
*__rom = rom;
7777

7878
status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,

0 commit comments

Comments
 (0)