2009-08-20 17:22:19 +04:00
|
|
|
#ifndef HW_IDE_H
|
|
|
|
#define HW_IDE_H
|
|
|
|
|
2013-02-05 20:06:20 +04:00
|
|
|
#include "hw/isa/isa.h"
|
2013-02-04 18:40:22 +04:00
|
|
|
#include "hw/pci/pci.h"
|
2012-12-17 21:19:49 +04:00
|
|
|
#include "exec/memory.h"
|
2009-08-20 17:22:19 +04:00
|
|
|
|
2011-01-28 13:21:40 +03:00
|
|
|
#define MAX_IDE_DEVS 2
|
|
|
|
|
2009-08-20 17:22:19 +04:00
|
|
|
/* ide-isa.c */
|
2011-12-16 01:09:51 +04:00
|
|
|
ISADevice *isa_ide_init(ISABus *bus, int iobase, int iobase2, int isairq,
|
2010-06-24 21:59:29 +04:00
|
|
|
DriveInfo *hd0, DriveInfo *hd1);
|
2009-08-20 17:22:19 +04:00
|
|
|
|
2009-08-20 17:22:20 +04:00
|
|
|
/* ide-pci.c */
|
2009-08-28 17:47:03 +04:00
|
|
|
void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
|
2009-08-20 17:22:20 +04:00
|
|
|
int secondary_ide_enabled);
|
2011-07-18 10:07:02 +04:00
|
|
|
PCIDevice *pci_piix3_xen_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
2010-06-24 21:59:29 +04:00
|
|
|
PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
|
|
|
PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
2017-01-24 17:05:47 +03:00
|
|
|
int pci_piix3_xen_ide_unplug(DeviceState *dev, bool aux);
|
2010-06-29 06:49:50 +04:00
|
|
|
void vt82c686b_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
2009-08-20 17:22:20 +04:00
|
|
|
|
2009-08-20 17:22:22 +04:00
|
|
|
/* ide-mmio.c */
|
2013-02-01 03:13:41 +04:00
|
|
|
void mmio_ide_init_drives(DeviceState *dev, DriveInfo *hd0, DriveInfo *hd1);
|
2009-08-20 17:22:22 +04:00
|
|
|
|
2012-07-10 13:12:38 +04:00
|
|
|
int ide_get_geometry(BusState *bus, int unit,
|
|
|
|
int16_t *cyls, int8_t *heads, int8_t *secs);
|
|
|
|
int ide_get_bios_chs_trans(BusState *bus, int unit);
|
2010-06-24 21:58:20 +04:00
|
|
|
|
2011-04-03 15:32:46 +04:00
|
|
|
/* ide/core.c */
|
|
|
|
void ide_drive_get(DriveInfo **hd, int max_bus);
|
|
|
|
|
2009-08-20 17:22:19 +04:00
|
|
|
#endif /* HW_IDE_H */
|