Sorry for my newbieness but I can't find a way to insert this code within my DSDT. My _DSM method has a lot of stuff already and I tried to put this code in mine but when I try to compile I get a lot of errors. I mean, a lot. I tried to put it in every place possible, but couldn't, I'm always with an error. Could you *pretty please* show me where should I put it?
Here's my original _DSM for PCI0.PEG0.GFX0
Method (_DSM, 4, Serialized) { Name (T_0, Zero) If (LEqual (Arg0, Buffer (0x10) { /* 0000 */ 0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46, /* 0008 */ 0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44 })) { While (One) { Store (ToInteger (Arg2), T_0) If (LEqual (T_0, Zero)) { Return (Buffer (0x04) { 0x33, 0x00, 0x50, 0x00 }) } Else { If (LEqual (T_0, One)) { If (PA3D) { Return (Buffer (0x04) { 0x00, 0x04, 0x00, 0x00 }) } Else { If (NA3D) { Return (Buffer (0x04) { 0x00, 0x04, 0x00, 0x00 }) } } Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 }) } Else { If (LEqual (T_0, 0x04)) { ShiftRight (ToInteger (Arg3), 0x1C, Local0) If (And (Local0, 0x04)) {} Else { Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 }) } And (Local0, 0x03, Local1) If (^^^SBRG.EC0.SW3D) { Store (Zero, ^^^SBRG.EC0.SW3D) If (Local1) { ^^^^ATKD.IANE (0x5A) Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x40 }) } Else { ^^^^ATKD.IANE (0x59) Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x60 }) } } If (Local1) { Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x60 }) } Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x40 }) } Else { If (LEqual (T_0, 0x05)) { And (ToInteger (Arg3), 0x0FFF, Local1) And (ToInteger (Arg3), 0x00FFF000, Local2) ShiftRight (Local2, 0x0C, Local2) If (LEqual (CHA1, One)) { Store (One, CHA3) Store (Local1, AVLD) Store (Local2, ACTD) } Store (Zero, CHA1) Store (Zero, CHA2) Return (Zero) } Else { If (LEqual (T_0, 0x14)) { Return (Package (0x09) { 0x0110, 0x0400, Zero, Zero, One, One, 0xC8, Zero, 0x03E8 }) } Else { If (LEqual (T_0, 0x16)) { If (NA3D) { If (LEqual (ToInteger (Arg3), One)) { Return (TLKY) } Return (TLKY) } Else { If (LEqual (ToInteger (Arg3), One)) { Return (LKY4) } Return (LKY3) } } Else { } } } } } } Break } } Return (Package (0x02) { Zero, Zero }) } } }
and here's my DSDT.DSL:
bsides_dsdt.dsl.zip 41.34KB
6 downloads
You should be able to remove the
Zero,
Zero
return values at the bottom and change the package size to 0x0C and then put the values inside that like this
Method (_DSM, 4, Serialized) { Name (T_0, Zero) If (LEqual (Arg0, Buffer (0x10) { /* 0000 */ 0x75, 0x0B, 0xA5, 0xD4, 0xC7, 0x65, 0xF7, 0x46, /* 0008 */ 0xBF, 0xB7, 0x41, 0x51, 0x4C, 0xEA, 0x02, 0x44 })) { While (One) { Store (ToInteger (Arg2), T_0) If (LEqual (T_0, Zero)) { Return (Buffer (0x04) { 0x33, 0x00, 0x50, 0x00 }) } Else { If (LEqual (T_0, One)) { If (PA3D) { Return (Buffer (0x04) { 0x00, 0x04, 0x00, 0x00 }) } Else { If (NA3D) { Return (Buffer (0x04) { 0x00, 0x04, 0x00, 0x00 }) } } Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 }) } Else { If (LEqual (T_0, 0x04)) { ShiftRight (ToInteger (Arg3), 0x1C, Local0) If (And (Local0, 0x04)) {} Else { Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x00 }) } And (Local0, 0x03, Local1) If (^^^SBRG.EC0.SW3D) { Store (Zero, ^^^SBRG.EC0.SW3D) If (Local1) { ^^^^ATKD.IANE (0x5A) Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x40 }) } Else { ^^^^ATKD.IANE (0x59) Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x60 }) } } If (Local1) { Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x60 }) } Return (Buffer (0x04) { 0x00, 0x00, 0x00, 0x40 }) } Else { If (LEqual (T_0, 0x05)) { And (ToInteger (Arg3), 0x0FFF, Local1) And (ToInteger (Arg3), 0x00FFF000, Local2) ShiftRight (Local2, 0x0C, Local2) If (LEqual (CHA1, One)) { Store (One, CHA3) Store (Local1, AVLD) Store (Local2, ACTD) } Store (Zero, CHA1) Store (Zero, CHA2) Return (Zero) } Else { If (LEqual (T_0, 0x14)) { Return (Package (0x09) { 0x0110, 0x0400, Zero, Zero, One, One, 0xC8, Zero, 0x03E8 }) } Else { If (LEqual (T_0, 0x16)) { If (NA3D) { If (LEqual (ToInteger (Arg3), One)) { Return (TLKY) } Return (TLKY) } Else { If (LEqual (ToInteger (Arg3), One)) { Return (LKY4) } Return (LKY3) } } Else { } } } } } } Break } } Store (Package (0x0C) { "AAPL,HasPanel", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "AAPL,Haslid", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "AAPL,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,backlight-control", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,AAPL,boot-display", Buffer (0x04) { 0x01, 0x00, 0x00, 0x00 }, "@0,built-in", Buffer () { One } }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) } } }