Paul Menzel (paulepanter@users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/5884
-gerrit
commit 7fc1ce8c81d8e9f1eebaa8fbf17885cf3c7a9315 Author: Paul Menzel paulepanter@users.sourceforge.net Date: Fri May 30 13:58:59 2014 +0200
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 --- 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(-)
diff --git a/src/northbridge/intel/i945/i945.h b/src/northbridge/intel/i945/i945.h index 862af2a..d4d35a2 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 180ffde..99b16de 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 4ece540..51eb0ff 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; }