[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PULL 4/5] Revert "acpi/gpex: Inform os to keep firmware resource map"
From: |
Michael S. Tsirkin |
Subject: |
[PULL 4/5] Revert "acpi/gpex: Inform os to keep firmware resource map" |
Date: |
Tue, 3 Aug 2021 16:52:14 -0400 |
This reverts commit 0cf8882fd06ba0aeb1e90fa6f23fce85504d7e14.
Which this commit, with aarch64 when using efi PCI devices with IO ports
do not work. The reason is that EFI creates I/O port mappings below
0x1000 (in fact, at 0). However Linux, for legacy reasons, does not
support I/O ports <= 0x1000 on PCI, so the I/O assignment created by EFI
is rejected.
EFI creates the mappings primarily for itself, and up until DSM #5
started to be enforced, all PCI resource allocations that existed at
boot were ignored by Linux and recreated from scratch.
Also, the commit in question looks dubious - it seems unlikely that
Linux would fail to create a resource tree. What does
happen is that BARs get moved around, which may cause trouble in some
cases: for instance, Linux had to add special code to the EFI framebuffer
driver to copy with framebuffer BARs being relocated.
DSM #5 has a long history of debate and misinterpretation.
Link: https://lore.kernel.org/r/20210724185234.GA2265457@roeck-us.net/
Fixes: 0cf8882fd06 ("acpi/gpex: Inform os to keep firmware resource map")
Reported-by: Guenter Roeck <linux@roeck-us.net>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Tested-by: Guenter Roeck <linux@roeck-us.net>
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
---
hw/pci-host/gpex-acpi.c | 20 ++------------------
1 file changed, 2 insertions(+), 18 deletions(-)
diff --git a/hw/pci-host/gpex-acpi.c b/hw/pci-host/gpex-acpi.c
index 0f01f13a6e..e7e162a00a 100644
--- a/hw/pci-host/gpex-acpi.c
+++ b/hw/pci-host/gpex-acpi.c
@@ -112,26 +112,10 @@ static void acpi_dsdt_add_pci_osc(Aml *dev)
UUID = aml_touuid("E5C937D0-3553-4D7A-9117-EA4D19C3434D");
ifctx = aml_if(aml_equal(aml_arg(0), UUID));
ifctx1 = aml_if(aml_equal(aml_arg(2), aml_int(0)));
- uint8_t byte_list[] = {
- 0x1 << 0 /* support for functions other than function 0 */ |
- 0x1 << 5 /* support for function 5 */
- };
- buf = aml_buffer(ARRAY_SIZE(byte_list), byte_list);
+ uint8_t byte_list[1] = {1};
+ buf = aml_buffer(1, byte_list);
aml_append(ifctx1, aml_return(buf));
aml_append(ifctx, ifctx1);
-
- /*
- * PCI Firmware Specification 3.1
- * 4.6.5. _DSM for Ignoring PCI Boot Configurations
- */
- /* Arg2: Function Index: 5 */
- ifctx1 = aml_if(aml_equal(aml_arg(2), aml_int(5)));
- /*
- * 0 - The operating system must not ignore the PCI configuration that
- * firmware has done at boot time.
- */
- aml_append(ifctx1, aml_return(aml_int(0)));
- aml_append(ifctx, ifctx1);
aml_append(method, ifctx);
byte_list[0] = 0;
--
MST
- [PULL 0/5] pc,pci: bugfixes, Michael S. Tsirkin, 2021/08/03
- [PULL 1/5] hw/pcie-root-port: Fix hotplug for PCI devices requiring IO, Michael S. Tsirkin, 2021/08/03
- [PULL 2/5] acpi: x86: pcihp: add support hotplug on multifunction bridges, Michael S. Tsirkin, 2021/08/03
- [PULL 3/5] arm/acpi: allow DSDT changes, Michael S. Tsirkin, 2021/08/03
- [PULL 4/5] Revert "acpi/gpex: Inform os to keep firmware resource map",
Michael S. Tsirkin <=
- [PULL 5/5] Drop _DSM 5 from expected DSDTs on ARM, Michael S. Tsirkin, 2021/08/03
- Re: [PULL 0/5] pc,pci: bugfixes, Peter Maydell, 2021/08/04