mirror of
https://git.proxmox.com/git/qemu
synced 2025-08-08 21:42:24 +00:00

Drives defined with -drive if=ide get get created along with the IDE
controller, inside machine->init(). That's before cmos_init().
Drives defined with -device get created during generic device init.
That's after cmos_init(). Because of that, CMOS has no information on
them (type, geometry, translation). Older versions of Windows such as
XP reportedly choke on that.
Split off the part of CMOS initialization that needs to know about
-device devices, and turn it into a reset handler, so it runs after
device creation.
Signed-off-by: Markus Armbruster <armbru@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
(cherry picked from commit c0897e0cb9
)
29 lines
886 B
C
29 lines
886 B
C
#ifndef HW_IDE_H
|
|
#define HW_IDE_H
|
|
|
|
#include "isa.h"
|
|
#include "pci.h"
|
|
|
|
/* ide-isa.c */
|
|
ISADevice *isa_ide_init(int iobase, int iobase2, int isairq,
|
|
DriveInfo *hd0, DriveInfo *hd1);
|
|
|
|
/* ide-pci.c */
|
|
void pci_cmd646_ide_init(PCIBus *bus, DriveInfo **hd_table,
|
|
int secondary_ide_enabled);
|
|
PCIDevice *pci_piix3_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
|
PCIDevice *pci_piix4_ide_init(PCIBus *bus, DriveInfo **hd_table, int devfn);
|
|
|
|
/* ide-macio.c */
|
|
int pmac_ide_init (DriveInfo **hd_table, qemu_irq irq,
|
|
void *dbdma, int channel, qemu_irq dma_irq);
|
|
|
|
/* ide-mmio.c */
|
|
void mmio_ide_init (target_phys_addr_t membase, target_phys_addr_t membase2,
|
|
qemu_irq irq, int shift,
|
|
DriveInfo *hd0, DriveInfo *hd1);
|
|
|
|
void ide_get_bs(BlockDriverState *bs[], BusState *qbus);
|
|
|
|
#endif /* HW_IDE_H */
|