On 28/2/23 22:55, Bernhard Beschow wrote:


Am 10. Februar 2023 16:57:53 UTC schrieb "Philippe Mathieu-Daudé" 
<[email protected]>:
Mechanical change doing:

  $ sed -i -e 's/PIIX4_PCI_DEVICE/PIIX4_ISA/g' $(git grep -l PIIX4_PCI_DEVICE)
  $ sed -i -e 's/PIIX3_XEN_DEVICE/PIIX3_ISA_XEN/g' $(git grep -l 
PIIX3_XEN_DEVICE)
  $ sed -i -e 's/PIIX3_DEVICE/PIIX3_ISA/g' $(git grep -l PIIX3_DEVICE)
  $ sed -i -e 's/PIIX3_PCI_DEVICE/PIIX_ISA/g' $(git grep -l PIIX3_PCI_DEVICE)

Signed-off-by: Philippe Mathieu-Daudé <[email protected]>
---
hw/i386/pc_piix.c             |  5 ++---
hw/isa/piix3.c                | 20 ++++++++++----------
hw/isa/piix4.c                | 10 +++++-----
hw/mips/malta.c               |  2 +-
include/hw/southbridge/piix.h | 10 +++++-----
5 files changed, 23 insertions(+), 24 deletions(-)


-OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_PCI_DEVICE)
+OBJECT_DECLARE_SIMPLE_TYPE(PIIX4State, PIIX4_ISA)

static void piix4_set_irq(void *opaque, int irq_num, int level)
{
@@ -81,7 +81,7 @@ static void piix4_set_irq(void *opaque, int irq_num, int 
level)

static void piix4_isa_reset(DeviceState *dev)
{
-    PIIX4State *d = PIIX4_PCI_DEVICE(dev);
+    PIIX4State *d = PIIX4_ISA(dev);

PIIX4State holds the state of the whole south bridge and not just the ISA 
function. I therefore tend to find PIIX4_ISA() slightly misleading...

Not in the respin of your work: PIIX_ISA is simply the PCI-ISA bridge function #0, part of a new QOM PIIX chipset. One rationale is the
address spaces are not part of the ISA function, but intrinsic part
of the while chipset, shared between some PCI functions. Another is
some functions don't depend on the ISA bridge to be usable.

Reply via email to