mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-08-04 16:23:55 -06:00
ide: convert to memory API
Reviewed-by: Richard Henderson <rth@twiddle.net> Reviewed-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Avi Kivity <avi@redhat.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
This commit is contained in:
parent
e1a99dbd9c
commit
a9deb8c69a
5 changed files with 260 additions and 119 deletions
19
hw/ide/pci.h
19
hw/ide/pci.h
|
@ -19,20 +19,31 @@ typedef struct BMDMAState {
|
|||
BlockDriverCompletionFunc *dma_cb;
|
||||
int64_t sector_num;
|
||||
uint32_t nsector;
|
||||
IORange addr_ioport;
|
||||
MemoryRegion addr_ioport;
|
||||
MemoryRegion extra_io;
|
||||
QEMUBH *bh;
|
||||
qemu_irq irq;
|
||||
|
||||
/* Bit 0-2 and 7: BM status register
|
||||
* Bit 3-6: bus->error_status */
|
||||
uint8_t migration_compat_status;
|
||||
struct PCIIDEState *pci_dev;
|
||||
} BMDMAState;
|
||||
|
||||
typedef struct CMD646BAR {
|
||||
MemoryRegion cmd;
|
||||
MemoryRegion data;
|
||||
IDEBus *bus;
|
||||
struct PCIIDEState *pci_dev;
|
||||
} CMD646BAR;
|
||||
|
||||
typedef struct PCIIDEState {
|
||||
PCIDevice dev;
|
||||
IDEBus bus[2];
|
||||
BMDMAState bmdma[2];
|
||||
uint32_t secondary; /* used only for cmd646 */
|
||||
MemoryRegion bmdma_bar;
|
||||
CMD646BAR cmd646_bar[2]; /* used only for cmd646 */
|
||||
} PCIIDEState;
|
||||
|
||||
|
||||
|
@ -43,9 +54,9 @@ static inline IDEState *bmdma_active_if(BMDMAState *bmdma)
|
|||
}
|
||||
|
||||
|
||||
void bmdma_init(IDEBus *bus, BMDMAState *bm);
|
||||
void bmdma_cmd_writeb(void *opaque, uint32_t addr, uint32_t val);
|
||||
extern const IORangeOps bmdma_addr_ioport_ops;
|
||||
void bmdma_init(IDEBus *bus, BMDMAState *bm, PCIIDEState *d);
|
||||
void bmdma_cmd_writeb(BMDMAState *bm, uint32_t val);
|
||||
extern MemoryRegionOps bmdma_addr_ioport_ops;
|
||||
void pci_ide_create_devs(PCIDevice *dev, DriveInfo **hd_table);
|
||||
|
||||
extern const VMStateDescription vmstate_ide_pci;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue