aboutsummaryrefslogtreecommitdiff
path: root/hw/pc.c
diff options
context:
space:
mode:
authorths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-02 03:13:18 +0000
committerths <ths@c046a42c-6fe2-441c-8c8c-71466251a162>2007-02-02 03:13:18 +0000
commit3fffc2234fc6551a78533fe544ba96106e58379a (patch)
tree628586beefd5d9df636df6bad8faa5e5b0d0890d /hw/pc.c
parent4a109bfbca86934141d857bc9ed1a43cf4b1a940 (diff)
PIIX4 SMBus host, EEPROM device emulation, by Ed Swierk.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2379 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/pc.c')
-rw-r--r--hw/pc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/hw/pc.c b/hw/pc.c
index 73f7609ae9..05802bca97 100644
--- a/hw/pc.c
+++ b/hw/pc.c
@@ -699,7 +699,13 @@ static void pc_init1(int ram_size, int vga_ram_size, int boot_device,
}
if (pci_enabled && acpi_enabled) {
+ uint8_t *eeprom_buf = qemu_mallocz(8 * 256); /* XXX: make this persistent */
piix4_pm_init(pci_bus, piix3_devfn + 3);
+ for (i = 0; i < 8; i++) {
+ SMBusDevice *eeprom = smbus_eeprom_device_init(0x50 + i,
+ eeprom_buf + (i * 256));
+ piix4_smbus_register_device(eeprom, 0x50 + i);
+ }
}
if (i440fx_state) {