Skip to content

hw/ide: implement ich6 ide controller support

Liav Albani qemu-devel 2 versions – In review

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 7 repliesIn review
  2. v11 patch 6 repliesSuperseded

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2hw/ide: split bmdma read and write functions from piix.chw/ide/bmdma.c hw/ide/meson.build hw/ide/piix.c +1 more+122 -492 replies
2/2hw/ide: add ich6 ide controller device emulationhw/i386/Kconfig hw/ide/Kconfig hw/ide/ich6.c +3 more+214 -05 replies

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v2 yet.

Read the v2 thread

Cover letter [PATCH v2 0/2] hw/ide: implement ich6 ide controller support

This is version 2 of this patch, this time a patch series, after following the suggestions from BALATON Zoltan. I implemented this device because I have an old machine from 2009 which has the ICH7 south bridge in it, so when I tried to run Linux on it, it booted just fine (as you might expect), but when I tried to boot with the SerenityOS kernel, it struggled to initialize the IDE controller. Therefore, upstreaming these changes might be beneficial to other OS developers and hobbyists out there, and I will use this to fix the issues within the SerenityOS kernel, without the need of preparing a bare metal setup each time I need to test the code of the kernel.

Please keep in mind that while this is usable right now with the Q35 chipset, when trying to boot with an i440FX machine, SeaBIOS doesn't handle this device very well, so it tries no matter what type of IDE controller it sees to assign the IO ports to legacy values. I have a patch I wrote locally which I gladly will send to SeaBIOS, that fixes this problem by ensuring that when attaching a storage device to this controller, SeaBIOS will relocate the IO ports to other values so there's no collision with the default PIIX3/4 IDE controller. Even if SeaBIOS didn't configure this device correctly, Linux will relocate the IO ports and the user can still use the attached storage devices, given that the user managed to boot from a storage device that is not attached to the ICH6 IDE controller but to other storage controller in the system.

Liav Albani (2):
hw/ide: split bmdma read and write functions from piix.c hw/ide: add ich6 ide controller device emulation

 hw/i386/Kconfig          |   2 +
 hw/ide/Kconfig           |   5 +
 hw/ide/bmdma.c           |  84 ++++++++++++++++
 hw/ide/ich6.c            | 204 +++++++++++++++++++++++++++++++++++++++
 hw/ide/meson.build       |   3 +-
 hw/ide/piix.c            |  51 +---------
 include/hw/ide/bmdma.h   |  34 +++++++
 include/hw/ide/pci.h     |   1 +
 include/hw/pci/pci_ids.h |   1 +
 9 files changed, 336 insertions(+), 49 deletions(-)
 create mode 100644 hw/ide/bmdma.c
 create mode 100644 hw/ide/ich6.c
 create mode 100644 include/hw/ide/bmdma.h
Signature · 1 line
2.35.1