summaryrefslogtreecommitdiff
path: root/src/include/device/device.h
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2012-07-26 23:51:20 +0300
committerAnton Kochkov <anton.kochkov@gmail.com>2012-08-01 10:57:17 +0200
commit1ec5e744c63938aa75e80e8d7548d05e998660a2 (patch)
tree237dca4e11c4f549bf31aa3c5a8a4f584fe52fa7 /src/include/device/device.h
parent51676b14e8cfd5bbabf487f659f11704f17f6d0f (diff)
downloadcoreboot-1ec5e744c63938aa75e80e8d7548d05e998660a2.tar.xz
Intel Sandybridge: add reserved memory as resources
Reserved memory resources will get removed from memory table at the end of write_coreboot_table(), Change-Id: I02711b4be4f25054bd3361295d8d4dc996b2eb3e Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/1372 Tested-by: build bot (Jenkins) Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com>
Diffstat (limited to 'src/include/device/device.h')
-rw-r--r--src/include/device/device.h12
1 files changed, 10 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);