Skip to contentSkip to conversation

floppy: fix I/O ranges in both portio and acpi dsdt

PATCH In review Gerd Hoffmann 2 participants 3 messages May 28, 2015 – May 29, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 floppy: fix I/O ranges in both portio and acpi dsdt

---
 hw/block/fdc.c            | 2 +-
 hw/i386/acpi-dsdt-isa.dsl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
hw/block/fdc.c +1 -1
index d8a8edd..c761291 100644
@@ -2186,7 +2186,7 @@ static void fdctrl_realize_common(FDCtrl *fdctrl, Error **errp)
 }
 
 static const MemoryRegionPortio fdc_portio_list[] = {
-    { 1, 5, 1, .read = fdctrl_read, .write = fdctrl_write },
+    { 0, 6, 1, .read = fdctrl_read, .write = fdctrl_write },
     { 7, 1, 1, .read = fdctrl_read, .write = fdctrl_write },
     PORTIO_END_OF_LIST(),
 };
hw/i386/acpi-dsdt-isa.dsl +1 -1
index 89caa16..f71d7df 100644
@@ -58,7 +58,7 @@ Scope(\_SB.PCI0.ISA) {
             }
         }
         Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
+            IO(Decode16, 0x03F0, 0x03F0, 0x00, 0x06)
             IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
             IRQNoFlags() { 6 }
             DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
Signature · 1 line
1.8.3.1
#1 lore raw

Am 28.05.2015 um 17:37 hat Gerd Hoffmann geschrieben:

Quoted 5 lines
---
 hw/block/fdc.c            | 2 +-
 hw/i386/acpi-dsdt-isa.dsl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

The commit message could be a bit longer, I don't think this change is obvious.

My FDC spec says that this version of the controller doesn't have the SRA register any more, and the emulation was added in the context of a Sun4m patch (commit 8c6a4d774). Therefore my default assumption would be that it's intentionally not accessible and not needed on isa-fdc.

I'm happy to get that assumption corrected, but it needs a non-empty commit message for that.

Kevin

Quoted 29 lines
hw/block/fdc.c +1 -1
index d8a8edd..c761291 100644
@@ -2186,7 +2186,7 @@ static void fdctrl_realize_common(FDCtrl *fdctrl, Error **errp)
 }
 
 static const MemoryRegionPortio fdc_portio_list[] = {
-    { 1, 5, 1, .read = fdctrl_read, .write = fdctrl_write },
+    { 0, 6, 1, .read = fdctrl_read, .write = fdctrl_write },
     { 7, 1, 1, .read = fdctrl_read, .write = fdctrl_write },
     PORTIO_END_OF_LIST(),
 };
hw/i386/acpi-dsdt-isa.dsl +1 -1
index 89caa16..f71d7df 100644
@@ -58,7 +58,7 @@ Scope(\_SB.PCI0.ISA) {
             }
         }
         Name(_CRS, ResourceTemplate() {
-            IO(Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
+            IO(Decode16, 0x03F0, 0x03F0, 0x00, 0x06)
             IO(Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
             IRQNoFlags() { 6 }
             DMA(Compatibility, NotBusMaster, Transfer8) { 2 }
Signature · 1 line
1.8.3.1
#2 lore raw
Quoted 10 lines · Kevin Wolf

Am 28.05.2015 um 17:37 hat Gerd Hoffmann geschrieben:

Quoted 5 lines
---
 hw/block/fdc.c            | 2 +-
 hw/i386/acpi-dsdt-isa.dsl | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

The commit message could be a bit longer, I don't think this change is obvious.

Quoted 7 lines

My FDC spec says that this version of the controller doesn't have the SRA register any more, and the emulation was added in the context of a Sun4m patch (commit 8c6a4d774). Therefore my default assumption would be that it's intentionally not accessible and not needed on isa-fdc.

I'm happy to get that assumption corrected, but it needs a non-empty commit message for that.

/me throws the towel.

I know next to nothing about floppy. It's just that all parties ...

(1) hw/block/fdc.c
(2) hw/i386/acpi-dsdt-isa.dsl
(3) hw/isa/lpc_ich9.c

... should agree on what the floppy io ranges are. Right now they don't, for whatever reasons. And I simply don't know what are the correct ranges. So I leave fixing this up to whomever knows better this than me.

cheers,
Gerd