Patchwork [PULL,for-1.3,0/3] seabios: q35 update

login
register
mail settings
Submitter Gabriel L. Somlo
Date Dec. 4, 2012, 3:39 p.m.
Message ID <20121204153957.GC13356@hedwig.ini.cmu.edu>
Download mbox | patch
Permalink /patch/203683/
State New
Headers show

Comments

Gabriel L. Somlo - Dec. 4, 2012, 3:39 p.m.
On Tue, Dec 04, 2012 at 10:11:38AM -0500, jbaron@redhat.com wrote:
> > I don't have an XP install image anymore, but does replacing 2,8 with
> > 0,8 help ?
> > 
> 
> no.
> 
> > On a few of my machines, this is actually coded as
> > 
> >                         IRQNoFlags ()
> >                             {0}			/* or 2 */
> >                         IRQNoFlags ()
> >                             {8}
> > 
> > Based on my reading of the ACPI manual, this should be syntactically
> > equivalent to the the comma-separated single-line format we're currently
> > using, but could it be that WinXP is picky about the specifics ?
> > 
> 
> Didn't seem to help either. I also tried having just a single irq from
> 0,2,8, and that didn't work either. The only thing that seems to make XP
> happy is completely removing that line. So I'm not sure what is wrong.

I got one more thing to try:


The complete definition for the HPET on my MacPro5,1 is below; along
with the 0xFED00000 value gleaned from the previous SeaBIOS version of
_CRS, I came up with the above. Hopefully it works for WinXP too...

Thanks,
--Gabriel

Device (HPET) {
    Name (_HID, EisaId ("PNP0103"))
    Name (BUF0, ResourceTemplate () {
        IRQNoFlags ()
            {0}
        IRQNoFlags ()
            {8}
        Memory32Fixed (ReadOnly,
            0xFED00000,         // Address Base
            0x00100000,         // Address Length
            _Y09)
    })
    Method (_STA, 0, NotSerialized) {
        If (LGreaterEqual (OSYS, 0x07D1)) {
            If (HPAE) {
                Return (0x0F)
            }
        } Else {
            If (HPAE) {
                Return (0x0B)
            }
        }
        Return (0x00)
    }
    Method (_CRS, 0, Serialized) {
        If (HPAE) {
            CreateDWordField (BUF0, \_SB.PCI0.LPCB.HPET._Y09._BAS,   HPT0)
            If (LEqual (HPAS, 0x01)) {
                Store (0xFED10000, HPT0)
            }
            If (LEqual (HPAS, 0x02)) {
                Store (0xFED20000, HPT0)
            }
            If (LEqual (HPAS, 0x03)) {
                Store (0xFED30000, HPT0)
            }
        }
        Return (BUF0)
    }
}
Gerd Hoffmann - Dec. 4, 2012, 4:56 p.m.
Hi,

> The complete definition for the HPET on my MacPro5,1 is below; along
> with the 0xFED00000 value gleaned from the previous SeaBIOS version of
> _CRS, I came up with the above. Hopefully it works for WinXP too...

> Device (HPET) {
>     Name (_HID, EisaId ("PNP0103"))
>     Name (BUF0, ResourceTemplate () {
>         IRQNoFlags ()
>             {0}
>         IRQNoFlags ()
>             {8}
>         Memory32Fixed (ReadOnly,
>             0xFED00000,         // Address Base
>             0x00100000,         // Address Length
>             _Y09)
>     })
>     Method (_STA, 0, NotSerialized) {
>         If (LGreaterEqual (OSYS, 0x07D1)) {
>             If (HPAE) {
>                 Return (0x0F)
>             }
>         } Else {
>             If (HPAE) {
>                 Return (0x0B)
>             }
>         }
>         Return (0x00)
>     }
>     Method (_CRS, 0, Serialized) {
>         If (HPAE) {
>             CreateDWordField (BUF0, \_SB.PCI0.LPCB.HPET._Y09._BAS,   HPT0)
>             If (LEqual (HPAS, 0x01)) {
>                 Store (0xFED10000, HPT0)
>             }
>             If (LEqual (HPAS, 0x02)) {
>                 Store (0xFED20000, HPT0)
>             }
>             If (LEqual (HPAS, 0x03)) {
>                 Store (0xFED30000, HPT0)
>             }
>         }
>         Return (BUF0)
>     }
> }

