From 355ce38dc2891c491387707ffe2e4e802ce4e864 Mon Sep 17 00:00:00 2001 From: Paul Menzel Date: Fri, 30 May 2014 13:58:59 +0200 Subject: northbridge/intel/i945: Add define for register `BSM` and use it MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a define for the register Base of Stolen Memory (BSM) and use it. Change-Id: I5b1df4e088d88344fac8cd8d218e76b08a885f58 Signed-off-by: Paul Menzel Reviewed-on: http://review.coreboot.org/5884 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki --- src/northbridge/intel/i945/i945.h | 2 ++ src/northbridge/intel/i945/northbridge.c | 2 +- src/northbridge/intel/i945/ram_calc.c | 2 +- 3 files changed, 4 insertions(+), 2 deletions(-) (limited to 'src/northbridge') diff --git a/src/northbridge/intel/i945/i945.h b/src/northbridge/intel/i945/i945.h index 862af2a256..d4d35a2fa7 100644 --- a/src/northbridge/intel/i945/i945.h +++ b/src/northbridge/intel/i945/i945.h @@ -62,6 +62,8 @@ #define BOARD_DEVEN ( DEVEN_D0F0 | DEVEN_D2F0 | DEVEN_D2F1 ) #endif +#define BSM 0x5c + #define PAM0 0x90 #define PAM1 0x91 #define PAM2 0x92 diff --git a/src/northbridge/intel/i945/northbridge.c b/src/northbridge/intel/i945/northbridge.c index 180ffde4c2..99b16de33a 100644 --- a/src/northbridge/intel/i945/northbridge.c +++ b/src/northbridge/intel/i945/northbridge.c @@ -97,7 +97,7 @@ static void pci_domain_set_resources(device_t dev) printk(BIOS_DEBUG, "pci_tolm: 0x%x\n", pci_tolm); printk(BIOS_SPEW, "Base of stolen memory: 0x%08x\n", - pci_read_config32(dev_find_slot(0, PCI_DEVFN(2, 0)), 0x5c)); + pci_read_config32(dev_find_slot(0, PCI_DEVFN(2, 0)), BSM)); tolud = pci_read_config8(dev_find_slot(0, PCI_DEVFN(0, 0)), 0x9c); printk(BIOS_SPEW, "Top of Low Used DRAM: 0x%08x\n", tolud << 24); diff --git a/src/northbridge/intel/i945/ram_calc.c b/src/northbridge/intel/i945/ram_calc.c index 4ece5402fb..51eb0ff463 100644 --- a/src/northbridge/intel/i945/ram_calc.c +++ b/src/northbridge/intel/i945/ram_calc.c @@ -30,7 +30,7 @@ unsigned long get_top_of_ram(void) if (pci_read_config8(PCI_DEV(0, 0x0, 0), DEVEN) & ((1 << 4) | (1 << 3))) { /* IGD enabled, get top of Memory from BSM register */ - tom = pci_read_config32(PCI_DEV(0,2,0), 0x5c); + tom = pci_read_config32(PCI_DEV(0,2,0), BSM); } else { tom = (pci_read_config8(PCI_DEV(0,0,0), TOLUD) & 0xf7) << 24; } -- cgit v1.2.3