aboutsummaryrefslogtreecommitdiff
path: root/src/northbridge/intel/i82830
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/i82830
parent26e441f5bc381ec0fc476e4f78b4925a400c558c (diff)
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/i82830')
-rw-r--r--src/northbridge/intel/i82830/northbridge.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/northbridge/intel/i82830/northbridge.c b/src/northbridge/intel/i82830/northbridge.c
index 4ada4d7c6a..649a203aca 100644
--- a/src/northbridge/intel/i82830/northbridge.c
+++ b/src/northbridge/intel/i82830/northbridge.c
@@ -73,7 +73,7 @@ static void pci_domain_set_resources(device_t dev)
if (!mc_dev)
return;
- unsigned long tomk;
+ unsigned long tomk, tomk_stolen;
int idx;
if (CONFIG_VIDEO_MB == 512) {
@@ -89,24 +89,24 @@ static void pci_domain_set_resources(device_t dev)
* i.e. 1 means 32MB.
*/
tomk = ((unsigned long)pci_read_config8(mc_dev, DRB + 3)) << 15;
- 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, 256);
- ram_resource(dev, idx++, 1024, tomk - 1024);
+ ram_resource(dev, idx++, 768, tomk - 768);
+ uma_resource(dev, idx++, uma_memory_base >> 10, uma_memory_size >> 10);
assign_resources(dev->link_list);
#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
}