积分 856 最后登录 2024-2-20 精华 0 阅读权限 40 主题 263 UID 834306 帖子 2140 PB币 2014 威望 0 贡献 0 技术 70 活跃 1985
UID 834306 帖子 2140 PB币 2014 贡献 0 技术 70 活跃 1985
9 F
发表于 2009-9-5 23:44:00
IP属地上海
本帖最后由 zhangwj1978 于 2009-9-5 23:49 编辑
楼主 你好,,我的显卡也是9600GT,可以照抄你的代码吗?
为修改前 Device (PCI0)
{
Name (_HID, EisaId ("PNP0A03"))
Name (_ADR, Zero)
Name (_UID, One)
Name (_BBN, Zero)
Method (_S3D, 0, NotSerialized)
{
If (LEqual (OSFL, 0x02))
{
Return (0x02)
}
Else
{
Return (0x03)
}
}
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Method (_CRS, 0, NotSerialized)
{
Name (BUF0, ResourceTemplate ()
{
WordBusNumber (ResourceConsumer, MinNotFixed, MaxNotFixed, PosDecode,
0x0000, // Granularity
0x0000, // Range Minimum
0x003F, // Range Maximum
0x0000, // Translation Offset
0x0040, // Length
,, )
IO (Decode16,
0x0CF8, // Range Minimum
0x0CF8, // Range Maximum
0x01, // Alignment
0x08, // Length
)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Granularity
0x0000, // Range Minimum
0x0CF7, // Range Maximum
0x0000, // Translation Offset
0x0CF8, // Length
,, , TypeStatic)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Granularity
0x0D00, // Range Minimum
0xFFFF, // Range Maximum
0x0000, // Translation Offset
0xF300, // Length
,, , TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x000A0000, // Range Minimum
0x000BFFFF, // Range Maximum
0x00000000, // Translation Offset
0x00020000, // Length
,, , AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x000C0000, // Range Minimum
0x000DFFFF, // Range Maximum
0x00000000, // Translation Offset
0x00020000, // Length
,, , AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x00100000, // Range Minimum
0xFEBFFFFF, // Range Maximum
0x00000000, // Translation Offset
0xFFF00000, // Length
,, _Y00, AddressRangeMemory, TypeStatic)
})
CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._MIN, TCMM)
CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._LEN, TOMM)
Add (AMEM, 0x00010000, TCMM)
Add (TCMM, 0x00010000, TCMM)
Subtract (0xFEC00000, TCMM, TOMM)
Return (BUF0)
} 复制代码 修改后(这样对吗) Device (PCI0)
{
Name (_ADR, 0x00010000)
Device (GFX0)
{
Name (_ADR, Zero)
Name (_SUN, One)
Method (_DSM, 4, NotSerialized)
{
Store (Package (0x16)
{
"@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)
{
/* 0000 */ 0x04, 0x00, 0x00, 0x00, 0x00, 0x00, 0x03, 0x00,
/* 0008 */ 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x07,
/* 0010 */ 0x00, 0x00, 0x00, 0x00
},
"VRAM,totalsize",
Buffer (0x04)
{
0x00, 0x00, 0x00, 0x20
},
"device_type",
Buffer (0x0D)
{
"NVDA,GeForce"
},
"model",
Buffer (0x17)
{
"nVidia GeForce 9600 GT"
},
"rom-revision",
Buffer (0x25)
{
"nVidia GeForce 9600 GT OpenGL Engine"
}
}, Local0)
DTGP (Arg0, Arg1, Arg2, Arg3, RefOf (Local0))
Return (Local0)
}
}
}
Method (_STA, 0, NotSerialized)
{
Return (0x0F)
}
Method (_CRS, 0, NotSerialized)
{
Name (BUF0, ResourceTemplate ()
{
WordBusNumber (ResourceConsumer, MinNotFixed, MaxNotFixed, PosDecode,
0x0000, // Granularity
0x0000, // Range Minimum
0x003F, // Range Maximum
0x0000, // Translation Offset
0x0040, // Length
,, )
IO (Decode16,
0x0CF8, // Range Minimum
0x0CF8, // Range Maximum
0x01, // Alignment
0x08, // Length
)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Granularity
0x0000, // Range Minimum
0x0CF7, // Range Maximum
0x0000, // Translation Offset
0x0CF8, // Length
,, , TypeStatic)
WordIO (ResourceProducer, MinFixed, MaxFixed, PosDecode, EntireRange,
0x0000, // Granularity
0x0D00, // Range Minimum
0xFFFF, // Range Maximum
0x0000, // Translation Offset
0xF300, // Length
,, , TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x000A0000, // Range Minimum
0x000BFFFF, // Range Maximum
0x00000000, // Translation Offset
0x00020000, // Length
,, , AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x000C0000, // Range Minimum
0x000DFFFF, // Range Maximum
0x00000000, // Translation Offset
0x00020000, // Length
,, , AddressRangeMemory, TypeStatic)
DWordMemory (ResourceProducer, PosDecode, MinFixed, MaxFixed, Cacheable, ReadWrite,
0x00000000, // Granularity
0x00100000, // Range Minimum
0xFEBFFFFF, // Range Maximum
0x00000000, // Translation Offset
0xFFF00000, // Length
,, _Y00, AddressRangeMemory, TypeStatic)
})
CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._MIN, TCMM)
CreateDWordField (BUF0, \_SB.PCI0._CRS._Y00._LEN, TOMM)
Add (AMEM, 0x00010000, TCMM)
Add (TCMM, 0x00010000, TCMM)
Subtract (0xFEC00000, TCMM, TOMM)
Return (BUF0)
} 复制代码 没有看到你说的
最后要在 Method (_L0D, 0, NotSerialized){}中注册 HDEF和PEGP,如下代码所示:
展开阅读全文​