Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- +DefinitionBlock ("DSDT.aml", "DSDT", 1, "LXBIOS", "LXB-DSDT", 1)
- +{
- + /* Define the main processor.*/
- + Scope (\_PR)
- + {
- + Processor (\_PR.CPU0, 0x00, 0x000000, 0x00) {}
- + Processor (\_PR.CPU1, 0x01, 0x000000, 0x00) {}
- + }
- +
- + /* For now only define 2 power states:
- + * - S0 which is fully on
- + * - S5 which is soft off
- + * Any others would involve declaring the wake up methods.
- + */
- + Name (\_S0, Package () { 0x05, 0x05, 0x00, 0x00 })
- + Name (\_S5, Package () { 0x00, 0x00, 0x00, 0x00 })
- +
- + /* Root of the bus hierarchy */
- + Scope (\_SB)
- + {
- + /* Top PCI device */
- + Device (PCI0)
- + {
- + Name (_HID, EisaId ("PNP0A03"))
- + Name (_ADR, 0x00)
- + Name (_UID, 0x00)
- + Name (_BBN, 0x00)
- +
- + /* PCI Routing Table */
- + /* aaa */
- + Name (_PRT, Package () {
- + // Package (0x04) { 0x0001FFFF, 0, 0, 0xB },
- + // Package (0x04) { 0x0004FFFF, 3, 0, 0xB }, // { dev, int pin, static routing 0/1, irq }
- +
- + // Package (0x04) { 0x0009FFFF, 0, 0, 0xB },
- + // Package (0x04) { 0x0009FFFF, 1, 0, 0xB },
- + // Package (0x04) { 0x0009FFFF, 2, 0, 0xB },
- + // Package (0x04) { 0x0009FFFF, 3, 0, 0xB },
- +
- + // Package (0x04) { 0x000AFFFF, 0, 0, 0xB },
- + // Package (0x04) { 0x000AFFFF, 1, 0, 0xB },
- + // Package (0x04) { 0x000AFFFF, 2, 0, 0xB },
- + // Package (0x04) { 0x000AFFFF, 3, 0, 0xB },
- +
- + // Package (0x04) { 0x000BFFFF, 0, 0, 0xB },
- + // Package (0x04) { 0x000BFFFF, 1, 0, 0xB },
- + // Package (0x04) { 0x000BFFFF, 2, 0, 0xB },
- + // Package (0x04) { 0x000BFFFF, 3, 0, 0xB },
- +
- + // Package (0x04) { 0x000CFFFF, 0, 0, 0xB },
- + // Package (0x04) { 0x000CFFFF, 1, 0, 0xB },
- + // Package (0x04) { 0x000CFFFF, 2, 0, 0xB },
- + // Package (0x04) { 0x000CFFFF, 3, 0, 0xB },
- +
- + Package (0x04) { 0x0001FFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
- + Package (0x04) { 0x0004FFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 }, // { dev, int pin, static routing 0/1, irq }
- +
- + Package (0x04) { 0x0009FFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
- + Package (0x04) { 0x0009FFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
- + Package (0x04) { 0x0009FFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
- + Package (0x04) { 0x0009FFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
- +
- + Package (0x04) { 0x000AFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
- + Package (0x04) { 0x000AFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
- + Package (0x04) { 0x000AFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
- + Package (0x04) { 0x000AFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
- +
- + Package (0x04) { 0x000BFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
- + Package (0x04) { 0x000BFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
- + Package (0x04) { 0x000BFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
- + Package (0x04) { 0x000BFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
- +
- + Package (0x04) { 0x000CFFFF, 0, \_SB.PCI0.LPCB.LNKA, 0 },
- + Package (0x04) { 0x000CFFFF, 1, \_SB.PCI0.LPCB.LNKB, 0 },
- + Package (0x04) { 0x000CFFFF, 2, \_SB.PCI0.LPCB.LNKC, 0 },
- + Package (0x04) { 0x000CFFFF, 3, \_SB.PCI0.LPCB.LNKD, 0 },
- +
- + })
- +
- + // Intel LPC Bus Device - 0:7.0
- +
- + Device (LPCB)
- + {
- + Name(_ADR, 0x0070000)
- +
- + OperationRegion(LPC0, PCI_Config, 0x00, 0x100)
- + Field (LPC0, AnyAcc, NoLock, Preserve)
- + {
- + Offset (0x40),
- + PMBS, 16, // PMBASE
- + Offset (0x60), // Interrupt Routing Registers
- + PRTA, 8,
- + PRTB, 8,
- + PRTC, 8,
- + PRTD, 8,
- + }
- +
- + // this should go to some other file maybe
- +
- + Device (LNKA)
- + {
- + Name (_HID, EISAID("PNP0C0F"))
- + Name (_UID, 1)
- +
- + // Disable method
- + Method (_DIS, 0, Serialized)
- + {
- + Store (0x80, PRTA)
- + }
- +
- + // Possible Resource Settings for this Link
- + Name (_PRS, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared)
- + { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
- + })
- +
- + // Current Resource Settings for this link
- + Method (_CRS, 0, Serialized)
- + {
- + Name (RTLA, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared) {}
- + })
- + CreateWordField(RTLA, 1, IRQ0)
- +
- + // Clear the WordField
- + Store (Zero, IRQ0)
- +
- + // Set the bit from PRTA
- + ShiftLeft(1, And(PRTA, 0x0f), IRQ0)
- +
- + Return (RTLA)
- + }
- +
- + // Set Resource Setting for this IRQ link
- + Method (_SRS, 1, Serialized)
- + {
- + CreateWordField(Arg0, 1, IRQ0)
- +
- + // Which bit is set?
- + FindSetRightBit(IRQ0, Local0)
- +
- + Decrement(Local0)
- + Store(Local0, PRTA)
- + }
- +
- + // Status
- + Method (_STA, 0, Serialized)
- + {
- + If(And(PRTA, 0x80)) {
- + Return (0x9)
- + } Else {
- + Return (0xb)
- + }
- + }
- + } // LNKA
- +
- + Device (LNKB)
- + {
- + Name (_HID, EISAID("PNP0C0F"))
- + Name (_UID, 2)
- +
- + // Disable method
- + Method (_DIS, 0, Serialized)
- + {
- + Store (0x80, PRTB)
- + }
- +
- + // Possible Resource Settings for this Link
- + Name (_PRS, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared)
- + { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
- + })
- +
- + // Current Resource Settings for this link
- + Method (_CRS, 0, Serialized)
- + {
- + Name (RTLB, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared) {}
- + })
- + CreateWordField(RTLB, 1, IRQ0)
- +
- + // Clear the WordField
- + Store (Zero, IRQ0)
- +
- + // Set the bit from PRTB
- + ShiftLeft(1, And(PRTB, 0x0f), IRQ0)
- +
- + Return (RTLB)
- + }
- +
- + // Set Resource Setting for this IRQ link
- + Method (_SRS, 1, Serialized)
- + {
- + CreateWordField(Arg0, 1, IRQ0)
- +
- + // Which bit is set?
- + FindSetRightBit(IRQ0, Local0)
- +
- + Decrement(Local0)
- + Store(Local0, PRTB)
- + }
- +
- + // Status
- + Method (_STA, 0, Serialized)
- + {
- + If(And(PRTB, 0x80)) {
- + Return (0x9)
- + } Else {
- + Return (0xb)
- + }
- + }
- + } // LNKB
- +
- + Device (LNKC)
- + {
- + Name (_HID, EISAID("PNP0C0F"))
- + Name (_UID, 3)
- +
- + // Disable method
- + Method (_DIS, 0, Serialized)
- + {
- + Store (0x80, PRTC)
- + }
- +
- + // Possible Resource Settings for this Link
- + Name (_PRS, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared)
- + { 1, 3, 4, 5, 6, 7, 10, 12, 14, 15 }
- + })
- +
- + // Current Resource Settings for this link
- + Method (_CRS, 0, Serialized)
- + {
- + Name (RTLC, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared) {}
- + })
- + CreateWordField(RTLC, 1, IRQ0)
- +
- + // Clear the WordField
- + Store (Zero, IRQ0)
- +
- + // Set the bit from PRTC
- + ShiftLeft(1, And(PRTC, 0x0f), IRQ0)
- +
- + Return (RTLC)
- + }
- +
- + // Set Resource Setting for this IRQ link
- + Method (_SRS, 1, Serialized)
- + {
- + CreateWordField(Arg0, 1, IRQ0)
- +
- + // Which bit is set?
- + FindSetRightBit(IRQ0, Local0)
- +
- + Decrement(Local0)
- + Store(Local0, PRTC)
- + }
- +
- + // Status
- + Method (_STA, 0, Serialized)
- + {
- + If(And(PRTC, 0x80)) {
- + Return (0x9)
- + } Else {
- + Return (0xb)
- + }
- + }
- + } // LNKC
- +
- + Device (LNKD)
- + {
- + Name (_HID, EISAID("PNP0C0F"))
- + Name (_UID, 4)
- +
- + // Disable method
- + Method (_DIS, 0, Serialized)
- + {
- + Store (0x80, PRTD)
- + }
- +
- + // Possible Resource Settings for this Link
- + Name (_PRS, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared)
- + { 1, 3, 4, 5, 6, 7, 11, 12, 14, 15 }
- + })
- +
- + // Current Resource Settings for this link
- + Method (_CRS, 0, Serialized)
- + {
- + Name (RTLD, ResourceTemplate()
- + {
- + IRQ(Level, ActiveLow, Shared) {}
- + })
- + CreateWordField(RTLD, 1, IRQ0)
- +
- + // Clear the WordField
- + Store (Zero, IRQ0)
- +
- + // Set the bit from PRTD
- + ShiftLeft(1, And(PRTD, 0x0f), IRQ0)
- +
- + Return (RTLD)
- + }
- +
- + // Set Resource Setting for this IRQ link
- + Method (_SRS, 1, Serialized)
- + {
- + CreateWordField(Arg0, 1, IRQ0)
- +
- + // Which bit is set?
- + FindSetRightBit(IRQ0, Local0)
- +
- + Decrement(Local0)
- + Store(Local0, PRTD)
- + }
- +
- + // Status
- + Method (_STA, 0, Serialized)
- + {
- + If(And(PRTD, 0x80)) {
- + Return (0x9)
- + } Else {
- + Return (0xb)
- + }
- + }
- + } // LNKD
- +
- + // end
- +
- + // now modify the PRT method to use:
- +
- + // Package() { 0x0003ffff, 0, \_SB.PCI0.LPCB.LNKA, 0},
- + // Package() { 0x0003ffff, 1, \_SB.PCI0.LPCB.LNKB, 0},
- + // Package() { 0x0003ffff, 2, \_SB.PCI0.LPCB.LNKC, 0},
- + // Package() { 0x0003ffff, 3, \_SB.PCI0.LPCB.LNKD, 0},
- +
- + } // LPCB
- +
- + Device (ISA) {
- + Name (_ADR, 0x00110000)
- +
- + /* PS/2 keyboard (seems to be important for WinXP install) */
- + Device (KBD)
- + {
- + Name (_HID, EisaId ("PNP0303"))
- + Method (_STA, 0, NotSerialized)
- + {
- + Return (0x0f)
- + }
- + Method (_CRS, 0, NotSerialized)
- + {
- + Name (TMP, ResourceTemplate () {
- + IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
- + IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
- + IRQNoFlags () {1}
- + })
- + Return (TMP)
- + }
- + }
- +
- + /* PS/2 mouse */
- + Device (MOU)
- + {
- + Name (_HID, EisaId ("PNP0F13"))
- + Method (_STA, 0, NotSerialized)
- + {
- + Return (0x0f)
- + }
- + Method (_CRS, 0, NotSerialized)
- + {
- + Name (TMP, ResourceTemplate () {
- + IRQNoFlags () {12}
- + })
- + Return (TMP)
- + }
- + }
- +
- + /* PS/2 floppy controller */
- + Device (FDC0)
- + {
- + Name (_HID, EisaId ("PNP0700"))
- + Method (_STA, 0, NotSerialized)
- + {
- + Return (0x0f)
- + }
- + Method (_CRS, 0, NotSerialized)
- + {
- + Name (BUF0, ResourceTemplate () {
- + IO (Decode16, 0x03F2, 0x03F2, 0x00, 0x04)
- + IO (Decode16, 0x03F7, 0x03F7, 0x00, 0x01)
- + IRQNoFlags () {6}
- + DMA (Compatibility, NotBusMaster, Transfer8) {2}
- + })
- + Return (BUF0)
- + }
- + }
- + }
- + }
- +
- + }
- +}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement