summaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i82810
diff options
context:
space:
mode:
authorKyösti Mälkki <kyosti.malkki@gmail.com>2012-07-27 08:42:20 +0300
committerAnton Kochkov <anton.kochkov@gmail.com>2012-07-27 15:54:08 +0200
commit6ff1d36a4762365cdbc109d0c07778bfdd56dbaf (patch)
tree3770375013ca70a185754533f9b663cd54cd333a /src/northbridge/intel/i82810
parent26e441f5bc381ec0fc476e4f78b4925a400c558c (diff)
downloadcoreboot-6ff1d36a4762365cdbc109d0c07778bfdd56dbaf.tar.xz
Intel and GFXUMA: fix MTRR and use uma_resource()
Commit 2d42b340034ff005693482ef9ca34ce3e0f08371 changed the variable MTRR setup and removed compensation of uma_memory_size in the cacheable memory resources. Since the cacheable region size was no longer divisible by a large power of 2, like 256 MB, this caused excessive use of MTRRs. As first symptoms, slow boot with grub and poor user response. As a solution, register the actual top of low ram with ram_resource(), and do not subtract the UMA/TSEG regions from it. TSEG may require further work as the original did not appear exactly right to begin with. To have UMA as un-cacheable, use uma_resource(). Change-Id: I4ca99b5c2ca4e474296590b3d0c6ef5d09550d80 Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-on: http://review.coreboot.org/1239 Reviewed-by: Anton Kochkov <anton.kochkov@gmail.com> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/northbridge/intel/i82810')
-rw-r--r--src/northbridge/intel/i82810/northbridge.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/northbridge/intel/i82810/northbridge.c b/src/northbridge/intel/i82810/northbridge.c
index 892fc28133..f6d14e0bd2 100644
--- a/src/northbridge/intel/i82810/northbridge.c
+++ b/src/northbridge/intel/i82810/northbridge.c
@@ -93,7 +93,7 @@ static void pci_domain_set_resources(device_t dev)
if (!mc_dev)
return;
- unsigned long tomk;
+ unsigned long tomk, tomk_stolen;
int idx, drp_value;
u8 reg8;
@@ -123,21 +123,22 @@ static void pci_domain_set_resources(device_t dev)
tomk += (unsigned long)(translate_i82810_to_mb[drp_value]);
/* Convert tomk from MB to KB. */
tomk = tomk << 10;
- tomk -= igd_memory;
+ tomk_stolen = tomk - igd_memory;
/* For reserving UMA memory in the memory map */
- uma_memory_base = tomk * 1024ULL;
+ uma_memory_base = tomk_stolen * 1024ULL;
uma_memory_size = igd_memory * 1024ULL;
- printk(BIOS_DEBUG, "Available memory: %ldKB\n", tomk);
+ printk(BIOS_DEBUG, "Available memory: %ldKB\n", tomk_stolen);
/* Report the memory regions. */
idx = 10;
ram_resource(dev, idx++, 0, 640);
ram_resource(dev, idx++, 768, tomk - 768);
+ uma_resource(dev, idx++, uma_memory_base >> 10, uma_memory_size >> 10);
#if CONFIG_WRITE_HIGH_TABLES
/* Leave some space for ACPI, PIRQ and MP tables */
- high_tables_base = (tomk * 1024) - HIGH_MEMORY_SIZE;
+ high_tables_base = (tomk_stolen * 1024) - HIGH_MEMORY_SIZE;
high_tables_size = HIGH_MEMORY_SIZE;
#endif
assign_resources(dev->link_list);