aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Menzel <paulepanter@users.sourceforge.net>2014-05-30 13:58:59 +0200
committerKyösti Mälkki <kyosti.malkki@gmail.com>2014-05-31 11:12:32 +0200
commit355ce38dc2891c491387707ffe2e4e802ce4e864 (patch)
tree230fe4cde506044d46ad7fee7e942d5731df31f2 /src
parentae6e0c6bebc45f4c0b21a68e636a0d87b78db9cb (diff)
northbridge/intel/i945: Add define for register `BSM` and use it
Add a define for the register Base of Stolen Memory (BSM) and use it. Change-Id: I5b1df4e088d88344fac8cd8d218e76b08a885f58 Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net> Reviewed-on: http://review.coreboot.org/5884 Tested-by: build bot (Jenkins) Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/northbridge/intel/i945/i945.h2
-rw-r--r--src/northbridge/intel/i945/northbridge.c2
-rw-r--r--src/northbridge/intel/i945/ram_calc.c2
3 files changed, 4 insertions, 2 deletions
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;
}