From c3756ade6f83c42f36640a8fdf1dd118d2e4ab30 Mon Sep 17 00:00:00 2001 From: Lukas Wunner Date: Sun, 11 Mar 2018 10:20:51 +0100 Subject: [PATCH] x86/efi: Hide Nvidia HDA controller This happens to work because the Nvidia GPU is the only PCI device on my machine with a ROM. It's hackish because only the 64-bit code path is changed and it doesn't read-modify-write register 0x488, but instead blindly writes 0. Signed-off-by: Lukas Wunner --- arch/x86/boot/compressed/eboot.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c index e56dbc67e837..67ac29743243 100644 --- a/arch/x86/boot/compressed/eboot.c +++ b/arch/x86/boot/compressed/eboot.c @@ -223,6 +223,7 @@ __setup_efi_pci64(efi_pci_io_protocol_64 *pci, struct pci_setup_rom **__rom) efi_status_t status; unsigned long size; uint64_t attributes; + u32 buf = 0; status = efi_early->call(pci->attributes, pci, EfiPciIoAttributeOperationGet, 0, @@ -270,6 +271,10 @@ __setup_efi_pci64(efi_pci_io_protocol_64 *pci, struct pci_setup_rom **__rom) goto free_struct; memcpy(rom->romdata, pci->romimage, pci->romsize); + + status = efi_early->call(pci->pci.write, pci, EfiPciIoWidthUint32, + 0x488, 1, &buf); + return status; free_struct: -- 2.16.2