aboutsummaryrefslogtreecommitdiff
path: root/hw/ppc
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2017-09-20 07:20:00 +0100
committerDavid Gibson <david@gibson.dropbear.id.au>2017-09-27 13:05:41 +1000
commit4f7265ff177df2886ccaed0bca318dc81a7f5e75 (patch)
tree3b2d28b345865b9dae44105f63b7c27901146315 /hw/ppc
parent77453882495b321404e874aa97bca1214160229d (diff)
downloadqemu-4f7265ff177df2886ccaed0bca318dc81a7f5e75.zip
qemu-4f7265ff177df2886ccaed0bca318dc81a7f5e75.tar.gz
qemu-4f7265ff177df2886ccaed0bca318dc81a7f5e75.tar.bz2
ppc/ide/macio: Add missing registers
The timing register exists on all variants of MacIO IDE, we just store and return its value. The interrupts register only exists on KeyLargo but it doesn't hurt to have it. The lack of this register causes MacOS X to hangs under some circumstances. Both are 32-bit only. The HW might support smaller access sizes but no known OS uses them. Because the core IDE subsystem doesn't provide us with a way to query the main (level) interrupt state, nor do we have a way to know that DBDMA issued a (edge) interrupt, we reflect both through a private pair of qirq's in order to maintain the register state. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/ppc')
-rw-r--r--hw/ppc/mac.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/hw/ppc/mac.h b/hw/ppc/mac.h
index 20cbddb..300fc8a 100644
--- a/hw/ppc/mac.h
+++ b/hw/ppc/mac.h
@@ -132,7 +132,9 @@ typedef struct MACIOIDEState {
SysBusDevice parent_obj;
/*< public >*/
- qemu_irq irq;
+ qemu_irq real_ide_irq;
+ qemu_irq real_dma_irq;
+ qemu_irq ide_irq;
qemu_irq dma_irq;
MemoryRegion mem;
@@ -140,6 +142,8 @@ typedef struct MACIOIDEState {
IDEDMA dma;
void *dbdma;
bool dma_active;
+ uint32_t timing_reg;
+ uint32_t irq_reg;
} MACIOIDEState;
void macio_ide_init_drives(MACIOIDEState *ide, DriveInfo **hd_table);