diff -r d9b4ced6be3f -r 6bcf36137fb7 src/dev/ide_ctrl.cc --- a/src/dev/ide_ctrl.cc Mon Oct 10 17:09:43 2011 -0500 +++ b/src/dev/ide_ctrl.cc Mon Oct 10 17:13:17 2011 -0500 @@ -475,6 +475,7 @@ } else if (addr >= secondary.ctrlAddr && addr < (secondary.ctrlAddr + secondary.ctrlSize)) { addr -= secondary.ctrlAddr; + addr += ctrlOffset; secondary.accessControl(addr, size, dataPtr, read); } else if (addr >= bmiAddr && addr < (bmiAddr + bmiSize)) { if (!read && !bmEnabled) diff -r d9b4ced6be3f -r 6bcf36137fb7 src/dev/ide_disk.hh --- a/src/dev/ide_disk.hh Mon Oct 10 17:09:43 2011 -0500 +++ b/src/dev/ide_disk.hh Mon Oct 10 17:13:17 2011 -0500 @@ -95,9 +95,6 @@ #define STATUS_OFFSET (7) #define COMMAND_OFFSET (7) -#define CONTROL_OFFSET (2) -#define ALTSTAT_OFFSET (2) - #define SELECT_DEV_BIT 0x10 #define CONTROL_RST_BIT 0x04 #define CONTROL_IEN_BIT 0x02 diff -r d9b4ced6be3f -r 6bcf36137fb7 src/dev/ide_disk.cc --- a/src/dev/ide_disk.cc Mon Oct 10 17:09:43 2011 -0500 +++ b/src/dev/ide_disk.cc Mon Oct 10 17:13:17 2011 -0500 @@ -239,8 +239,6 @@ { assert(size == sizeof(uint8_t)); *data = status; - if (offset != ALTSTAT_OFFSET) - panic("Invalid IDE control register offset: %#x\n", offset); DPRINTF(IdeDisk, "Read to disk at offset: %#x data %#x\n", offset, *data); } @@ -295,9 +293,6 @@ void IdeDisk::writeControl(const Addr offset, int size, const uint8_t *data) { - if (offset != CONTROL_OFFSET) - panic("Invalid IDE control register offset: %#x\n", offset); - if (*data & CONTROL_RST_BIT) { // force the device into the reset state devState = Device_Srst; diff -r d9b4ced6be3f -r 6bcf36137fb7 src/dev/x86/SouthBridge.py --- a/src/dev/x86/SouthBridge.py Mon Oct 10 17:09:43 2011 -0500 +++ b/src/dev/x86/SouthBridge.py Mon Oct 10 17:13:17 2011 -0500 @@ -52,6 +52,7 @@ _pic2 = I8259(pio_addr=x86IOAddress(0xA0), mode='I8259Slave') _cmos = Cmos(pio_addr=x86IOAddress(0x70)) _dma1 = I8237(pio_addr=x86IOAddress(0x0)) + _dma2 = I8237(pio_addr=x86IOAddress(0xc0)) _keyboard = I8042(data_port=x86IOAddress(0x60), \ command_port=x86IOAddress(0x64)) _pit = I8254(pio_addr=x86IOAddress(0x40)) @@ -62,24 +63,25 @@ pic2 = Param.I8259(_pic2, "Slave PIC") cmos = Param.Cmos(_cmos, "CMOS memory and real time clock device") dma1 = Param.I8237(_dma1, "The first dma controller") + dma2 = Param.I8237(_dma2, "The second dma controller") keyboard = Param.I8042(_keyboard, "The keyboard controller") pit = Param.I8254(_pit, "Programmable interval timer") speaker = Param.PcSpeaker(_speaker, "PC speaker") io_apic = Param.I82094AA(_io_apic, "I/O APIC") # IDE controller - ide = IdeController(disks=[], pci_func=0, pci_dev=4, pci_bus=0) + ide = IdeController(disks=[], pci_func=0, pci_dev=1, pci_bus=0) ide.BAR0 = 0x1f0 ide.BAR0LegacyIO = True - ide.BAR1 = 0x3f4 - ide.BAR1Size = '3B' + ide.BAR1 = 0x3f6 + ide.BAR1Size = '1B' ide.BAR1LegacyIO = True ide.BAR2 = 0x170 ide.BAR2LegacyIO = True - ide.BAR3 = 0x374 - ide.BAR3Size = '3B' + ide.BAR3 = 0x376 + ide.BAR3Size = '1B' ide.BAR3LegacyIO = True - ide.BAR4 = 1 + ide.BAR4 = 0x1 ide.Command = 0 ide.ProgIF = 0x80 ide.InterruptLine = 14 @@ -104,6 +106,7 @@ # Connect to the bus self.cmos.pio = bus.port self.dma1.pio = bus.port + self.dma2.pio = bus.port self.ide.pio = bus.port self.keyboard.pio = bus.port self.pic1.pio = bus.port