* [PATCH] x86/efistub: Fix PCI ROM preservation in mixed mode
@ 2023-08-23 21:51 Mikel Rychliski
2023-08-24 9:36 ` Ard Biesheuvel
0 siblings, 1 reply; 2+ messages in thread
From: Mikel Rychliski @ 2023-08-23 21:51 UTC (permalink / raw)
To: Ard Biesheuvel, Ingo Molnar; +Cc: Mikel Rychliski, linux-efi, linux-kernel
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>
---
drivers/firmware/efi/libstub/x86-stub.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
index e976288728e9..2fee52ed335d 100644
--- a/drivers/firmware/efi/libstub/x86-stub.c
+++ b/drivers/firmware/efi/libstub/x86-stub.c
@@ -72,7 +72,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
rom->data.type = SETUP_PCI;
rom->data.len = size - sizeof(struct setup_data);
rom->data.next = 0;
- rom->pcilen = pci->romsize;
+ rom->pcilen = romsize;
*__rom = rom;
status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
--
2.35.3
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] x86/efistub: Fix PCI ROM preservation in mixed mode
2023-08-23 21:51 [PATCH] x86/efistub: Fix PCI ROM preservation in mixed mode Mikel Rychliski
@ 2023-08-24 9:36 ` Ard Biesheuvel
0 siblings, 0 replies; 2+ messages in thread
From: Ard Biesheuvel @ 2023-08-24 9:36 UTC (permalink / raw)
To: Mikel Rychliski; +Cc: Ingo Molnar, linux-efi, linux-kernel
On Wed, 23 Aug 2023 at 23:53, Mikel Rychliski <mikel@mikelr.com> wrote:
>
> 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>
Thanks, I've queued this up as a fix.
> ---
> drivers/firmware/efi/libstub/x86-stub.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/firmware/efi/libstub/x86-stub.c b/drivers/firmware/efi/libstub/x86-stub.c
> index e976288728e9..2fee52ed335d 100644
> --- a/drivers/firmware/efi/libstub/x86-stub.c
> +++ b/drivers/firmware/efi/libstub/x86-stub.c
> @@ -72,7 +72,7 @@ preserve_pci_rom_image(efi_pci_io_protocol_t *pci, struct pci_setup_rom **__rom)
> rom->data.type = SETUP_PCI;
> rom->data.len = size - sizeof(struct setup_data);
> rom->data.next = 0;
> - rom->pcilen = pci->romsize;
> + rom->pcilen = romsize;
> *__rom = rom;
>
> status = efi_call_proto(pci, pci.read, EfiPciIoWidthUint16,
> --
> 2.35.3
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2023-08-24 9:37 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-08-23 21:51 [PATCH] x86/efistub: Fix PCI ROM preservation in mixed mode Mikel Rychliski
2023-08-24 9:36 ` Ard Biesheuvel
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.