mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-05 18:41:58 +09:00
x86/efistub: Fix PCI ROM preservation in mixed mode
[ Upstream commit8b94da9255] 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:2c3625cb9f("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>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
fcf78a17bb
commit
91f76271ec
@@ -61,7 +61,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
|
|||||||
rom->data.type = SETUP_PCI;
|
rom->data.type = SETUP_PCI;
|
||||||
rom->data.len = size - sizeof(struct setup_data);
|
rom->data.len = size - sizeof(struct setup_data);
|
||||||
rom->data.next = 0;
|
rom->data.next = 0;
|
||||||
rom->pcilen = pci->romsize;
|
rom->pcilen = romsize;
|
||||||
*__rom = rom;
|
*__rom = rom;
|
||||||
|
|
||||||
status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
|
status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
|
||||||
|
|||||||
Reference in New Issue
Block a user