1 #include <console/console.h>
5 #include <part/sizeram.h>
6 #include <device/device.h>
7 #include <device/pci.h>
8 #include <device/hypertransport.h>
13 #include "northbridge.h"
17 printk_err("Hard_RESET!!!\n");
20 struct mem_range *sizeram(void)
22 unsigned long mmio_basek;
23 static struct mem_range mem[10];
26 unsigned char rambits;
28 dev = dev_find_slot(0, 0);
30 printk_err("Cannot find PCI: 0:0\n");
37 while(idx < sizeof(mem)/sizeof(mem[0])) {
42 for(rambits = 0, i = 0; i < sizeof(ramregs)/sizeof(ramregs[0]); i++) {
44 reg = pci_read_config8(dev, ramregs[i]);
45 /* these are ENDING addresses, not sizes.
46 * if there is memory in this slot, then reg will be > rambits.
47 * So we just take the max, that gives us total.
48 * We take the highest one to cover for once and future linuxbios
49 * bugs. We warn about bugs.
54 printk_err("ERROR! register 0x%x is not set!\n",
58 printk_debug("I would set ram size to 0x%x Kbytes\n", (rambits)*8*1024);
59 mem[0].sizek = rambits*8*1024;
62 for(i = 0; i < idx; i++) {
63 printk_debug("mem[%d].basek = %08x mem[%d].sizek = %08x\n",
64 i, mem[i].basek, i, mem[i].sizek);
71 struct chip_operations northbridge_emulation_qemu_i386_control = {
72 .name = "QEMU Northbridge",