All of lore.kernel.org
 help / color / mirror / Atom feed
From: Liav Albani <liavalb@gmail.com>
To: qemu-devel@nongnu.org
Cc: jsnow@redhat.com, Liav Albani <liavalb@gmail.com>, qemu-block@nongnu.org
Subject: [PATCH v2 0/2] hw/ide: implement ich6 ide controller support
Date: Fri, 18 Feb 2022 22:41:53 +0200	[thread overview]
Message-ID: <20220218204155.236611-1-liavalb@gmail.com> (raw)

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

-- 
2.35.1



             reply	other threads:[~2022-02-18 20:44 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-18 20:41 Liav Albani [this message]
2022-02-18 20:41 ` [PATCH v2 1/2] hw/ide: split bmdma read and write functions from piix.c Liav Albani
2022-02-19  0:12   ` BALATON Zoltan
2022-02-19  6:43     ` Liav Albani
2022-02-18 20:41 ` [PATCH v2 2/2] hw/ide: add ich6 ide controller device emulation Liav Albani
2022-02-19  0:50   ` BALATON Zoltan
2022-02-19  7:24     ` Liav Albani
2022-02-19 12:53       ` BALATON Zoltan
2022-02-21 11:33         ` Gerd Hoffmann
2022-02-21 18:52           ` Liav Albani

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220218204155.236611-1-liavalb@gmail.com \
    --to=liavalb@gmail.com \
    --cc=jsnow@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.