diff options
Diffstat (limited to 'src/include/device')
-rw-r--r-- | src/include/device/device.h | 12 | ||||
-rw-r--r-- | src/include/device/resource.h | 1 |
2 files changed, 11 insertions, 2 deletions
diff --git a/src/include/device/device.h b/src/include/device/device.h index 1515b45e02..eaf84c6d0a 100644 --- a/src/include/device/device.h +++ b/src/include/device/device.h @@ -173,17 +173,25 @@ unsigned int scan_static_bus(device_t bus, unsigned int max); void fixed_mem_resource(device_t dev, unsigned long index, unsigned long basek, unsigned long sizek, unsigned long type); + +/* It is the caller's responsibility to adjust regions such that ram_resource() + * and mmio_resource() do not overlap. + * + * Current MTRR setup creates exclusive uncacheable holes for uma_resource() + * only and these are allowed to overlap any ram_resource(). This approach + * is used for all UMA except Intel Sandy/IvyBridge. + */ #define ram_resource(dev, idx, basek, sizek) \ fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_CACHEABLE) #define bad_ram_resource(dev, idx, basek, sizek) \ - fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_RESERVE | IORESOURCE_CACHEABLE ) + fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_RESERVE | IORESOURCE_IGNORE_MTRR) #define uma_resource(dev, idx, basek, sizek) \ fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_RESERVE | IORESOURCE_UMA_FB) #define mmio_resource(dev, idx, basek, sizek) \ - fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_RESERVE) + fixed_mem_resource(dev, idx, basek, sizek, IORESOURCE_RESERVE | IORESOURCE_IGNORE_MTRR) void tolm_test(void *gp, struct device *dev, struct resource *new); u32 find_pci_tolm(struct bus *bus); diff --git a/src/include/device/resource.h b/src/include/device/resource.h index e667f91c9d..c28ada5242 100644 --- a/src/include/device/resource.h +++ b/src/include/device/resource.h @@ -21,6 +21,7 @@ */ #define IORESOURCE_BRIDGE 0x00080000 /* The IO resource has a bus below it. */ #define IORESOURCE_UMA_FB 0x00100000 /* UMA framebuffer */ +#define IORESOURCE_IGNORE_MTRR 0x00200000 /* The resource does not affect MTRR setup. */ #define IORESOURCE_RESERVE 0x10000000 /* The resource needs to be reserved in the coreboot table */ #define IORESOURCE_STORED 0x20000000 /* The IO resource assignment has been stored in the device */ |