Date: Sat, 10 Dec 2005 16:49:18 -0600 From: Craig Boston <craig@tobuj.gank.org> To: freebsd-mobile@freebsd.org Cc: Ariff Abdullah <ariff@FreeBSD.org> Subject: Toshiba Satellite L25 followup Message-ID: <20051210224917.GA54870@nowhere> In-Reply-To: <20051206035228.GA34979@nowhere> References: <20051130020734.GA6577@nowhere> <200512020817.55769.jhb@freebsd.org> <20051203005104.GA22567@nowhere> <200512031630.59476.jhb@freebsd.org> <20051204004131.GA7596@nowhere> <20051206015129.GA34415@nowhere> <20051206035228.GA34979@nowhere>
next in thread | previous in thread | raw e-mail | index | archive | help
--9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline (bcc to -hackers since it also mostly concludes the "Weird PCI interrupt delivery problem" thread) Here's the current status of getting this model laptop to work with FreeBSD. Summary ________________________________________________________________ It's possible to get most features working, but takes some effort. I'd not recommend buying one of these to anyone who doesn't want to get their hands dirty with kernel patches and other workarounds. The same warning may apply to other ATI IXP400 chipset based machines as well. ACPI __________________________________________________________________ Works, sort of. ASL is in pretty bad shape. Patch is attached that fixes the battery status and interrupt routing. More details on interrupt routing at the bottom of this message. Suspend is still broken -- it suspends but isn't able to wake up. APIC ___________________________________________________________________ Broken. Also, the MP Table is broken so it won't even boot without either ACPI or kernel workarounds. Always use hint.apic.0.disabled=1 for now. Sound __________________________________________________________________ Works. I had started reverse engineering the chip using the windows driver in a modified qemu. Was half done (ac97 interface and mixer worked, DMA transfers partially working), when I discovered that Ariff had beaten me to the punch and committed a driver to current a few days ago :) Ariff, I'm CC-ing you as well because there is still a small issue with the mixer. This particular ac97 codec seems to support the mute bit of AC97_MIX_BEEP, but no volume levels other than 0 (max). As a result, it gets muted and marked as disabled so there is no way to re-enable the PC speaker. Interestingly, the default value of the register seems to be 0x8000 even though the speaker is _NOT_ muted at bootup. I've got a local hack to work around it, but it's not a general solution. The codec ID is 0x43585430. SMBus __________________________________________________________________ Doesn't seem to be a driver yet. Can get temperature through ACPI so this may not be an issue. Modem __________________________________________________________________ No driver. Apparently based on the Conexant AC97 codec as well (i.e. Winmodem). I've seen references to Linux folks working on this, so it may be possible to get it working, but I haven't tried yet. Video __________________________________________________________________ 2D acceleration via the linux drivers (see my original post at http://docs.freebsd.org/cgi/getmsg.cgi?fetch=155785+0+archive/2005/freebsd-mobile/20051127.freebsd-mobile for instructions). xorg-server-snap should eventually support this, but it just segfaults for me. Here's the rundown for the whole interrupt thread: APIC ___________________________________________________________________ The APIC is busted; I'm not sure why. Something is causing it to start ignoring certain pins after a while. The ACPI and i8254 timecounters exacerbate whatever it is that's causing it to fail. Running with WITNESS, the APIC seems to work ok. My current theory is that some register is being updated faster than the hardware can handle, and WITNESS slows things down enough to not trigger it. Windows may have additional delays or timing differences in how it accesses the hardware so it was never noticed during testing. !APIC (dual 8259A PIC) _________________________________________________ Without ACPI, Cardbus doesn't generate interrupts. Thanks to jhb's very informative post to stable the other day, I'm certain that it's because the BIOS isn't setting up the link device that is connected to it. There is no $PIR table, so although we can try to map an interrupt to it, we can't program the link device to route it anywhere. With ACPI, the _PRT provided for the secondary PCI bus is completely wrong. After much trial and error I've finally figured out which PCI link is connected to which slot/pin. The attached patch to the ASL is able to get everything routed correctly for the +ACPI -APIC case. Running without the APIC isn't quite optimal, but at least everything works. I hope that all this is helpful to any others who have one of these machines. I'll be attempting to contact Toshiba about these issues and see if we can't get some of them addressed in a future BIOS update. Craig --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="acpifix.diff" --- toshiba.asl Sat Nov 26 14:37:24 2005 +++ fixed2.asl Wed Dec 7 17:26:59 2005 @@ -192,6 +192,8 @@ Notify (\_SB.BAT1, 0x81) } } + + Return (0x0) } Scope (\_SI) @@ -1023,408 +1025,6 @@ Z00A, 32 } - Device (PB2) - { - Name (_ADR, 0x00020000) - Name (_PRW, Package (0x02) - { - 0x18, - 0x04 - }) - Method (_PRT, 0, NotSerialized) - { - If (GPIC) - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - 0x00, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - 0x00, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - 0x00, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - 0x00, - 0x11 - } - }) - } - Else - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKB, - 0x00 - } - }) - } - } - } - - Device (PB3) - { - Name (_ADR, 0x00030000) - Method (_PRT, 0, NotSerialized) - { - If (GPIC) - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - 0x00, - 0x13 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - 0x00, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - 0x00, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - 0x00, - 0x12 - } - }) - } - Else - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKC, - 0x00 - } - }) - } - } - } - - Device (PB4) - { - Name (_ADR, 0x00040000) - OperationRegion (XPCB, PCI_Config, 0x58, 0x24) - Field (XPCB, ByteAcc, NoLock, Preserve) - { - Offset (0x10), - LKCN, 16, - LKST, 16, - Offset (0x1A), - SLST, 16 - } - - OperationRegion (XPRI, PCI_Config, 0xE0, 0x08) - Field (XPRI, ByteAcc, NoLock, Preserve) - { - XPIR, 32, - XPID, 32 - } - - OperationRegion (XPEX, SystemMemory, 0xE0020100, 0x0100) - Field (XPEX, DWordAcc, NoLock, Preserve) - { - Offset (0x40), - ECPH, 32, - Offset (0x58), - VC02, 32, - VC0S, 32 - } - - Method (XPDL, 0, NotSerialized) - { - Store (Zero, Local0) - If (And (VC02, 0x00020000)) - { - Store (Ones, Local0) - } - - Return (Local0) - } - - Method (XPRD, 1, NotSerialized) - { - Store (Arg0, XPIR) - Store (XPID, Local0) - Store (0x00, XPIR) - Return (Local0) - } - - Method (XPWR, 2, NotSerialized) - { - Store (Arg0, XPIR) - Store (Arg1, XPID) - Store (0x00, XPIR) - } - - Method (XPRT, 0, NotSerialized) - { - Store (XPRD (0xA2), Local0) - And (Local0, Not (0x07), Local0) - ShiftRight (Local0, 0x04, Local1) - And (Local1, 0x07, Local1) - Or (Local0, Local1, Local0) - Or (Local0, 0x0100, Local0) - XPWR (0xA2, Local0) - } - - Method (XPLP, 1, NotSerialized) - { - If (LEqual (\_SB.PCI0.GPPM (), 0x02)) - { - Store (0x1010, Local1) - } - Else - { - Store (0x0404, Local1) - } - - Store (\_SB.PCI0.NBXR (0x00010065), Local2) - If (Arg0) - { - And (Local2, Not (Local1), Local2) - } - Else - { - Or (Local2, Local1, Local2) - } - - \_SB.PCI0.NBXW (0x00010065, Local2) - } - - Method (XPR2, 0, NotSerialized) - { - Store (LKCN, Local0) - And (Local0, Not (0x20), Local0) - Store (Local0, LKCN) - Or (Local0, 0x20, Local0) - Store (Local0, LKCN) - Store (0x64, Local1) - Store (0x01, Local2) - While (LAnd (Local1, Local2)) - { - Sleep (0x01) - Store (LKST, Local3) - If (And (Local3, 0x0800)) - { - Decrement (Local1) - } - Else - { - Store (0x00, Local2) - } - } - - And (Local0, Not (0x20), Local0) - Store (Local0, LKCN) - If (LNot (Local2)) - { - Return (Ones) - } - Else - { - Return (Zero) - } - } - - Device (NCRD) - { - Name (_ADR, 0x00) - OperationRegion (PCFG, PCI_Config, 0x00, 0x08) - Field (PCFG, DWordAcc, NoLock, Preserve) - { - DVID, 32, - PCMS, 32 - } - - Method (_RMV, 0, NotSerialized) - { - Return (0x01) - } - - Method (_STA, 0, NotSerialized) - { - If (\_SB.PCI0.SMB.GVT6) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - } - - Method (_PRT, 0, NotSerialized) - { - If (GPIC) - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - 0x00, - 0x10 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - 0x00, - 0x11 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - 0x00, - 0x12 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - 0x00, - 0x13 - } - }) - } - Else - { - Return (Package (0x04) - { - Package (0x04) - { - 0xFFFF, - 0x00, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0xFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKD, - 0x00 - } - }) - } - } - } - Scope (\_GPE) { } @@ -1459,291 +1059,6 @@ }) } - Device (SATA) - { - Name (_ADR, 0x00120000) - Name (B5EN, 0x00) - Name (BA_5, 0x00) - OperationRegion (SATX, PCI_Config, 0x00, 0x28) - Field (SATX, AnyAcc, NoLock, Preserve) - { - VIDI, 32, - Offset (0x24), - BA05, 32 - } - - Method (GBAA, 0, NotSerialized) - { - Store (BA_5, B5EN) - If (LEqual (BA_5, 0xFFFFFFFF)) - { - Store (0x00, B5EN) - Return (0xFFF80000) - } - Else - { - Store (0x01, B5EN) - Return (BA_5) - } - } - - OperationRegion (BAR5, SystemMemory, GBAA, 0x0200) - Field (BAR5, AnyAcc, NoLock, Preserve) - { - Offset (0x104), - CSTX, 1, - CST0, 1, - Offset (0x10A), - STA0, 1, - Offset (0x184), - CSTY, 1, - CST1, 1, - Offset (0x18A), - STA1, 1 - } - - Method (_INI, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (B5EN) - { - If (\_SB.PCI0.SATA.STA0) - { - Store (\_SB.PCI0.SATA.STA0, \_SB.PCI0.SATA.STA0) - } - - If (\_SB.PCI0.SATA.STA1) - { - Store (\_SB.PCI0.SATA.STA1, \_SB.PCI0.SATA.STA1) - } - } - } - - Device (PRID) - { - Name (_ADR, 0x00) - Device (P_D0) - { - Name (_ADR, 0x00) - Method (_STA, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (LEqual (B5EN, 0x00)) - { - Return (0x00) - } - - If (\_SB.PCI0.SATA.CST0) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - } - } - - Device (SECD) - { - Name (_ADR, 0x01) - Device (S_D0) - { - Name (_ADR, 0x00) - Method (_STA, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (LEqual (B5EN, 0x00)) - { - Return (0x00) - } - - If (\_SB.PCI0.SATA.CST1) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - } - } - } - - Device (SAT2) - { - Name (_ADR, 0x00110000) - Name (B5EN, 0x00) - Name (BA_5, 0x00) - OperationRegion (SATX, PCI_Config, 0x00, 0x28) - Field (SATX, AnyAcc, NoLock, Preserve) - { - VIDI, 32, - Offset (0x24), - BA05, 32 - } - - Method (GBAA, 0, NotSerialized) - { - Store (BA_5, B5EN) - If (LEqual (BA_5, 0xFFFFFFFF)) - { - Store (0x00, B5EN) - Return (0xFFF80000) - } - Else - { - Store (0x01, B5EN) - Return (BA_5) - } - } - - OperationRegion (BAR5, SystemMemory, GBAA, 0x0200) - Field (BAR5, AnyAcc, NoLock, Preserve) - { - Offset (0x104), - CSTX, 1, - CST0, 1, - Offset (0x10A), - STA0, 1, - Offset (0x184), - CSTY, 1, - CST1, 1, - Offset (0x18A), - STA1, 1 - } - - Method (_INI, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (B5EN) - { - If (\_SB.PCI0.SAT2.STA0) - { - Store (\_SB.PCI0.SAT2.STA0, \_SB.PCI0.SAT2.STA0) - } - - If (\_SB.PCI0.SAT2.STA1) - { - Store (\_SB.PCI0.SAT2.STA1, \_SB.PCI0.SAT2.STA1) - } - } - } - - Device (PRID) - { - Name (_ADR, 0x00) - Device (P_D0) - { - Name (_ADR, 0x00) - Method (_STA, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (LEqual (B5EN, 0x00)) - { - Return (0x00) - } - - If (\_SB.PCI0.SAT2.CST0) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - } - } - - Device (SECD) - { - Name (_ADR, 0x01) - Device (S_D0) - { - Name (_ADR, 0x00) - Method (_STA, 0, NotSerialized) - { - Store (BA05, BA_5) - GBAA () - If (LEqual (B5EN, 0x00)) - { - Return (0x00) - } - - If (\_SB.PCI0.SAT2.CST1) - { - Return (0x0F) - } - Else - { - Return (0x00) - } - } - } - } - } - - Scope (\_GPE) - { - Method (_L1F, 0, NotSerialized) - { - Sleep (0x07D0) - Store (\_SB.PCI0.SATA.BA05, \_SB.PCI0.SATA.BA_5) - \_SB.PCI0.SATA.GBAA () - If (\_SB.PCI0.SATA.B5EN) - { - If (\_SB.PCI0.SATA.STA0) - { - Notify (\_SB.PCI0.SATA.PRID.P_D0, 0x00) - Sleep (0x07D0) - Notify (\_SB.PCI0.SATA.PRID, 0x01) - Sleep (0x07D0) - Store (\_SB.PCI0.SATA.STA0, \_SB.PCI0.SATA.STA0) - } - - If (\_SB.PCI0.SATA.STA1) - { - Notify (\_SB.PCI0.SATA.SECD.S_D0, 0x00) - Sleep (0x07D0) - Notify (\_SB.PCI0.SATA.SECD, 0x01) - Sleep (0x07D0) - Store (\_SB.PCI0.SATA.STA1, \_SB.PCI0.SATA.STA1) - } - } - - Store (\_SB.PCI0.SAT2.BA05, \_SB.PCI0.SAT2.BA_5) - \_SB.PCI0.SAT2.GBAA () - If (\_SB.PCI0.SAT2.B5EN) - { - If (\_SB.PCI0.SAT2.STA0) - { - Notify (\_SB.PCI0.SAT2.PRID.P_D0, 0x00) - Sleep (0x07D0) - Notify (\_SB.PCI0.SAT2.PRID, 0x01) - Sleep (0x07D0) - Store (\_SB.PCI0.SAT2.STA0, \_SB.PCI0.SAT2.STA0) - } - - If (\_SB.PCI0.SAT2.STA1) - { - Notify (\_SB.PCI0.SAT2.SECD.S_D0, 0x00) - Sleep (0x07D0) - Notify (\_SB.PCI0.SAT2.SECD, 0x01) - Sleep (0x07D0) - Store (\_SB.PCI0.SAT2.STA1, \_SB.PCI0.SAT2.STA1) - } - } - } - } - Device (SMB) { Name (_ADR, 0x00140000) @@ -1761,7 +1076,7 @@ } OperationRegion (SMB, PCI_Config, 0x69, 0x01) - Field (SMB, WordAcc, NoLock, Preserve) + Field (SMB, ByteAcc, NoLock, Preserve) { SIRQ, 8 } @@ -3493,191 +2808,39 @@ } Else { - Return (Package (0x17) + Return (Package (0x04) { Package (0x04) { - 0x0008FFFF, - 0x00, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0x0008FFFF, - 0x01, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0x0009FFFF, - 0x00, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0x000AFFFF, - 0x00, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0x000AFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0x000AFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0x000AFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0x000BFFFF, - 0x00, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0x000BFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0x000BFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0x000BFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0x000CFFFF, + 0x0001FFFF, 0x00, - \_SB.PCI0.LPC0.LNKC, - 0x00 - }, - - Package (0x04) - { - 0x000CFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0x000CFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0x000CFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKB, + \_SB.PCI0.LPC0.LNKE, 0x00 }, Package (0x04) { - 0x000DFFFF, + 0x0002FFFF, 0x00, - \_SB.PCI0.LPC0.LNKD, - 0x00 - }, - - Package (0x04) - { - 0x000DFFFF, - 0x01, - \_SB.PCI0.LPC0.LNKA, - 0x00 - }, - - Package (0x04) - { - 0x000DFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0x000DFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKC, + \_SB.PCI0.LPC0.LNKF, 0x00 }, Package (0x04) { - 0x000EFFFF, + 0x0004FFFF, 0x00, - \_SB.PCI0.LPC0.LNKA, + \_SB.PCI0.LPC0.LNKG, 0x00 }, Package (0x04) { - 0x000EFFFF, + 0x0004FFFF, 0x01, - \_SB.PCI0.LPC0.LNKB, - 0x00 - }, - - Package (0x04) - { - 0x000EFFFF, - 0x02, - \_SB.PCI0.LPC0.LNKC, + \_SB.PCI0.LPC0.LNKH, 0x00 }, - - Package (0x04) - { - 0x000EFFFF, - 0x03, - \_SB.PCI0.LPC0.LNKD, - 0x00 - } }) } } @@ -3851,8 +3014,8 @@ Name (PBST, Package (0x04) { 0x00, - Z00D, - Z00D, + 0xFFFFFFFF, + 0xFFFFFFFF, 0x2710 }) Name (ERRC, 0x00) --9amGYk9869ThD9tj--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20051210224917.GA54870>