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>
This commit is contained in:
Paul Menzel 2014-05-30 13:58:59 +02:00 committed by Kyösti Mälkki
parent ae6e0c6beb
commit 355ce38dc2
3 changed files with 4 additions and 2 deletions

View File

@ -62,6 +62,8 @@
#define BOARD_DEVEN ( DEVEN_D0F0 | DEVEN_D2F0 | DEVEN_D2F1 ) #define BOARD_DEVEN ( DEVEN_D0F0 | DEVEN_D2F0 | DEVEN_D2F1 )
#endif #endif
#define BSM 0x5c
#define PAM0 0x90 #define PAM0 0x90
#define PAM1 0x91 #define PAM1 0x91
#define PAM2 0x92 #define PAM2 0x92

View File

@ -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_DEBUG, "pci_tolm: 0x%x\n", pci_tolm);
printk(BIOS_SPEW, "Base of stolen memory: 0x%08x\n", 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); 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); printk(BIOS_SPEW, "Top of Low Used DRAM: 0x%08x\n", tolud << 24);

View File

@ -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))) { if (pci_read_config8(PCI_DEV(0, 0x0, 0), DEVEN) & ((1 << 4) | (1 << 3))) {
/* IGD enabled, get top of Memory from BSM register */ /* 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 { } else {
tom = (pci_read_config8(PCI_DEV(0,0,0), TOLUD) & 0xf7) << 24; tom = (pci_read_config8(PCI_DEV(0,0,0), TOLUD) & 0xf7) << 24;
} }