roisoft
New member
Optimización fixes código DSDT Snow Leopard varias placas base
Saludos!
Quizás sería interesante reconvertir este hilo en uno un tanto más general en donde añadieramos los cambios que usamos en nuestros dsdt y que nos van bien a nuestras placas.... por ejemplo os aporto una serie de cambios que uso en el dsdt de mi MSI x58 pero que son perfectamente válidos para placas Asus P6x tb.
obviamente a estas alturas todos sabemos como descompilar/recompilar el dsdt, y aplicar los típicos fixes (alias etc...) partiendo de esa base os añado lo que he modificado para hacer que esta placa se comporte perfectamente....
1. añadido de External PDCx y Método DTGP en la cabecera del dsdt (DTGP inyecta parámetros en memoria y PDCx llama a una serie de direcciones en las tablas SSDT realcionadas con el powermanagement. )
/*
* Intel ACPI Component Architecture
* AML Disassembler version 20090521
*
* Disassembly of /home/user/Desktop/dsdt/DSDT2.aml, Mon Sep 28 12:04:40 2009
*
*
* Original Table Header:
* Signature "DSDT"
* Length 0x000061EF (25071)
* Revision 0x01 **** ACPI 1.0, no 64-bit math support
* Checksum 0x28
* OEM ID "A7522"
* OEM Table ID "A7522300"
* OEM Revision 0x00000300 (768)
* Compiler ID "INTL"
* Compiler Version 0x20090730 (537462576)
*/
DefinitionBlock ("DSDT.aml", "DSDT", 1, "A7522", "A7522300", 0x00000300)
{
External (PDC7) // llamada a direcciones en otra tabla (ssdt) de ahí el external
External (PDC6)
External (PDC5)
External (PDC4)
External (PDC3)
External (PDC2)
External (PDC1)
External (PDC0)
Method (DTGP, 5, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LEqual (Arg1, One))
{
If (LEqual (Arg2, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg4)
Return (One)
}
If (LEqual (Arg2, One))
{
Return (One)
}
}
}
Store (Buffer (One)
{
0x00
}, Arg4)
Return (Zero)
}
Scope (_PR) // eliminado de alias
{
Processor (P001, 0x01, 0x00000810, 0x06) {}
Processor (P002, 0x02, 0x00000000, 0x00) {}
Processor (P003, 0x03, 0x00000000, 0x00) {}
Processor (P004, 0x04, 0x00000000, 0x00) {}
Processor (P005, 0x05, 0x00000000, 0x00) {}
Processor (P006, 0x06, 0x00000000, 0x00) {}
Processor (P007, 0x07, 0x00000000, 0x00) {}
Processor (P008, 0x08, 0x00000000, 0x00) {}
}
.................
..................
2. Añadido Método PNOT relacionado con el porwermanagement y la notificacion del estado de la cpu, añadido justo después del cierre del Método OSYS.
Method (OSYS, 0, NotSerialized)
{
Store (0x10, Local0)
If (CondRefOf (_OSI, Local1))
{
If (_OSI ("Windows 2000"))
{
Store (0x12, Local0)
}
If (_OSI ("Windows 2001"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001.1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2001.1 SP1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2006"))
{
Store (0x15, Local0)
}
}
Else
{
If (MCTH (_OS, "Microsoft Windows NT"))
{
Store (0x12, Local0)
}
Else
{
If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
{
Store (0x11, Local0)
}
If (MCTH (_OS, "Linux"))
{
Store (One, Local0)
}
}
}
Return (Local0)
}
Method (PNOT, 0, Serialized)
{
If (MPEN)
{
If (And (PDC0, 0x08))
{
Notify (\_PR.P001, 0x80)
If (And (PDC0, 0x10))
{
Sleep (0x64)
Notify (\_PR.P001, 0x81)
}
}
If (And (PDC1, 0x08))
{
Notify (\_PR.P002, 0x80)
If (And (PDC1, 0x10))
{
Sleep (0x64)
Notify (\_PR.P002, 0x81)
}
}
If (And (PDC2, 0x08))
{
Notify (\_PR.P003, 0x80)
If (And (PDC2, 0x10))
{
Sleep (0x64)
Notify (\_PR.P003, 0x81)
}
}
If (And (PDC3, 0x08))
{
Notify (\_PR.P004, 0x80)
If (And (PDC3, 0x10))
{
Sleep (0x64)
Notify (\_PR.P004, 0x81)
}
}
If (And (PDC4, 0x08))
{
Notify (\_PR.P005, 0x80)
If (And (PDC4, 0x10))
{
Sleep (0x64)
Notify (\_PR.P005, 0x81)
}
}
If (And (PDC5, 0x08))
{
Notify (\_PR.P006, 0x80)
If (And (PDC5, 0x10))
{
Sleep (0x64)
Notify (\_PR.P006, 0x81)
}
}
If (And (PDC6, 0x08))
{
Notify (\_PR.P007, 0x80)
If (And (PDC6, 0x10))
{
Sleep (0x64)
Notify (\_PR.P007, 0x81)
}
}
If (And (PDC7, 0x08))
{
Notify (\_PR.P008, 0x80)
If (And (PDC7, 0x10))
{
Sleep (0x64)
Notify (\_PR.P008, 0x81)
}
}
}
Else
{
Notify (\_PR.P001, 0x80)
Sleep (0x64)
Notify (\_PR.P001, 0x81)
}
}
3. Registrado de Devices que no aparecen en el DSDT y que causan errores en los log de inicio de OSX relacionados con "missing ACPI devices..."
Device ESI y Device SBUS
//esta es la salida LSPCI de los dispositivos que nos provocan el error
// 00:00.0 Host bridge: Intel Corporation X58 I/O Hub to ESI Port (rev 12)
//00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
// buscamos Device (PCI0) y aprovechamos para registrar ESI y el SBUS utilizando código extraido del DSDT del MacPro4,1
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A08"))
Name (_CID, EisaId ("PNP0A03"))
Name (_UID, Zero)
Name (_ADR, Zero)
Method (^BN00, 0, NotSerialized)
{
Return (Zero)
}
Method (_BBN, 0, NotSerialized)
{
Return (BN00 ())
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR00)
}
Return (PR00)
}
Device (ESI)
{
Name (_ADR, Zero)
Method (_STA, 0, NotSerialized)
{
Return (0x0B)
}
}
...........
..........
// El SBUS añadirlo justo antes del Device (USB0)
Device (SBUS)
{
Name (_ADR, 0x001F0003)
OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)
Field (SMBP, ordAcc, NoLock, Preserve)
{
, 2,
I2CE, 1
}
OperationRegion (SMBE, PCI_Config, 0x04, 0x02)
Field (SMBE, AnyAcc, NoLock, Preserve)
{
IOSE, 1
}
OperationRegion (SMBI, SystemIO, 0x4000, 0x10)
Field (SMBI, ByteAcc, NoLock, Preserve)
{
HSTS, 8,
Offset (0x02),
HCON, 8,
HCOM, 8,
TXSA, 8,
DAT0, 8,
DAT1, 8,
HBDR, 8,
PECR, 8,
RXSA, 8,
SDAT, 16
}
Name (SBOK, Zero)
Method (ENAB, 0, NotSerialized)
{
Store (One, IOSE)
Store (One, SBOK)
}
Method (DISB, 0, NotSerialized)
{
Store (Zero, SBOK)
}
Method (SSXB, 2, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SRXB, 1, Serialized)
{
If (STRT ())
{
Return (0xFFFF)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (0x44, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (DAT0)
}
Return (0xFFFF)
}
Method (SWRB, 3, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (Arg2, DAT0)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SRDB, 2, Serialized)
{
If (STRT ())
{
Return (0xFFFF)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (Arg1, HCOM)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (DAT0)
}
Return (0xFFFF)
}
Method (SBLW, 4, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Arg3, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (SizeOf (Arg2), DAT0)
Store (Zero, Local1)
Store (DerefOf (Index (Arg2, Zero)), HBDR)
Store (0x54, HCON)
While (LGreater (SizeOf (Arg2), Local1))
{
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (0x80, HSTS)
Increment (Local1)
If (LGreater (SizeOf (Arg2), Local1))
{
Store (DerefOf (Index (Arg2, Local1)), HBDR)
}
}
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SBLR, 3, Serialized)
{
Name (TBUF, Buffer (0x0100) {})
If (STRT ())
{
Return (Zero)
}
Store (Arg2, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (Arg1, HCOM)
Store (0x54, HCON)
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (DAT0, Index (TBUF, Zero))
Store (0x80, HSTS)
Store (One, Local1)
While (LLess (Local1, DerefOf (Index (TBUF, Zero))))
{
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (HBDR, Index (TBUF, Local1))
Store (0x80, HSTS)
Increment (Local1)
}
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (TBUF)
}
Return (Zero)
}
Method (STRT, 0, Serialized)
{
Store (0xC8, Local0)
While (Local0)
{
If (And (HSTS, 0x40))
{
Decrement (Local0)
Sleep (One)
If (LEqual (Local0, Zero))
{
Return (One)
}
}
Else
{
Store (Zero, Local0)
}
}
Store (0x0FA0, Local0)
While (Local0)
{
If (And (HSTS, One))
{
Decrement (Local0)
Stall (0x32)
If (LEqual (Local0, Zero))
{
KILL ()
}
}
Else
{
Return (Zero)
}
}
Return (One)
}
Method (COMP, 0, Serialized)
{
Store (0x0FA0, Local0)
While (Local0)
{
If (And (HSTS, 0x02))
{
Return (One)
}
Else
{
Decrement (Local0)
Stall (0x32)
If (LEqual (Local0, Zero))
{
KILL ()
}
}
}
Return (Zero)
}
Method (KILL, 0, Serialized)
{
Or (HCON, 0x02, HCON)
Or (HSTS, 0xFF, HSTS)
}
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, Zero)
Device (MKY0)
{
Name (_ADR, Zero)
Name (_CID, "mikey")
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x07)
{
"refnum",
Zero,
"address",
0x39,
"device-id",
0x0CCB,
Buffer (One)
{
0x00
}
}, Local0)
SHIT (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Method (H1EN, 1, Serialized)
{
If (LLessEqual (Arg0, One))
{
If (LEqual (Arg0, One))
{
Or (GL04, 0x04, GL04)
}
Else
{
And (GL04, 0xFB, GL04)
}
}
}
Method (H1IL, 0, Serialized)
{
ShiftRight (And (GL00, 0x02), One, Local0)
Return (Local0)
}
Method (H1IP, 1, Serialized)
{
Store (Arg0, Local0)
}
Name (H1IN, 0x11)
Scope (\_GPE)
{
Method (_L11, 0, NotSerialized)
{
Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x80)
}
}
Method (P1IL, 0, Serialized)
{
ShiftRight (And (GL00, 0x40), 0x06, Local0)
Return (Local0)
}
Method (P1IP, 1, Serialized)
{
If (LLessEqual (Arg0, One))
{
Not (Arg0, Arg0)
And (GIV1, 0x0B, Local0)
ShiftLeft (Arg0, 0x02, Local1)
Or (Local1, Local0, GIV1)
}
}
Name (P1IN, 0x16)
Scope (\_GPE)
{
Method (_L16, 0, NotSerialized)
{
XOr (GIV1, 0x04, GIV1)
Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x81)
}
}
}
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x03)
{
"address",
0x57,
Buffer (One)
{
0x00
}
}, Local0)
SHIT (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}
}
Device (USB0)
{
Name (_ADR, 0x001D0000)
OperationRegion (BAR0, PCI_Config, 0xC4, One)
Field (BAR0, ByteAcc, NoLock, Preserve)
{
USBW, 2,
Offset (0x01)
}
Method (_S3D, 0, NotSerialized)
{
If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
{
Return (0x02)
}
Else
{
Return (0x03)
}
}
Method (_PSW, 1, NotSerialized)
{
If (Arg0)
{
Store (0x03, USBW)
}
Else
{
Store (Zero, USBW)
}
}
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x03, 0x04))
}
}
..............
..............
con el añadido del SBUS necesitaremos inicializar una serie de variables que no se encuentran en nuestro DSDT y que procederemos a añadir (marcadas en negrita)
OperationRegion (BIOS, SystemMemory, 0xBF68E064, 0xFF)
Field (BIOS, ByteAcc, NoLock, Preserve)
{
SS1, 1,
SS2, 1,
SS3, 1,
SS4, 1,
Offset (0x01),
IOST, 16,
TOPM, 32,
ROMS, 32,
MG1B, 32,
MG1L, 32,
MG2B, 32,
MG2L, 32,
Offset (0x1C),
DMAX, 8,
HPTA, 32,
CPB0, 32,
CPB1, 32,
CPB2, 32,
CPB3, 32,
ASSB, 8,
AOTB, 8,
AAXB, 32,
SMIF, 8,
DTSE, 8,
DTS1, 8,
DTS2, 8,
MPEN, 8,
TPMF, 8,
MG3B, 32,
MG3L, 32,
MH1B, 32,
MH1L, 32,
OSTP, 8,
DIOH, 8,
VGAR, 8,
B0SE, 8,
B0SU, 8,
B0IB, 16,
B0IL, 16,
GL00, 8,
GL04, 8,
GIV1, 4,
GP9, 1,
RTEE, 1,
P80D, 32,
P80H, 32
}
4. Añadimos HDEF . Añado Hdef simplemente para añadir al profiler información de las salidas/entradas de audio aunque en esta placa recomiendo utilizar VoodooHDA, adjuntaré uno que he recompilado, basado en el trabajo de Slice y que funciona perfectamente incluido el sleep/resume ...
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A08"))
Name (_CID, EisaId ("PNP0A03"))
Name (_UID, Zero)
Name (_ADR, Zero)
Method (^BN00, 0, NotSerialized)
{
Return (Zero)
}
Method (_BBN, 0, NotSerialized)
{
Return (BN00 ())
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR00)
}
Return (PR00)
}
Device (ESI)
{
Name (_ADR, Zero)
Method (_STA, 0, NotSerialized)
{
Return (0x0B)
}
}
Device (HDEF)
{
Name (_ADR, 0x001B0000)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x08)
{
"built-in",
Buffer (One)
{
0x00
},
"AFGLowPowerState",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},
"layout-id",
Buffer (0x04)
{
0x0C, 0x00, 0x00, 0x00
},
"PinConfigurations",
Buffer (0x30)
{
/* 0000 */ 0x00, 0x44, 0x01, 0x01, 0x10, 0x64, 0x01, 0x01,
/* 0008 */ 0x20, 0x14, 0x01, 0x01, 0x30, 0x24, 0x01, 0x01,
/* 0010 */ 0x40, 0x4C, 0x21, 0x01, 0x50, 0x11, 0x4B, 0x01,
/* 0018 */ 0x60, 0x9C, 0x81, 0x01, 0x70, 0x34, 0x81, 0x01,
/* 0020 */ 0x9C, 0x81, 0x01, 0x90, 0x01, 0x33, 0x59
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
5. Hackeo de la ID del LPC. Con esto conseguiremos que las temps, powermanagement y Sleep de estas placas funcione perfecto...
La clave de este hack es eliminar las IRQs de un par de devices en el dsdt, PIC y TMR
Device (TMR)
{
Name (_HID, EisaId ("PNP0100"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0040, // Range Minimum
0x0040, // Range Maximum
0x00, // Alignment
0x04, // Length
)
IRQNoFlags () //eliminamos estas 2 lineas
{0}
})
.............
.............
Device (PIC)
{
Name (_HID, EisaId ("PNP0000"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0020, // Range Minimum
0x0020, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IO (Decode16,
0x00A0, // Range Minimum
0x00A0, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IRQNoFlags () //eliminamos estas 2 lineas
{2}
})
}
}
con esto conseguiremos que el powermanagement de la placa funcione de forma nativa y que no provoque distorsiones de audio ni problemas de rendimiento grafico... una vez realizado esto hackeamos la ID del LPC (viene como LPCB o SBRG en diferentes dsdt)
Device (SBRG)
{
Name (_ADR, 0x001F0000)
// procedemos a hackear la ID del AppleLPC.kext
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x18, 0x3A, 0x00, 0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Device (IELK)
{
Name (_HID, "AWY0001")
OperationRegion (RXA0, PCI_Config, 0xA0, 0x20)
Field (RXA0, ByteAcc, NoLock, Preserve)
{
, 9,
PBLV, 1,
Offset (0x10),
, 1,
PBMS, 1,
, 1,
PMCS, 1,
ECNS, 1,
Offset (0x11),
ECT1, 16,
ELEN, 1,
Offset (0x14)
}
Method (\_GPE._L0A, 0, NotSerialized)
{
Notify (\_SB.PCI0.SBRG.IELK, 0x81)
Store (One, \_SB.PCI0.SBRG.IELK.PMCS)
}
Method (_STA, 0, NotSerialized)
{
If (ELEN)
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Method (SMOD, 1, NotSerialized)
{
}
Method (GPBS, 0, NotSerialized)
{
Return (XOr (PBLV, One))
}
}
............
.............
..............
el resto de los cambios son simplemente añadidos de los fixes habituales, espero que sea de utilidad....
Saludos!
Quizás sería interesante reconvertir este hilo en uno un tanto más general en donde añadieramos los cambios que usamos en nuestros dsdt y que nos van bien a nuestras placas.... por ejemplo os aporto una serie de cambios que uso en el dsdt de mi MSI x58 pero que son perfectamente válidos para placas Asus P6x tb.
obviamente a estas alturas todos sabemos como descompilar/recompilar el dsdt, y aplicar los típicos fixes (alias etc...) partiendo de esa base os añado lo que he modificado para hacer que esta placa se comporte perfectamente....
1. añadido de External PDCx y Método DTGP en la cabecera del dsdt (DTGP inyecta parámetros en memoria y PDCx llama a una serie de direcciones en las tablas SSDT realcionadas con el powermanagement. )
/*
* Intel ACPI Component Architecture
* AML Disassembler version 20090521
*
* Disassembly of /home/user/Desktop/dsdt/DSDT2.aml, Mon Sep 28 12:04:40 2009
*
*
* Original Table Header:
* Signature "DSDT"
* Length 0x000061EF (25071)
* Revision 0x01 **** ACPI 1.0, no 64-bit math support
* Checksum 0x28
* OEM ID "A7522"
* OEM Table ID "A7522300"
* OEM Revision 0x00000300 (768)
* Compiler ID "INTL"
* Compiler Version 0x20090730 (537462576)
*/
DefinitionBlock ("DSDT.aml", "DSDT", 1, "A7522", "A7522300", 0x00000300)
{
External (PDC7) // llamada a direcciones en otra tabla (ssdt) de ahí el external
External (PDC6)
External (PDC5)
External (PDC4)
External (PDC3)
External (PDC2)
External (PDC1)
External (PDC0)
Method (DTGP, 5, NotSerialized)
{
If (LEqual (Arg0, Buffer (0x10)
{
/* 0000 */ 0xC6, 0xB7, 0xB5, 0xA0, 0x18, 0x13, 0x1C, 0x44,
/* 0008 */ 0xB0, 0xC9, 0xFE, 0x69, 0x5E, 0xAF, 0x94, 0x9B
}))
{
If (LEqual (Arg1, One))
{
If (LEqual (Arg2, Zero))
{
Store (Buffer (One)
{
0x03
}, Arg4)
Return (One)
}
If (LEqual (Arg2, One))
{
Return (One)
}
}
}
Store (Buffer (One)
{
0x00
}, Arg4)
Return (Zero)
}
Scope (_PR) // eliminado de alias
{
Processor (P001, 0x01, 0x00000810, 0x06) {}
Processor (P002, 0x02, 0x00000000, 0x00) {}
Processor (P003, 0x03, 0x00000000, 0x00) {}
Processor (P004, 0x04, 0x00000000, 0x00) {}
Processor (P005, 0x05, 0x00000000, 0x00) {}
Processor (P006, 0x06, 0x00000000, 0x00) {}
Processor (P007, 0x07, 0x00000000, 0x00) {}
Processor (P008, 0x08, 0x00000000, 0x00) {}
}
.................
..................
2. Añadido Método PNOT relacionado con el porwermanagement y la notificacion del estado de la cpu, añadido justo después del cierre del Método OSYS.
Method (OSYS, 0, NotSerialized)
{
Store (0x10, Local0)
If (CondRefOf (_OSI, Local1))
{
If (_OSI ("Windows 2000"))
{
Store (0x12, Local0)
}
If (_OSI ("Windows 2001"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP1"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001 SP2"))
{
Store (0x13, Local0)
}
If (_OSI ("Windows 2001.1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2001.1 SP1"))
{
Store (0x14, Local0)
}
If (_OSI ("Windows 2006"))
{
Store (0x15, Local0)
}
}
Else
{
If (MCTH (_OS, "Microsoft Windows NT"))
{
Store (0x12, Local0)
}
Else
{
If (MCTH (_OS, "Microsoft WindowsME: Millennium Edition"))
{
Store (0x11, Local0)
}
If (MCTH (_OS, "Linux"))
{
Store (One, Local0)
}
}
}
Return (Local0)
}
Method (PNOT, 0, Serialized)
{
If (MPEN)
{
If (And (PDC0, 0x08))
{
Notify (\_PR.P001, 0x80)
If (And (PDC0, 0x10))
{
Sleep (0x64)
Notify (\_PR.P001, 0x81)
}
}
If (And (PDC1, 0x08))
{
Notify (\_PR.P002, 0x80)
If (And (PDC1, 0x10))
{
Sleep (0x64)
Notify (\_PR.P002, 0x81)
}
}
If (And (PDC2, 0x08))
{
Notify (\_PR.P003, 0x80)
If (And (PDC2, 0x10))
{
Sleep (0x64)
Notify (\_PR.P003, 0x81)
}
}
If (And (PDC3, 0x08))
{
Notify (\_PR.P004, 0x80)
If (And (PDC3, 0x10))
{
Sleep (0x64)
Notify (\_PR.P004, 0x81)
}
}
If (And (PDC4, 0x08))
{
Notify (\_PR.P005, 0x80)
If (And (PDC4, 0x10))
{
Sleep (0x64)
Notify (\_PR.P005, 0x81)
}
}
If (And (PDC5, 0x08))
{
Notify (\_PR.P006, 0x80)
If (And (PDC5, 0x10))
{
Sleep (0x64)
Notify (\_PR.P006, 0x81)
}
}
If (And (PDC6, 0x08))
{
Notify (\_PR.P007, 0x80)
If (And (PDC6, 0x10))
{
Sleep (0x64)
Notify (\_PR.P007, 0x81)
}
}
If (And (PDC7, 0x08))
{
Notify (\_PR.P008, 0x80)
If (And (PDC7, 0x10))
{
Sleep (0x64)
Notify (\_PR.P008, 0x81)
}
}
}
Else
{
Notify (\_PR.P001, 0x80)
Sleep (0x64)
Notify (\_PR.P001, 0x81)
}
}
3. Registrado de Devices que no aparecen en el DSDT y que causan errores en los log de inicio de OSX relacionados con "missing ACPI devices..."
Device ESI y Device SBUS
//esta es la salida LSPCI de los dispositivos que nos provocan el error
// 00:00.0 Host bridge: Intel Corporation X58 I/O Hub to ESI Port (rev 12)
//00:1f.3 SMBus: Intel Corporation 82801JI (ICH10 Family) SMBus Controller
// buscamos Device (PCI0) y aprovechamos para registrar ESI y el SBUS utilizando código extraido del DSDT del MacPro4,1
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A08"))
Name (_CID, EisaId ("PNP0A03"))
Name (_UID, Zero)
Name (_ADR, Zero)
Method (^BN00, 0, NotSerialized)
{
Return (Zero)
}
Method (_BBN, 0, NotSerialized)
{
Return (BN00 ())
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR00)
}
Return (PR00)
}
Device (ESI)
{
Name (_ADR, Zero)
Method (_STA, 0, NotSerialized)
{
Return (0x0B)
}
}
...........
..........
// El SBUS añadirlo justo antes del Device (USB0)
Device (SBUS)
{
Name (_ADR, 0x001F0003)
OperationRegion (SMBP, PCI_Config, 0x40, 0xC0)
Field (SMBP, ordAcc, NoLock, Preserve)
{
, 2,
I2CE, 1
}
OperationRegion (SMBE, PCI_Config, 0x04, 0x02)
Field (SMBE, AnyAcc, NoLock, Preserve)
{
IOSE, 1
}
OperationRegion (SMBI, SystemIO, 0x4000, 0x10)
Field (SMBI, ByteAcc, NoLock, Preserve)
{
HSTS, 8,
Offset (0x02),
HCON, 8,
HCOM, 8,
TXSA, 8,
DAT0, 8,
DAT1, 8,
HBDR, 8,
PECR, 8,
RXSA, 8,
SDAT, 16
}
Name (SBOK, Zero)
Method (ENAB, 0, NotSerialized)
{
Store (One, IOSE)
Store (One, SBOK)
}
Method (DISB, 0, NotSerialized)
{
Store (Zero, SBOK)
}
Method (SSXB, 2, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SRXB, 1, Serialized)
{
If (STRT ())
{
Return (0xFFFF)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (0x44, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (DAT0)
}
Return (0xFFFF)
}
Method (SWRB, 3, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (Arg2, DAT0)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SRDB, 2, Serialized)
{
If (STRT ())
{
Return (0xFFFF)
}
Store (Zero, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (Arg1, HCOM)
Store (0x48, HCON)
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (DAT0)
}
Return (0xFFFF)
}
Method (SBLW, 4, Serialized)
{
If (STRT ())
{
Return (Zero)
}
Store (Arg3, I2CE)
Store (0xBF, HSTS)
Store (Arg0, TXSA)
Store (Arg1, HCOM)
Store (SizeOf (Arg2), DAT0)
Store (Zero, Local1)
Store (DerefOf (Index (Arg2, Zero)), HBDR)
Store (0x54, HCON)
While (LGreater (SizeOf (Arg2), Local1))
{
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (0x80, HSTS)
Increment (Local1)
If (LGreater (SizeOf (Arg2), Local1))
{
Store (DerefOf (Index (Arg2, Local1)), HBDR)
}
}
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (One)
}
Return (Zero)
}
Method (SBLR, 3, Serialized)
{
Name (TBUF, Buffer (0x0100) {})
If (STRT ())
{
Return (Zero)
}
Store (Arg2, I2CE)
Store (0xBF, HSTS)
Store (Or (Arg0, One), TXSA)
Store (Arg1, HCOM)
Store (0x54, HCON)
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (DAT0, Index (TBUF, Zero))
Store (0x80, HSTS)
Store (One, Local1)
While (LLess (Local1, DerefOf (Index (TBUF, Zero))))
{
Store (0x0FA0, Local0)
While (LAnd (LNot (And (HSTS, 0x80)), Local0))
{
Decrement (Local0)
Stall (0x32)
}
If (LNot (Local0))
{
KILL ()
Return (Zero)
}
Store (HBDR, Index (TBUF, Local1))
Store (0x80, HSTS)
Increment (Local1)
}
If (COMP ())
{
Or (HSTS, 0xFF, HSTS)
Return (TBUF)
}
Return (Zero)
}
Method (STRT, 0, Serialized)
{
Store (0xC8, Local0)
While (Local0)
{
If (And (HSTS, 0x40))
{
Decrement (Local0)
Sleep (One)
If (LEqual (Local0, Zero))
{
Return (One)
}
}
Else
{
Store (Zero, Local0)
}
}
Store (0x0FA0, Local0)
While (Local0)
{
If (And (HSTS, One))
{
Decrement (Local0)
Stall (0x32)
If (LEqual (Local0, Zero))
{
KILL ()
}
}
Else
{
Return (Zero)
}
}
Return (One)
}
Method (COMP, 0, Serialized)
{
Store (0x0FA0, Local0)
While (Local0)
{
If (And (HSTS, 0x02))
{
Return (One)
}
Else
{
Decrement (Local0)
Stall (0x32)
If (LEqual (Local0, Zero))
{
KILL ()
}
}
}
Return (Zero)
}
Method (KILL, 0, Serialized)
{
Or (HCON, 0x02, HCON)
Or (HSTS, 0xFF, HSTS)
}
Device (BUS0)
{
Name (_CID, "smbus")
Name (_ADR, Zero)
Device (MKY0)
{
Name (_ADR, Zero)
Name (_CID, "mikey")
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x07)
{
"refnum",
Zero,
"address",
0x39,
"device-id",
0x0CCB,
Buffer (One)
{
0x00
}
}, Local0)
SHIT (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Method (H1EN, 1, Serialized)
{
If (LLessEqual (Arg0, One))
{
If (LEqual (Arg0, One))
{
Or (GL04, 0x04, GL04)
}
Else
{
And (GL04, 0xFB, GL04)
}
}
}
Method (H1IL, 0, Serialized)
{
ShiftRight (And (GL00, 0x02), One, Local0)
Return (Local0)
}
Method (H1IP, 1, Serialized)
{
Store (Arg0, Local0)
}
Name (H1IN, 0x11)
Scope (\_GPE)
{
Method (_L11, 0, NotSerialized)
{
Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x80)
}
}
Method (P1IL, 0, Serialized)
{
ShiftRight (And (GL00, 0x40), 0x06, Local0)
Return (Local0)
}
Method (P1IP, 1, Serialized)
{
If (LLessEqual (Arg0, One))
{
Not (Arg0, Arg0)
And (GIV1, 0x0B, Local0)
ShiftLeft (Arg0, 0x02, Local1)
Or (Local1, Local0, GIV1)
}
}
Name (P1IN, 0x16)
Scope (\_GPE)
{
Method (_L16, 0, NotSerialized)
{
XOr (GIV1, 0x04, GIV1)
Notify (\_SB.PCI0.SBUS.BUS0.MKY0, 0x81)
}
}
}
Device (DVL0)
{
Name (_ADR, 0x57)
Name (_CID, "diagsvault")
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x03)
{
"address",
0x57,
Buffer (One)
{
0x00
}
}, Local0)
SHIT (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}
}
Device (USB0)
{
Name (_ADR, 0x001D0000)
OperationRegion (BAR0, PCI_Config, 0xC4, One)
Field (BAR0, ByteAcc, NoLock, Preserve)
{
USBW, 2,
Offset (0x01)
}
Method (_S3D, 0, NotSerialized)
{
If (LOr (LEqual (OSFL (), One), LEqual (OSFL (), 0x02)))
{
Return (0x02)
}
Else
{
Return (0x03)
}
}
Method (_PSW, 1, NotSerialized)
{
If (Arg0)
{
Store (0x03, USBW)
}
Else
{
Store (Zero, USBW)
}
}
Method (_PRW, 0, NotSerialized)
{
Return (GPRW (0x03, 0x04))
}
}
..............
..............
con el añadido del SBUS necesitaremos inicializar una serie de variables que no se encuentran en nuestro DSDT y que procederemos a añadir (marcadas en negrita)
OperationRegion (BIOS, SystemMemory, 0xBF68E064, 0xFF)
Field (BIOS, ByteAcc, NoLock, Preserve)
{
SS1, 1,
SS2, 1,
SS3, 1,
SS4, 1,
Offset (0x01),
IOST, 16,
TOPM, 32,
ROMS, 32,
MG1B, 32,
MG1L, 32,
MG2B, 32,
MG2L, 32,
Offset (0x1C),
DMAX, 8,
HPTA, 32,
CPB0, 32,
CPB1, 32,
CPB2, 32,
CPB3, 32,
ASSB, 8,
AOTB, 8,
AAXB, 32,
SMIF, 8,
DTSE, 8,
DTS1, 8,
DTS2, 8,
MPEN, 8,
TPMF, 8,
MG3B, 32,
MG3L, 32,
MH1B, 32,
MH1L, 32,
OSTP, 8,
DIOH, 8,
VGAR, 8,
B0SE, 8,
B0SU, 8,
B0IB, 16,
B0IL, 16,
GL00, 8,
GL04, 8,
GIV1, 4,
GP9, 1,
RTEE, 1,
P80D, 32,
P80H, 32
}
4. Añadimos HDEF . Añado Hdef simplemente para añadir al profiler información de las salidas/entradas de audio aunque en esta placa recomiendo utilizar VoodooHDA, adjuntaré uno que he recompilado, basado en el trabajo de Slice y que funciona perfectamente incluido el sleep/resume ...
Device (PCI0)
{
Name (_HID, EisaId ("PNP0A08"))
Name (_CID, EisaId ("PNP0A03"))
Name (_UID, Zero)
Name (_ADR, Zero)
Method (^BN00, 0, NotSerialized)
{
Return (Zero)
}
Method (_BBN, 0, NotSerialized)
{
Return (BN00 ())
}
Method (_PRT, 0, NotSerialized)
{
If (PICM)
{
Return (AR00)
}
Return (PR00)
}
Device (ESI)
{
Name (_ADR, Zero)
Method (_STA, 0, NotSerialized)
{
Return (0x0B)
}
}
Device (HDEF)
{
Name (_ADR, 0x001B0000)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x08)
{
"built-in",
Buffer (One)
{
0x00
},
"AFGLowPowerState",
Buffer (0x04)
{
0x01, 0x00, 0x00, 0x00
},
"layout-id",
Buffer (0x04)
{
0x0C, 0x00, 0x00, 0x00
},
"PinConfigurations",
Buffer (0x30)
{
/* 0000 */ 0x00, 0x44, 0x01, 0x01, 0x10, 0x64, 0x01, 0x01,
/* 0008 */ 0x20, 0x14, 0x01, 0x01, 0x30, 0x24, 0x01, 0x01,
/* 0010 */ 0x40, 0x4C, 0x21, 0x01, 0x50, 0x11, 0x4B, 0x01,
/* 0018 */ 0x60, 0x9C, 0x81, 0x01, 0x70, 0x34, 0x81, 0x01,
/* 0020 */ 0x9C, 0x81, 0x01, 0x90, 0x01, 0x33, 0x59
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
5. Hackeo de la ID del LPC. Con esto conseguiremos que las temps, powermanagement y Sleep de estas placas funcione perfecto...
La clave de este hack es eliminar las IRQs de un par de devices en el dsdt, PIC y TMR
Device (TMR)
{
Name (_HID, EisaId ("PNP0100"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0040, // Range Minimum
0x0040, // Range Maximum
0x00, // Alignment
0x04, // Length
)
IRQNoFlags () //eliminamos estas 2 lineas
{0}
})
.............
.............
Device (PIC)
{
Name (_HID, EisaId ("PNP0000"))
Name (_CRS, ResourceTemplate ()
{
IO (Decode16,
0x0020, // Range Minimum
0x0020, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IO (Decode16,
0x00A0, // Range Minimum
0x00A0, // Range Maximum
0x00, // Alignment
0x02, // Length
)
IRQNoFlags () //eliminamos estas 2 lineas
{2}
})
}
}
con esto conseguiremos que el powermanagement de la placa funcione de forma nativa y que no provoque distorsiones de audio ni problemas de rendimiento grafico... una vez realizado esto hackeamos la ID del LPC (viene como LPCB o SBRG en diferentes dsdt)
Device (SBRG)
{
Name (_ADR, 0x001F0000)
// procedemos a hackear la ID del AppleLPC.kext
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x02)
{
"device-id",
Buffer (0x04)
{
0x18, 0x3A, 0x00, 0x00
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
Device (IELK)
{
Name (_HID, "AWY0001")
OperationRegion (RXA0, PCI_Config, 0xA0, 0x20)
Field (RXA0, ByteAcc, NoLock, Preserve)
{
, 9,
PBLV, 1,
Offset (0x10),
, 1,
PBMS, 1,
, 1,
PMCS, 1,
ECNS, 1,
Offset (0x11),
ECT1, 16,
ELEN, 1,
Offset (0x14)
}
Method (\_GPE._L0A, 0, NotSerialized)
{
Notify (\_SB.PCI0.SBRG.IELK, 0x81)
Store (One, \_SB.PCI0.SBRG.IELK.PMCS)
}
Method (_STA, 0, NotSerialized)
{
If (ELEN)
{
Return (0x0F)
}
Else
{
Return (Zero)
}
}
Method (SMOD, 1, NotSerialized)
{
}
Method (GPBS, 0, NotSerialized)
{
Return (XOr (PBLV, One))
}
}
............
.............
..............
el resto de los cambios son simplemente añadidos de los fixes habituales, espero que sea de utilidad....