From 3e0f35b23a132e51bb37c81b60f5aa2bb576ec1d Mon Sep 17 00:00:00 2001 From: Alicja Michalska Date: Thu, 23 Jan 2025 19:41:32 +0100 Subject: [PATCH] device/Kconfig: Make option to allocate above 4G appear in Kconfig Previously only tested on server platforms - it wasn't working correctly on consumer platforms due to missing boolean. This patch fixes it, which makes resource allocator use uint64 instead of uint32. Thanks to that, modern GPUs like Intel Arc or Radeon RX now work correctly with ReBAR enabled, and correctly initialize the framebuffer in payload (i.e EDK2) after initializing the OpROMs. Example of issue caused by resource allocator using uint32 (Intel Arc A580): [ERROR] Resource didn't fit!!! [ERROR] PCI: 00:01:00.0 10 prefmem64 size: 0x0000800000 not assigned [ERROR] PCI: 00:03:00.0 18 prefmem64 size: 0x0200000000 not assigned (Followed by Linux reporting that BAR space was limited to 256MB, which severely hindered the performance). TESTed on Intel Tiger Lake-H (mb/erying/tgl) with Intel Arc A580 and AMD Radeon RX7800XT. Change-Id: Ia17b3312016409d8fd6bcce4321481a7b7e35ce5 Signed-off-by: Alicja Michalska Reviewed-on: https://review.coreboot.org/c/coreboot/+/86131 Tested-by: build bot (Jenkins) Reviewed-by: Maximilian Brune Reviewed-by: Matt DeVillier --- src/device/Kconfig | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/device/Kconfig b/src/device/Kconfig index af3fe80a59..bfb38b442f 100644 --- a/src/device/Kconfig +++ b/src/device/Kconfig @@ -1005,10 +1005,15 @@ config RESOURCE_ALLOCATION_TOP_DOWN config ALWAYS_ALLOW_ABOVE_4G_ALLOCATION bool + prompt "Extend resource window for PCIe devices above 4G" if ARCH_X86 default n if ARCH_X86 default y help - Don't limit mem resources to 4G, but to their actual limit. + This option extends PCIe resource allocation beyond the 4G limit. + Required for modern graphics cards that support resizable BAR, such as + Intel Arc or AMD RX series. + Please keep in mind that not all payloads support it + (i.e: LinuxBoot and EDK2 do, GRUB doesn't). config XHCI_UTILS def_bool n