soc/intel/common: Ignore prefetch PCI attribute for IGD BAR0
From Meteorlake, IGD BAR0(GTTMMADR) is changed to 64bit prefetchable. Due to the prefetchable attribute, resource allocation for IGD BAR0 is assigned WC memory and it causes kernel driver failure. For avoiding kernel driver failure, ignore prefetch PCI attribute for IGD BAR0 to assign UC memory. We're working on publishing below information. - IGD BAR0(GTTMMADR) is changed to 64bit prefetchable BAR - GTTMMADDR BAR should be always mapped as UC memory although marked Pre-fetchable. BUG=b:241746156 TEST=boot to OS and check guc driver loading successful Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com> Change-Id: I76d816d51f32f99c5ebcca54f13ec6d4ba77bba5 Reviewed-on: https://review.coreboot.org/c/coreboot/+/66403 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subratabanik@google.com> Reviewed-by: Tarun Tuli <taruntuli@google.com>
This commit is contained in:
parent
9969f4b609
commit
91bd6e19c9
|
@ -29,4 +29,11 @@ config SOC_INTEL_GFX_FRAMEBUFFER_OFFSET
|
|||
with GTT_SIZE value. On SoC platform where PCI config offset 0x18 points
|
||||
to the GMADR directly can use the default value 0x0 without any override.
|
||||
|
||||
config SOC_INTEL_GFX_NON_PREFETCHABLE_MMIO
|
||||
bool
|
||||
default n
|
||||
help
|
||||
Ignore BAR0(offset 0x10)'s pre-fetchable attribute to use non-prefetchable
|
||||
MMIO to fix OS display driver failure.
|
||||
|
||||
endif
|
||||
|
|
|
@ -164,8 +164,19 @@ void graphics_gtt_rmw(unsigned long reg, uint32_t andmask, uint32_t ormask)
|
|||
graphics_gtt_write(reg, val);
|
||||
}
|
||||
|
||||
static void graphics_dev_read_resources(struct device *dev)
|
||||
{
|
||||
pci_dev_read_resources(dev);
|
||||
|
||||
if (CONFIG(SOC_INTEL_GFX_NON_PREFETCHABLE_MMIO)) {
|
||||
struct resource *res_bar0 = find_resource(dev, PCI_BASE_ADDRESS_0);
|
||||
if (res_bar0->flags & IORESOURCE_PREFETCH)
|
||||
res_bar0->flags &= ~IORESOURCE_PREFETCH;
|
||||
}
|
||||
}
|
||||
|
||||
static const struct device_operations graphics_ops = {
|
||||
.read_resources = pci_dev_read_resources,
|
||||
.read_resources = graphics_dev_read_resources,
|
||||
.set_resources = pci_dev_set_resources,
|
||||
.enable_resources = pci_dev_enable_resources,
|
||||
.init = gma_init,
|
||||
|
|
Loading…
Reference in New Issue