summaryrefslogtreecommitdiff
path: root/src/northbridge/emulation
diff options
context:
space:
mode:
Diffstat (limited to 'src/northbridge/emulation')
-rw-r--r--src/northbridge/emulation/qemu-i386/chip.h2
-rw-r--r--src/northbridge/emulation/qemu-i386/northbridge.c21
-rw-r--r--src/northbridge/emulation/qemu-i386/northbridge.h7
3 files changed, 23 insertions, 7 deletions
diff --git a/src/northbridge/emulation/qemu-i386/chip.h b/src/northbridge/emulation/qemu-i386/chip.h
index d93a4b6afd..891c6cc448 100644
--- a/src/northbridge/emulation/qemu-i386/chip.h
+++ b/src/northbridge/emulation/qemu-i386/chip.h
@@ -2,4 +2,4 @@ struct northbridge_emulation_qemu_i386_config
{
};
-extern struct chip_operations northbridge_emulation_qemu_i386_control;
+extern struct chip_operations northbridge_emulation_qemu_i386_ops;
diff --git a/src/northbridge/emulation/qemu-i386/northbridge.c b/src/northbridge/emulation/qemu-i386/northbridge.c
index cd06573067..09fa573090 100644
--- a/src/northbridge/emulation/qemu-i386/northbridge.c
+++ b/src/northbridge/emulation/qemu-i386/northbridge.c
@@ -38,11 +38,28 @@ static void pci_domain_read_resources(device_t dev)
IORESOURCE_MEM, IORESOURCE_MEM);
}
+static void ram_resource(device_t dev, unsigned long index,
+ unsigned long basek, unsigned long sizek)
+{
+ struct resource *resource;
+
+ if (!sizek) {
+ return;
+ }
+ resource = new_resource(dev, index);
+ resource->base = ((resource_t)basek) << 10;
+ resource->size = ((resource_t)sizek) << 10;
+ resource->flags = IORESOURCE_MEM | IORESOURCE_CACHEABLE | \
+ IORESOURCE_FIXED | IORESOURCE_STORED | IORESOURCE_ASSIGNED;
+}
+
+
static void pci_domain_set_resources(device_t dev)
{
struct resource *resource, *last;
device_t mc_dev;
uint32_t pci_tolm;
+ uint32_t idx;
pci_tolm = 0xffffffffUL;
last = &dev->resource[dev->resources];
@@ -110,7 +127,7 @@ static void enable_dev(struct device *dev)
}
}
-struct chip_operations northbridge_emulation_qemu_i386_control = {
- .name = "QEMU Northbridge",
+struct chip_operations northbridge_emulation_qemu_i386_ops = {
+ // .name = "QEMU Northbridge",
.enable_dev = enable_dev,
};
diff --git a/src/northbridge/emulation/qemu-i386/northbridge.h b/src/northbridge/emulation/qemu-i386/northbridge.h
index ef63ebea78..c74e63b97d 100644
--- a/src/northbridge/emulation/qemu-i386/northbridge.h
+++ b/src/northbridge/emulation/qemu-i386/northbridge.h
@@ -1,6 +1,5 @@
-#ifndef NORTHBRIDGE_VIA_VT8623_H
-#define NORTHBRIDGE_VIA_VT8623_H
+#ifndef NORTHBRIDGE_EMULATION_QEMU_I386_H
+#define NORTHBRIDGE_EMULATION_QEMU_I386_H
-extern unsigned int vt8623_scan_root_bus(device_t root, unsigned int max);
-#endif /* NORTHBRIDGE_VIA_VT8623_H */
+#endif /* NORTHBRIDGE_EMULATION_QEMU_I386 */