- 积分
- 1930
- 最后登录
- 2017-9-19
- 精华
- 0
- 阅读权限
- 50
- 主题
- 8
- UID
- 1532224
- 帖子
- 851
- PB币
- 567
- 威望
- 265
- 贡献
- 0
- 技术
- 30
- 活跃
- 16
K歌之王
- UID
- 1532224
- 帖子
- 851
- PB币
- 567
- 贡献
- 0
- 技术
- 30
- 活跃
- 16
|
9F
发表于 2010-10-21 07:18:36
IP属地湖北
本帖最后由 x5115x 于 2011-2-28 20:27 编辑
基础知识传送门:
了解DSDT及其补丁制作方法 - 威廉第三
深入了解DSDT及其代码含义 - 紫米
1、DGTP方法(必须增加)- 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)
- }
复制代码 修改方法:
(1)搜索DefinitionBlock ("dsdt.aml", "DSDT",
(2)放在第一个大括号“{”下
2、使用原生电源管理- Device (LPC)
- {
- Name (_ADR, 0x001F0000)
- Method (_DSM, 4, NotSerialized)
- {
- Store (Package (0x02)
- {
- "device-id",
- Buffer (0x04)
- {
- 0x07, 0x3B, 0x00, 0x00 //3B07是Intel mobile 5/3400,详见:DSDT 修改討論 (技嘉) 02/04 更新
- }
- }, Local0)
- DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
- Return (Local0)
- }
复制代码 修改方法:
(1)搜索Device (LPC)
(2)放在Name (_ADR, 0x001F0000)下面
(3)在S/L/E/AppleLPC.kext/info.plist中增加3B07
(4)借用紫米的数据,
其中的 device-id 有以下的選擇:
- 0x07, 0x3B, 0x00, 0x00 是 Mobile 5 Series/3400 Series0x02, 0x3B, 0x00, 0x00 是 5 Series/3400 Series
- 0x01, 0x3B, 0x00, 0x00 是 Mobile 5 Series
- 0x00, 0x3B, 0x00, 0x00 是 5 Series
- 0x18, 0x3A, 0x00, 0x00 是 ICH10
- 0x16, 0x29, 0x00, 0x00 是 ICH9R
- 0x15, 0x28, 0x00, 0x00 是 ICH8M
- 0x11, 0x28, 0x00, 0x00 是 ICH8M-E
- 0xBD, 0x27, 0x00, 0x00 是 ICH7M DH
- 0xB9, 0x27, 0x00, 0x00 是 ICH7M
- 0x70, 0x26, 0x00, 0x00 是 ICH6 ESB
复制代码
3、CMOS重置- Device (RTC)
- {
- Name (_HID, EisaId ("PNP0B00"))
- Name (_CRS, ResourceTemplate ()
- {
- IO (Decode16,
- 0x0070, // Range Minimum
- 0x0070, // Range Maximum
- 0x01, // Alignment
- 0x02, // Length 这里是关键
- )
- IRQNoFlags ()
- {8}
- })
- }
复制代码 修改方法:
(1)搜索Device (RTC)
(2)将标注的地方改为0x02
4、显卡- Method (_DSM, 4, NotSerialized)
- {
- Store (Package (0x1A)
- {
- "@0,compatible",
- Buffer (0x0B)
- {
- "NVDA,NVMac"
- },
- "@0,device_type",
- Buffer (0x08)
- {
- "display"
- },
- "@0,name",
- Buffer (0x0F)
- {
- "NVDA,Display-A"
- },
- "@1,compatible",
- Buffer (0x0B)
- {
- "NVDA,NVMac"
- },
- "@1,device_type",
- Buffer (0x08)
- {
- "display"
- },
- "@1,name",
- Buffer (0x0F)
- {
- "NVDA,Display-B"
- },
- "NVCAP",
- Buffer (0x18) //修改为你的显卡的NVCAP值
- {
- /* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x01, 0x00,
- /* 0008 */ 0x06, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
- /* 0010 */ 0x00, 0x00, 0x00, 0x00
- },
- "VRAM,totalsize",
- Buffer (0x04)
- {
- 0x00, 0x00, 0x00, 0x20 //显存大小0x10=256M,0x20=512M,0x40=1G },
- "device_type",
- Buffer (0x0D)
- {
- "NVDA,GeForce"
- },
- "model",
- Buffer (0x19) //根据下面字符数计算 = 双引号内字符数 + 1
- {
- "nVidia GeForce NVS 3100M"
- },
- "rom-revision",
- Buffer (0x27) //根据下面字符数计算 = 双引号内字符数 + 1
- {
- "nVidia GeForce NVS 3100M OpenGL Engine"
- },
- "hda-gfx",
- Buffer (0x0A)
- {
- "onboard-1"
- }
- }, Local0)
- DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
- Return (Local0)
- }
复制代码 修改方法:
(1)搜索Device (PEG)
(2)接着搜索Device (VID)
(3)再接着搜索Method (_DSM, 4, NotSerialized)并将整个Method替换为上面的代码
(4)修改中间3处:NVPM、显存大小、显卡名称、ROM版本
5、关机断电- OperationRegion (PMRS, SystemIO, 0x1030, 0x13)
- Field (PMRS, ByteAcc, NoLock, Preserve)
- {
- , 4,
- SLPE, 1
- }
- Method (\_PTS, 1, NotSerialized)
- {
- Store (0x01, Local0)
- If (LEqual (Arg0, \SPS))
- {
- Store (0x00, Local0)
- }
- If (LOr (LEqual (Arg0, 0x00), LGreaterEqual (Arg0, 0x06)))
- {
- Store (0x00, Local0)
- }
- If (Local0)
- {
- Store (Arg0, \SPS)
- \_SB.PCI0.LPC.EC.HKEY.MHKE (0x00)
- If (\_SB.PCI0.LPC.EC.KBLT)
- {
- \UCMS (0x0D)
- }
- If (LEqual (Arg0, 0x01))
- {
- Store (\_SB.PCI0.LPC.EC.HFNI, \FNID)
- Store (0x00, \_SB.PCI0.LPC.EC.HFNI)
- Store (0x00, \_SB.PCI0.LPC.EC.HFSP)
- }
- If (LEqual (Arg0, 0x03))
- {
- \VVPD (0x03)
- Store (\VHYB (0x07, 0x00), \VHCC)
- \TRAP ()
- Store (\_SB.PCI0.LPC.EC.AC._PSR (), \ACST)
- }
- If (LEqual (Arg0, 0x04))
- {
- Store (\VHYB (0x07, 0x00), \VHCC)
- \_SB.SLPB._PSW (0x00)
- If (And (\PPMF, 0x01))
- {
- \STEP (0x07)
- }
- \TRAP ()
- TPHY (0x02)
- \AWON (0x04)
- }
- If (LEqual (Arg0, 0x05))
- {
- \TRAP ()
- TPHY (0x02)
- \AWON (0x05)
- Store (Zero, SLPE) //关键,需要增加
- Sleep (0x10) //关键,需要增加
- }
- \_SB.PCI0.LPC.EC.BPTS (Arg0)
- If (LGreaterEqual (Arg0, 0x04))
- {
- Store (0x00, \_SB.PCI0.LPC.EC.HWLB)
- }
- Else
- {
- Store (0x01, \_SB.PCI0.LPC.EC.HWLB)
- }
- If (LNotEqual (Arg0, 0x05))
- {
- Store (0x01, \_SB.PCI0.LPC.EC.HCMU)
- Store (\_SB.PCI0.EXP4.PDS, \_SB.PCI0.EXP4.PDSF)
- }
- \_SB.PCI0.LPC.EC.HKEY.WGPS (Arg0)
- }
- }
复制代码 修改方法:
(1)搜索Method (\_PTS, 1, NotSerialized),有的是Method (_PTS, 1, NotSerialized)
(2)在它上面加入OperationRegion (PMRS, SystemIO, 0x1030, 0x13)代码,看上面我的代码
(3)增加Method (_PTS, 1, NotSerialized)中两处地方,看上面我的注释
6、声卡- Method (_DSM, 4, NotSerialized) { Store (Package (0x08) { "codec-id", Buffer (0x04) { 0x69, 0x50, 0xf1, 0x14 },
- "layout-id", Buffer (0x04) { 0x0C, 0x00, 0x00, 0x00 },
- "device-type", Buffer (0x11) { "Conexant CX20585" },
- "PinConfigurations", Buffer (Zero) {} }, Local0) DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0)) Return (Local0) }
复制代码 修改方法:
(1)搜索Device (HDEF)
(2)在它下面加入Method (_DSM, 4, NotSerialized)代码,看上面我的代码 |
|