Christoph Grenz (christophg+cb@grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/296
-gerrit
commit 6a22d1c7e41a6ee47d32572afebc035c114390a3 Author: Christoph Grenz christophg+cb@grenz-bonn.de Date: Wed Oct 19 02:24:23 2011 +0200
w83627hf: correct typo in ASL include, correct indexed registers and remove unneccesary _PR0 defs
Correct a typo in devtree.asl which causes AML processors to fail executing the DSDT with AE_NO_MEMORY or (in case of acpiexec) Divide By Zero. Also removes an superfluous item in the register IndexField and removes unneccessary _PR0 definitions which could confuse AML processors.
Change-Id: I02cb9ce4e8f2101cfff8cec4abba7e070fd66364 Signed-off-by: Christoph Grenz christophg+cb@grenz-bonn.de --- src/superio/winbond/w83627hf/devtree.asl | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/superio/winbond/w83627hf/devtree.asl b/src/superio/winbond/w83627hf/devtree.asl index fa78845..cbc132d 100644 --- a/src/superio/winbond/w83627hf/devtree.asl +++ b/src/superio/winbond/w83627hf/devtree.asl @@ -74,7 +74,7 @@ Scope (_SB) ADDR, 8, DATA, 8 } - IndexField (CREG, DATA, ByteAcc, NoLock, Preserve) + IndexField (ADDR, DATA, ByteAcc, NoLock, Preserve) { Offset (0x02), RST, 1, /* Soft reset */ @@ -84,7 +84,6 @@ Scope (_SB) Offset (0x20), DID, 8, /* Device ID */ DREV, 8, /* Device Revision */ - POWC, 8, FDPW, 1, /* FDC Power Down */ , 2, PRPW, 1, /* PRT Power Down */ @@ -258,7 +257,6 @@ Scope (_SB) Store (One, FDPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_DIS) { @@ -470,7 +468,6 @@ Scope (_SB) Store (One, PRPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_DIS) { ENCM () @@ -650,7 +647,6 @@ Scope (_SB) Store (One, UAPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_DIS) { @@ -783,7 +779,6 @@ Scope (_SB) Store (One, UBPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_DIS) { @@ -916,7 +911,6 @@ Scope (_SB) Store (One, UBPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_DIS) { @@ -1479,7 +1473,6 @@ Scope (_SB) Store (One, HWPW) EXCM () } - Name (_PR0, Package () { ^^ })
Method (_CRS) { @@ -1511,4 +1504,4 @@ Scope (_SB) } #endif } -} \ No newline at end of file +}
Your recent changes make the error messages go away.
However, I noticed another error message about PS2 controller:
[ 1.543494] i8042 kbd 00:02: unable to assign resources [ 1.584667] i8042 kbd: probe of 00:02 failed with error -16 [ 1.625694] i8042 aux 00:03: [irq 12] [ 1.626460] i8042 aux 00:03: activated [ 1.666536] PNP: PS/2 Controller [PNP0f13:PS2M] at 0x0,0x0 irq 12 [ 1.706908] PNP: PS/2 controller has invalid data port 0x0; using default 0x60 [ 1.747678] PNP: PS/2 controller has invalid command port 0x0; using default 0x64 [ 1.788888] PNP: PS/2 controller doesn't have KBD irq; using default 1 [ 2.081400] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 2.122528] mice: PS/2 mouse device common for all mice
I also saw something that looks like bug in your code (my proposed changes below). However, it doesn't cure the above error messages, so I may be wrong ...
@@ -1148,7 +1142,7 @@ Scope (_SB) Or (Local1, Local0, Local0)
ShiftLeft(Local2, 8, Local2) - Or (Local1, Local0, Local0) + Or (Local3, Local2, Local2)
CreateWordField (CRS, IO0._MIN, IMIN) Store (Local0, IMIN) @@ -1192,7 +1186,7 @@ Scope (_SB) ShiftRight(Local1, 8, Local1)
Divide(IOA1, 256, Local2, Local3) - ShiftRight(Local1, 8, Local1) + ShiftRight(Local3, 8, Local3)
FindSetLeftBit (IRQL, Local4) Subtract (Local4, 0x01, Local4) @@ -1256,7 +1250,7 @@ Scope (_SB) Or (Local1, Local0, Local0)
ShiftLeft(Local2, 8, Local2) - Or (Local1, Local0, Local0) + Or (Local3, Local2, Local2)
CreateWordField (CRS, IO0._MIN, IMIN) Store (Local0, IMIN)
On 10/19/2011 02:28 AM, Christoph Grenz (christophg+cb@grenz-bonn.de) wrote:
Christoph Grenz (christophg+cb@grenz-bonn.de) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/296
-gerrit
commit 6a22d1c7e41a6ee47d32572afebc035c114390a3 Author: Christoph Grenzchristophg+cb@grenz-bonn.de Date: Wed Oct 19 02:24:23 2011 +0200
w83627hf: correct typo in ASL include, correct indexed registers and remove unneccesary _PR0 defs Correct a typo in devtree.asl which causes AML processors to fail executing the DSDT with AE_NO_MEMORY or (in case of acpiexec) Divide By Zero. Also removes an superfluous item in the register IndexField and removes unneccessary _PR0 definitions which could confuse AML processors. Change-Id: I02cb9ce4e8f2101cfff8cec4abba7e070fd66364 Signed-off-by: Christoph Grenz<christophg+cb@grenz-bonn.de>
src/superio/winbond/w83627hf/devtree.asl | 11 ++--------- 1 files changed, 2 insertions(+), 9 deletions(-)
diff --git a/src/superio/winbond/w83627hf/devtree.asl b/src/superio/winbond/w83627hf/devtree.asl index fa78845..cbc132d 100644 --- a/src/superio/winbond/w83627hf/devtree.asl +++ b/src/superio/winbond/w83627hf/devtree.asl @@ -74,7 +74,7 @@ Scope (_SB) ADDR, 8, DATA, 8 }
IndexField (CREG, DATA, ByteAcc, NoLock, Preserve)
{ Offset (0x02), RST, 1, /* Soft reset */IndexField (ADDR, DATA, ByteAcc, NoLock, Preserve)
@@ -84,7 +84,6 @@ Scope (_SB) Offset (0x20), DID, 8, /* Device ID */ DREV, 8, /* Device Revision */
POWC, 8, FDPW, 1, /* FDC Power Down */ , 2, PRPW, 1, /* PRT Power Down */
@@ -258,7 +257,6 @@ Scope (_SB) Store (One, FDPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_DIS) {
@@ -470,7 +468,6 @@ Scope (_SB) Store (One, PRPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_DIS) { ENCM ()
@@ -650,7 +647,6 @@ Scope (_SB) Store (One, UAPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_DIS) {
@@ -783,7 +779,6 @@ Scope (_SB) Store (One, UBPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_DIS) {
@@ -916,7 +911,6 @@ Scope (_SB) Store (One, UBPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_DIS) {
@@ -1479,7 +1473,6 @@ Scope (_SB) Store (One, HWPW) EXCM () }
Name (_PR0, Package () { ^^ }) Method (_CRS) {
@@ -1511,4 +1504,4 @@ Scope (_SB) } #endif } -} \ No newline at end of file +}
Am Mittwoch, 19. Oktober 2011, um 22:52:16 schrieb Oskar Enoksson:
Your recent changes make the error messages go away.
However, I noticed another error message about PS2 controller:
[ 1.543494] i8042 kbd 00:02: unable to assign resources [ 1.584667] i8042 kbd: probe of 00:02 failed with error -16 [ 1.625694] i8042 aux 00:03: [irq 12] [ 1.626460] i8042 aux 00:03: activated [ 1.666536] PNP: PS/2 Controller [PNP0f13:PS2M] at 0x0,0x0 irq 12 [ 1.706908] PNP: PS/2 controller has invalid data port 0x0; using default 0x60 [ 1.747678] PNP: PS/2 controller has invalid command port 0x0; using default 0x64 [ 1.788888] PNP: PS/2 controller doesn't have KBD irq; using default 1 [ 2.081400] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 2.122528] mice: PS/2 mouse device common for all mice
Do you have a PS/2 keyboard and/or mouse attached to your computer?
I reproduced similar output on my board with no PS/2 device attached. (I don't own any PS/2 keyboard/mouse so I can't test the other cases) It seems that the PS/2 controller is disabled on startup. When the i8042 kbd driver probes the KBD0 device _STA reports that the device isn't enabled. It then seems to read the I/O ports (which are uninitialized, so 0x00, 0x00) so it tries to enable it and either it fails or really enables it and reports a failure (I'm not yet sure about the reason, I couldn't find much info about error -16 yet). Anyway later when the aux driver probes PS2M it is enabled, so this one doesn't fail.
Can you send the output from superiotool -d? I would like to see if there are really only zeroes in the keyboard controller IO port registers.
I also saw something that looks like bug in your code (my proposed changes below). However, it doesn't cure the above error messages, so I may be wrong ...
@@ -1148,7 +1142,7 @@ Scope (_SB) Or (Local1, Local0, Local0)
ShiftLeft(Local2, 8, Local2)
Or (Local1, Local0, Local0)
Or (Local3, Local2, Local2) CreateWordField (CRS, IO0._MIN, IMIN) Store (Local0, IMIN)
[...]
Oops, yes these are copy-paste errors. I'll correct them.
BTW, thanks for testing the code
Am Donnerstag, 20. Oktober 2011, um 05:20:11 schrieb Christoph Grenz:
Am Mittwoch, 19. Oktober 2011, um 22:52:16 schrieb Oskar Enoksson:
Your recent changes make the error messages go away.
However, I noticed another error message about PS2 controller:
[ 1.543494] i8042 kbd 00:02: unable to assign resources [ 1.584667] i8042 kbd: probe of 00:02 failed with error -16 [ 1.625694] i8042 aux 00:03: [irq 12] [ 1.626460] i8042 aux 00:03: activated [ 1.666536] PNP: PS/2 Controller [PNP0f13:PS2M] at 0x0,0x0 irq 12 [ 1.706908] PNP: PS/2 controller has invalid data port 0x0; using default 0x60 [ 1.747678] PNP: PS/2 controller has invalid command port 0x0; using default 0x64 [ 1.788888] PNP: PS/2 controller doesn't have KBD irq; using default 1 [ 2.081400] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 2.122528] mice: PS/2 mouse device common for all mice
[...]
It seems this is partly a bug in linux kernel: If KBD0 is disabled, linux tries to assign ressources to it and therefore enable it. But as 0x60, 0x64 and IRQ 1 are reserved (for the keyboard controller), linux fails to assign them. On the other way if I let the kernel choose other adresses and IRQs the pnp driver still expects the keyboard controller at 0x60,0x64 so it fails again. The only workaround seems to be to never signal that KBC was disabled. There are no error messages on my system in this case as some driver later in the boot process enables the kbc anyway.
On 10/20/2011 02:30 PM, Christoph Grenz wrote:
Am Donnerstag, 20. Oktober 2011, um 05:20:11 schrieb Christoph Grenz:
Am Mittwoch, 19. Oktober 2011, um 22:52:16 schrieb Oskar Enoksson:
Your recent changes make the error messages go away.
However, I noticed another error message about PS2 controller:
[ 1.543494] i8042 kbd 00:02: unable to assign resources [ 1.584667] i8042 kbd: probe of 00:02 failed with error -16 [ 1.625694] i8042 aux 00:03: [irq 12] [ 1.626460] i8042 aux 00:03: activated [ 1.666536] PNP: PS/2 Controller [PNP0f13:PS2M] at 0x0,0x0 irq 12 [ 1.706908] PNP: PS/2 controller has invalid data port 0x0; using default 0x60 [ 1.747678] PNP: PS/2 controller has invalid command port 0x0; using default 0x64 [ 1.788888] PNP: PS/2 controller doesn't have KBD irq; using default 1 [ 2.081400] serio: i8042 KBD port at 0x60,0x64 irq 1 [ 2.122528] mice: PS/2 mouse device common for all mice
[...]
It seems this is partly a bug in linux kernel: If KBD0 is disabled, linux tries to assign ressources to it and therefore enable it. But as 0x60, 0x64 and IRQ 1 are reserved (for the keyboard controller), linux fails to assign them. On the other way if I let the kernel choose other adresses and IRQs the pnp driver still expects the keyboard controller at 0x60,0x64 so it fails again. The only workaround seems to be to never signal that KBC was disabled. There are no error messages on my system in this case as some driver later in the boot process enables the kbc anyway.
Ok. I do have a PS2 keyboard and a mouse connected though, and I didn't get these error messages with my own w83627hf asl, but perhaps you are right.
I have more questions about your asl-code though (I'm not an expert, so I could be wrong ...):
When you use "Divide", why do you shift the quotient afterwards? E.g.
Divide(IOA0, 256, Local0, Local1) ShiftRight(Local1, 8, Local1)
Another thing: did you really mean the I/O ports (e.g. 0x60,0x64) to appear in both KBD0 _CRS and PS2M _CRS?
One more thing, this is wrong, right?:
@@ -1042,7 +1036,7 @@ Scope (_SB) IRQNoFlags (IRQX) {6} }) ENCM () - Store (0x03, LDN) + Store (0x06, LDN) Store(IO1H, Local1) Store(IO1L, Local0) Store(IRQ0, Local2)
There are a few more similar things, I'm running out of time ... Perhaps if you look through everything yourself one more time you will find more.