diff options
author | Kevin O'Connor <kevin@koconnor.net> | 2009-12-05 11:25:09 -0500 |
---|---|---|
committer | Kevin O'Connor <kevin@koconnor.net> | 2009-12-05 11:25:09 -0500 |
commit | 4ccb23125e8653e9dc1c42f2f2ae57594ef072c3 (patch) | |
tree | 2d42689725468749953e7b0a5767b84b01b094b4 /src/disk.c | |
parent | 6080fe0687436991314a09fe05dbe4d69212cd26 (diff) | |
download | seabios-hppa-4ccb23125e8653e9dc1c42f2f2ae57594ef072c3.zip seabios-hppa-4ccb23125e8653e9dc1c42f2f2ae57594ef072c3.tar.gz seabios-hppa-4ccb23125e8653e9dc1c42f2f2ae57594ef072c3.tar.bz2 |
Support ISA ATA devices for qemu's "-M isapc" mode.
Add probing for ISA ATA devices when no pci devices found.
Also, add defines for common ATA ports.
Also, make sure irq and pci_bdf are defined for both pci ata controllers.
Diffstat (limited to 'src/disk.c')
-rw-r--r-- | src/disk.c | 28 |
1 files changed, 19 insertions, 9 deletions
@@ -602,15 +602,25 @@ disk_1348(struct bregs *regs, struct drive_s *drive_g) SET_INT13DPT(regs, reserved1, 0); SET_INT13DPT(regs, reserved2, 0); - SET_INT13DPT(regs, host_bus[0], 'P'); - SET_INT13DPT(regs, host_bus[1], 'C'); - SET_INT13DPT(regs, host_bus[2], 'I'); - SET_INT13DPT(regs, host_bus[3], 0); - - u32 bdf = GET_GLOBAL(ATA_channels[channel].pci_bdf); - u32 path = (pci_bdf_to_bus(bdf) | (pci_bdf_to_dev(bdf) << 8) - | (pci_bdf_to_fn(bdf) << 16)); - SET_INT13DPT(regs, iface_path, path); + int bdf = GET_GLOBAL(ATA_channels[channel].pci_bdf); + if (bdf != -1) { + SET_INT13DPT(regs, host_bus[0], 'P'); + SET_INT13DPT(regs, host_bus[1], 'C'); + SET_INT13DPT(regs, host_bus[2], 'I'); + SET_INT13DPT(regs, host_bus[3], 0); + + u32 path = (pci_bdf_to_bus(bdf) | (pci_bdf_to_dev(bdf) << 8) + | (pci_bdf_to_fn(bdf) << 16)); + SET_INT13DPT(regs, iface_path, path); + } else { + // ISA + SET_INT13DPT(regs, host_bus[0], 'I'); + SET_INT13DPT(regs, host_bus[1], 'S'); + SET_INT13DPT(regs, host_bus[2], 'A'); + SET_INT13DPT(regs, host_bus[3], 0); + + SET_INT13DPT(regs, iface_path, iobase1); + } SET_INT13DPT(regs, iface_type[0], 'A'); SET_INT13DPT(regs, iface_type[1], 'T'); |