On Thu, Dec 06, 2012 at 10:35:31AM -0500, Kevin O'Connor wrote:
I just retested, and it's reproducible for me. Keep in mind that these last three patches are not on master.
9600c800ac2a6b34a9993d99e7d3d4f7301e9265 - works d9f5cdbdf55d61aef9a1a534d9123ef734427478 - fails 7a53595a35fa76c9abb34fd9a73e5661a50aa6d6 (master) - fails master + this series 1/2/3 - works master + patch 3 - works
As before, if someone submits a fix, I'll use that instead of reverting.
I think I might have a fix, but with a caveat :)
I'm also using this on top of SeaBIOS git-master (for OS X):
diff --git a/src/acpi-dsdt-isa.dsl b/src/acpi-dsdt-isa.dsl index 23761db..daca850 100644 --- a/src/acpi-dsdt-isa.dsl +++ b/src/acpi-dsdt-isa.dsl @@ -1,6 +1,24 @@ /* Common legacy ISA style devices. */ Scope(_SB.PCI0.ISA) {
+ Device (SMC) { + Name (_HID, EisaId ("APP0001")) + Name (_CID, "smc-napa") + Method(_STA, 0) { + Return (0x0B) + } + Name (_CRS, ResourceTemplate () { + IO (Decode16, + 0x0300, // Range Minimum + 0x0300, // Range Maximum + 0x01, // Alignment + 0x20, // Length + ) + IRQNoFlags () + {6} + }) + } + Device(RTC) { Name(_HID, EisaId("PNP0B00")) Name(_CRS, ResourceTemplate() {
I haven't submitted it yet because I haven't figured out how to write a _STA method that didn't have to (unreliably, and, as Alex pointed out, dangerously) poke at SystemIO port space. However if I do the following in addition to the SMC above (using Gerd's earlier proposed RTC _CRS hack as an example):
diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl index d5aa3f1..b6eb995 100644 --- a/src/acpi-dsdt-hpet.dsl +++ b/src/acpi-dsdt-hpet.dsl @@ -23,12 +23,23 @@ Scope(_SB) { } Return (0x0F) } - Name(_CRS, ResourceTemplate() { - IRQNoFlags() {2, 8} + Name(RESP, ResourceTemplate() { Memory32Fixed(ReadOnly, 0xFED00000, // Address Base 0x00000400, // Address Length ) }) + Name(RESI, ResourceTemplate() { + IRQNoFlags() {0, 8} + }) + Method(_CRS, 0) { + Store(_SB.PCI0.ISA.SMC._STA(), Local0) + If (LEqual(Local0, 0)) { + Return (RESP) + } else { + ConcatenateResTemplate(RESP, RESI, Local1) + Return (Local1) + } + } } }
Windows XP now works fine. If I hardcode the SMC._STA() to return 0 instead, XP still works (OS X obviously does not :)
If I could figure out how to write a reliable _STA method for the SMC, that would detect whether or not it was supplied as "-device applesmc" on the qemu command line, I think we might be on to something...
Thanks, --Gabriel