Ok, and how does the RTC look like on your MacPro?

thanks,
  Gerd
Gabriel L. Somlo - Dec. 4, 2012, 5:14 p.m.
On Tue, Dec 04, 2012 at 05:56:55PM +0100, Gerd Hoffmann wrote:
> Ok, and how does the RTC look like on your MacPro?

Device (RTC)
{
    Name (_HID, EisaId ("PNP0B00"))
    Name (_CRS, ResourceTemplate ()
    {
        IO (Decode16,
            0x0070,             // Range Minimum
            0x0070,             // Range Maximum
            0x01,               // Alignment
            0x08,               // Length
            )
    })
}
Gerd Hoffmann - Dec. 5, 2012, 6:50 a.m.
On 12/04/12 18:14, Gabriel L. Somlo wrote:
> On Tue, Dec 04, 2012 at 05:56:55PM +0100, Gerd Hoffmann wrote:
>> Ok, and how does the RTC look like on your MacPro?
> 
> Device (RTC)
> {
>     Name (_HID, EisaId ("PNP0B00"))
>     Name (_CRS, ResourceTemplate ()
>     {
>         IO (Decode16,
>             0x0070,             // Range Minimum
>             0x0070,             // Range Maximum
>             0x01,               // Alignment
>             0x08,               // Length
>             )
>     })
> }

Ok, so no IRQ declared for the RTC.  We have IRQ 8 for both rtc and
hpet, which most likely is the root cause for the issue.  You can try
simply dropping the line for testing.  I'll try to come up with
something more clever as the hpet can be disabled in which case we
should keep irq8 assigned to rtc.

cheers,
  Gerd
Gabriel L. Somlo - Dec. 5, 2012, 2:49 p.m.
On Wed, Dec 05, 2012 at 07:50:17AM +0100, Gerd Hoffmann wrote:
> Ok, so no IRQ declared for the RTC.  We have IRQ 8 for both rtc and
> hpet, which most likely is the root cause for the issue.  You can try
> simply dropping the line for testing.  I'll try to come up with
> something more clever as the hpet can be disabled in which case we
> should keep irq8 assigned to rtc.

Yeah, with SnowLeopard, simply leaving out the IRQ on RTC in SeaBIOS
got me all the way to a blue screen with a moving mouse pointer, but
no further :)

However, the acpi-dsdt-isa.dsl RTC patch you just sent to SeaBIOS
has no (negative) impact on my ability to boot SnowLeopard.

Thanks much,
--Gabriel

Patch

diff --git a/src/acpi-dsdt-hpet.dsl b/src/acpi-dsdt-hpet.dsl
index d5aa3f1..8385ce4 100644
--- a/src/acpi-dsdt-hpet.dsl
+++ b/src/acpi-dsdt-hpet.dsl
@@ -23,12 +23,17 @@  Scope(\_SB) {
             }
             Return (0x0F)
         }
-        Name(_CRS, ResourceTemplate() {
+        Name(BUF0, ResourceTemplate() {
             IRQNoFlags() {2, 8}
             Memory32Fixed(ReadOnly,
                 0xFED00000,         // Address Base
                 0x00000400,         // Address Length
-                )
+                _Y09)
         })
+        Method(_CRS, 0, Serialized) {
+            CreateDWordField (BUF0, \_SB.HPET._Y09._BAS, HPT0)
+            Store(0xFED00000, HPT0)
+            Return (BUF0)
+        }
     }
 }