Skip to contentSkip to conversation

cardbus: revert IO window limit

PATCH Daniel Ritz 4 participants 10 messages Jun 30, 2006 – Jul 13, 2006 PCI

lore
Share & tools
lore
#0 lore raw
Quoted 11 lines

Ok. We don't actually have any quirks at all for the 82440MX, and that's almost certainly _not_ because it doesn't do something strange (all Intel host bridges have magic IO ranges), but simply because we haven't hit it yet.

And I can't find the docs for the PCI config space for that dang thing.

I bet that there's some magic SMBus IO-range that the 440MX decodes using a special magic config setting.

Has anybody found the config space docs for the 82440MX?

nope. but from the docs available i would _guess_ this thing is really similar to the 82443BX/82371AB combination. at least the SMBus base address register is hidden at the very same place (32bit at 0x90 in function 3 of the "south" brigde)...so the attached little patch might be enough to fix things...

Alessio, could you try that one on top of a kernel that shows the problem?

rgds
-daniel

drivers/pci/quirks.c +2 -0
index 4364d79..1d26a64 100644
@@ -401,6 +401,8 @@ static void __devinit quirk_piix4_acpi(s
 	piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	quirk_piix4_acpi );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82443MX_3,	quirk_piix4_acpi );
+
 
 /*
  * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
#1 lore raw
Quoted 5 lines · Daniel Ritz

nope. but from the docs available i would _guess_ this thing is really similar to the 82443BX/82371AB combination. at least the SMBus base address register is hidden at the very same place (32bit at 0x90 in function 3 of the "south" brigde)...so the attached little patch might be enough to fix things...

Alessio has PCI ID 8086:7194, which is not the 82443MX_3, so you'd need something like this instead (but yes, it might indeed be the standard PIIX4 quirks).

Linus

---

drivers/pci/quirks.c +1 -0
index 4364d79..0c073b4 100644
@@ -401,6 +401,7 @@ static void __devinit quirk_piix4_acpi(s
 	piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	quirk_piix4_acpi );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82440MX_0,	quirk_piix4_acpi );
 
 /*
  * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
include/linux/pci_ids.h +1 -0
index 9ae6b1a..889d4da 100644
@@ -2205,6 +2205,7 @@ #define PCI_DEVICE_ID_INTEL_82443LX_1	0x
 #define PCI_DEVICE_ID_INTEL_82443BX_0	0x7190
 #define PCI_DEVICE_ID_INTEL_82443BX_1	0x7191
 #define PCI_DEVICE_ID_INTEL_82443BX_2	0x7192
+#define PCI_DEVICE_ID_INTEL_82440MX_0	0x7194
 #define PCI_DEVICE_ID_INTEL_440MX	0x7195
 #define PCI_DEVICE_ID_INTEL_440MX_6	0x7196
 #define PCI_DEVICE_ID_INTEL_82443MX_0	0x7198
#2 lore raw
Quoted 12 lines · Linus Torvalds
Quoted 5 lines · Daniel Ritz

nope. but from the docs available i would _guess_ this thing is really similar to the 82443BX/82371AB combination. at least the SMBus base address register is hidden at the very same place (32bit at 0x90 in function 3 of the "south" brigde)...so the attached little patch might be enough to fix things...

Alessio has PCI ID 8086:7194, which is not the 82443MX_3, so you'd need something like this instead (but yes, it might indeed be the standard PIIX4 quirks).

errm...no. the SMBus device is in device 00:07.3 (power management controller)... and that has ID 8086:719b (from his lspci -vvx output)...

rgds
-daniel

#3 lore raw
Quoted 3 lines · Daniel Ritz

errm...no. the SMBus device is in device 00:07.3 (power management controller)... and that has ID 8086:719b (from his lspci -vvx output)...

Ahh, right.

Alessio, try Daniel's patch. We'd love to hear if it works, and in particular what the dmesg output is (if it does work, it should print out something like

	PIIX4 ACPI PIO at 2000-203f
	PIIX4 SMB PIO at 2040-204f

and perhaps even a few "PIIX4 devres X" lines..)

Alessio, it might also make sense to try to enable ACPI if you haven't done so - not because you need to use it, but because sometimes the ACPI table parsing also ends up exposing these kinds of things..

Linus

#4 lore raw
Quoted 4 lines · Linus Torvalds

Alessio, try Daniel's patch. We'd love to hear if it works, and in particular what the dmesg output is (if it does work, it should print out something like

Quoted 8 lines
	PIIX4 ACPI PIO at 2000-203f
	PIIX4 SMB PIO at 2040-204f

and perhaps even a few "PIIX4 devres X" lines..)

Alessio, it might also make sense to try to enable ACPI if you haven't done so - not because you need to use it, but because sometimes the ACPI table parsing also ends up exposing these kinds of things..

Alessio, did you have time to try out Daniel's patch?

Pekka

#5 lore raw
In reply to Linus Torvalds
Quoted 8 lines · Linus Torvalds

Alessio, try Daniel's patch. We'd love to hear if it works, and in particular what the dmesg output is (if it does work, it should print out something like

	PIIX4 ACPI PIO at 2000-203f
	PIIX4 SMB PIO at 2040-204f

and perhaps even a few "PIIX4 devres X" lines..)

this is the relevat dmesg output:

PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1000-103f claimed by PIIX4 ACPI PCI quirk: region 1400-140f claimed by PIIX4 SMB PIIX4 devres C PIO at 0398-0399
Boot video device is 0000:00:09.0
PCI: Using IRQ router PIIX/ICH [8086/7198] at 0000:00:07.0
PCI: Cannot allocate resource region 0 of device 0000:00:0b.0
PCI: BIOS reporting unknown device 00:01
PCI: BIOS reporting unknown device 00:02
PCI: Bus 1, cardbus bridge: 0000:00:08.0
IO window: 00001c00-00001cff
IO window: 00002000-000020ff
PREFETCH window: 20000000-21ffffff
MEM window: 22000000-23ffffff
PCI: setting IRQ 10 as level-triggered
PCI: Found IRQ 10 for device 0000:00:08.0

Quoted 3 lines

Alessio, it might also make sense to try to enable ACPI if you haven't done so - not because you need to use it, but because sometimes the ACPI table parsing also ends up exposing these kinds of things..

It's not that I don't want ACPI, but if I enable it I only get:

ACPI: RSDP (v000 OID_00 ) @ 0x000f0010
ACPI: RSDT (v001 OID_00 RSDT_000 0x30303030 <90>& 0x00010000) @ 0x0ffffbd0
ACPI: FADT (v001 OID_00 FACP_000 0x30303030 <90>& 0x00010000) @ 0x0ffffb20
ACPI: BOOT (v001 OID_00 BOOT_000 0x30303030 <90>& 0x00010000) @ 0x0ffffba0
ACPI: DSDT (v001 INT440 SYSFexxx 0x00001001 MSFT 0x0100000b) @ 0x00000000
ACPI: Vendor "INT440" System "SYSFexxx" Revision 0x1001 has a known ACPI BIOS problem.
ACPI: Reason: Does not use _REG to protect EC OpRegions. This is a non-recoverable error
ACPI: Disabling ACPI support
Allocating PCI resources starting at 20000000 (gap: 10000000:effc0000)

bye, thank you
Alessio Sangalli

#6 lore raw
Quoted 12 lines · Alessio Sangalli
Quoted 8 lines · Linus Torvalds

Alessio, try Daniel's patch. We'd love to hear if it works, and in particular what the dmesg output is (if it does work, it should print out something like

	PIIX4 ACPI PIO at 2000-203f
	PIIX4 SMB PIO at 2040-204f

and perhaps even a few "PIIX4 devres X" lines..)

Quoted 7 lines

this is the relevat dmesg output:

PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1000-103f claimed by PIIX4 ACPI
PCI quirk: region 1400-140f claimed by PIIX4 SMB
PIIX4 devres C PIO at 0398-0399

Thanks, that explains it. Anybody who allocated region 1000 and 1400 would clash with the built-in PIIX magic IO regions, and any driver that tried to access those regions would instead end up accessing magic SMBus or ACPI registers.

So your lock-ups are very understandable indeed, and I'll apply this to the standard kernel. MUCH better than reverting the IO window limits.

Linus

#7 lore raw
Quoted 6 lines · Linus Torvalds
Quoted 5 lines

PCI: Probing PCI hardware
PCI: Probing PCI hardware (bus 00)
PCI quirk: region 1000-103f claimed by PIIX4 ACPI
PCI quirk: region 1400-140f claimed by PIIX4 SMB
PIIX4 devres C PIO at 0398-0399

Quoted 7 lines

Thanks, that explains it. Anybody who allocated region 1000 and 1400 would clash with the built-in PIIX magic IO regions, and any driver that tried to access those regions would instead end up accessing magic SMBus or ACPI registers.

So your lock-ups are very understandable indeed, and I'll apply this to the standard kernel. MUCH better than reverting the IO window limits.

Ok I'm glad we (you) have found the best solution.

Remember you are all welcome at the Planetarium of Lecco, Italy ;)

Thank you
Alessio Sangalli IZ2GMV

#8 lore raw
In reply to Linus Torvalds
Quoted 3 lines · Linus Torvalds

Alessio has PCI ID 8086:7194, which is not the 82443MX_3, so you'd need something like this instead (but yes, it might indeed be the standard PIIX4 quirks).

Linus, this patch *does not* work, while Daniel's is ok. It's puzzling... same kernel, just checked out from the git repository.

Quoted 25 lines

---

drivers/pci/quirks.c +1 -0
index 4364d79..0c073b4 100644
@@ -401,6 +401,7 @@ static void __devinit quirk_piix4_acpi(s
 	piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82371AB_3,	quirk_piix4_acpi );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,	PCI_DEVICE_ID_INTEL_82440MX_0,	quirk_piix4_acpi );
 
 /*
  * ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by longwords at
include/linux/pci_ids.h +1 -0
index 9ae6b1a..889d4da 100644
@@ -2205,6 +2205,7 @@ #define PCI_DEVICE_ID_INTEL_82443LX_1	0x
 #define PCI_DEVICE_ID_INTEL_82443BX_0	0x7190
 #define PCI_DEVICE_ID_INTEL_82443BX_1	0x7191
 #define PCI_DEVICE_ID_INTEL_82443BX_2	0x7192
+#define PCI_DEVICE_ID_INTEL_82440MX_0	0x7194
 #define PCI_DEVICE_ID_INTEL_440MX	0x7195
 #define PCI_DEVICE_ID_INTEL_440MX_6	0x7196
 #define PCI_DEVICE_ID_INTEL_82443MX_0	0x7198
#9 lore raw
In reply to Daniel Ritz
Quoted 4 lines · Daniel Ritz

register is hidden at the very same place (32bit at 0x90 in function 3 of the "south" brigde)...so the attached little patch might be enough to fix things...

Alessio, could you try that one on top of a kernel that shows the problem?

well sorry for being so late but I had some lectures to do and... by the way, everybody on this msiling list is officially invited at the Planetarium of Lecco - if you happen to pass by northern Italy just drop me an email... :)

You know... this patch works :)
I'm now running the latest kernel in the git repository with APM enabled and everything is working fine! I will qute the patch below.

Thank you
Alessio Sangalli

drivers/pci/quirks.c +0 -0
index 4364d79..1d26a64 100644
@@ -401,6 +401,8 @@ static void __devinit quirk_piix4_acpi(s
 	piix4_io_quirk(dev, "PIIX4 devres J", 0x7c, 1 << 20);
 }
 DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,

PCI_DEVICE_ID_INTEL_82371AB_3, quirk_piix4_acpi );
+DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL,
PCI_DEVICE_ID_INTEL_82443MX_3, quirk_piix4_acpi );
+

/*
* ICH4, ICH4-M, ICH5, ICH5-M ACPI: Three IO regions pointed to by
longwords at