📄 win877.asl
字号:
{
Store(0x03, IOHI)
Store(0xF8, IOLO)
}
Else
{
If (LEqual(Local2,0xbe))
{
Store(0x02, IOHI)
Store(0xF8, IOLO)
}
Else
{
If (LEqual(Local2,0xfa))
{
Store(0x03, IOHI)
Store(0xE8, IOLO)
}
Else
{
Store(0x02, IOHI)
Store(0xE8, IOLO)
}
}
}
Store(IOLO, IORL)
Store(IOHI, IORH)
// Write Current Settings into IRQ descriptor
Store(One,Local0)
Store(CR28,Local5)
ShiftRight(Local5,4,Local5)
ShiftLeft(Local0,Local5,IRQL)
EXFG()
Return(BUF1) // Return BUF1
} // End _CRS method
// Possible Resource Settings
Name(_PRS,Buffer(){
/// First Possible Config 3F8, IRQ 4
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xF8, // IO Port Base Minimum Low
0x03, // IO Port Base Maximum High
0xF8, // IO Port Range Minimum Low
0x03, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x10, // IRQ Mask
0x00,
/// Second Possible Config 2F8 IRQ 3
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xF8, // IO Port Base Minimum Low
0x02, // IO Port Base Maximum High
0xF8, // IO Port Range Minimum Low
0x02, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x08, // IRQ Mask
0x00,
/// Third Possible Config 3E8 IRQ 4
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xE8, // IO Port Base Minimum Low
0x03, // IO Port Base Maximum High
0xE8, // IO Port Range Minimum Low
0x03, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x10, // IRQ Mask
0x00,
/// Fourth Possible Config 2E8 IRQ 3
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xE8, // IO Port Base Minimum Low
0x02, // IO Port Base Maximum High
0xE8, // IO Port Range Minimum Low
0x02, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x08, // IRQ Mask
0x00,
0x38, // End Dependent Function
0x79, // End Tag
0x00, //
})
// Set Resource Settings
Method(_SRS,1){
CreateByteField (ARG0, 0x02, IOLO) // IO Port Low
CreateByteField (ARG0, 0x03, IOHI) // IO Port High
CreateByteField (ARG0, 0x09, IRQL) // IRQ
ENFG()
// Set Base IO Address
If (LEqual(IOHI,0x03))
{
If (LEqual(IOLO,0xF8))
{
Store(0xfe, CR24)
}
Else
{
Store(0xfa, CR24)
}
}
Else
{
If (LEqual(IOLO,0xF8))
{
Store(0xbe, CR24)
}
Else
{
Store(0xba, CR24)
}
}
// Set IRQ
FindSetRightBit(IRQL,Local0)
Subtract(Local0,1,Local0)
ShiftLeft(Local0,4,Local0)
Store(CR28,Local5)
And(Local5,0x0f,Local5)
Or(Local0,Local5,CR28)
EXFG()
} // End _SRS Method
// RI# Ring Indicate Wake Up on UART1 - Applies only to Desktop Reference TX
// Method(_PRW,0){ // Wake-up control method
// Return(10) // RI is wired to the chipset
// // as a wake event
// }
} // End of UART1
// UART2 - COMB
// Presently Code only for COM
// COM Control Methods RS232 Operation
Device(UAR2){
Name(_HID,EISAID("PNP0501"))
Name(_UID,2) // Generic ID for COMB
// Status
Method(_STA,0){
// Enable Config
ENFG()
// Is the device functioning?
// read Activate Register
If(CR25)
{ // Return Device Present and
// device Active
EXFG()
Return(0xf)
}
Else
{
EXFG()
Return(1) // Device Absent
}
} // End _STA method
// Disable
Method(_DIS,0){
// Enable Config
ENFG()
// Set Address Register to zero
// Store(Zero, CR25)
EXFG()
} // End _DIS method
// Current Resource Settings
Method(_CRS,0){
Name(BUF1,Buffer(){
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xF8, // IO Port Range Minimum Base Low
0x03, // IO Port Range Minimum Base High
0xF8, // IO Port Range Maximum Base LOW
0x03, // IO Port Range Maximum Base High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x10, // IRQ Mask Lo=bit 4
0x0,
0x79, // End Tag
0x00, // Checksum = 0 Treat as if the
// Structure checksummed correctly
})
CreateByteField (BUF1, 0x02, IOLO) // IO Port Low
CreateByteField (BUF1, 0x03, IOHI) // IO Port High
CreateByteField (BUF1, 0x04, IORL) // IO Range Low
CreateByteField (BUF1, 0x05, IORH) // IO Range High
CreateByteField (BUF1, 0x09, IRQL) // IRQ Mask
ENFG()
// Write Current Settings into Buffer for IO Descriptor
Store(CR25, Local2)
If (LEqual(Local2,0xfe))
{
Store(0x03, IOHI)
Store(0xF8, IOLO)
}
Else
{
If (LEqual(Local2,0xbe))
{
Store(0x02, IOHI)
Store(0xF8, IOLO)
}
Else
{
If (LEqual(Local2,0xfa))
{
Store(0x03, IOHI)
Store(0xE8, IOLO)
}
Else
{
Store(0x02, IOHI)
Store(0xE8, IOLO)
}
}
}
Store(IOLO, IORL)
Store(IOHI, IORH)
// Write Current Settings into IRQ descriptor
Store(One,Local0)
Store(CR28,Local5)
And(Local5,0x0f,Local5)
ShiftLeft(Local0,Local5,IRQL)
EXFG()
Return(BUF1) // Return BUF1
} // End _CRS method
// Possible Resource Settings
Name(_PRS,Buffer(){
/// First Possible Config 3F8, IRQ 4
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xF8, // IO Port Base Minimum Low
0x03, // IO Port Base Maximum High
0xF8, // IO Port Range Minimum Low
0x03, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x10, // IRQ Mask
0x00,
/// Second Possible Config 2F8 IRQ 3
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xF8, // IO Port Base Minimum Low
0x02, // IO Port Base Maximum High
0xF8, // IO Port Range Minimum Low
0x02, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x08, // IRQ Mask
0x00,
/// Third Possible Config 3E8 IRQ 4
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xE8, // IO Port Base Minimum Low
0x03, // IO Port Base Maximum High
0xE8, // IO Port Range Minimum Low
0x03, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x10, // IRQ Mask
0x00,
/// Fourth Possible Config 2E8 IRQ 3
0x30, // Start Dependent Function
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0xE8, // IO Port Base Minimum Low
0x02, // IO Port Base Maximum High
0xE8, // IO Port Range Minimum Low
0x02, // IO Port Range Maximum High
0x08, // Base Alignment
0x08, // Length of contiguous IO Ports
0x22, // IRQ Descriptor
0x08, // IRQ Mask
0x00,
0x38, // End Dependent Function
0x79, // End Tag
0x00, //
})
// Set Resource Settings
Method(_SRS,1){
CreateByteField (ARG0, 0x02, IOLO) // IO Port Low
CreateByteField (ARG0, 0x03, IOHI) // IO Port High
CreateByteField (ARG0, 0x09, IRQL) // IRQ
ENFG()
// Set Base IO Address
If (LEqual(IOHI,0x03))
{
If (LEqual(IOLO,0xF8))
{
Store(0xfe, CR25)
}
Else
{
Store(0xfa, CR25)
}
}
Else
{
If (LEqual(IOLO,0xF8))
{
Store(0xbe, CR25)
}
Else
{
Store(0xba, CR25)
}
}
// Set IRQ
FindSetRightBit(IRQL,Local0)
Subtract(Local0,1,Local0)
Store(CR28,Local5)
And(Local5,0xf0,Local5)
Or(Local0,Local5,CR28)
EXFG()
} // End _SRS Method
} // End of COMB
// ECP DEVICE
Device(ECP) {
Name (_HID, EISAID("PNP0401")) // PnP ID ECP Port
// ECP Device Status
Method (_STA, 0) {
ENFG()
And(CR09, 0x80, Local0)
And(CR00, 0x08, Local1)
If(LAnd(Local1, Local0))
{
If(CR23)
{
EXFG()
Return(0xf) // Return Device Present and device Active
}
Else
{
EXFG()
Return(0x1) // Return Device Present and Disable
}
}
Else
{
EXFG()
Return(0) // Device Absent
}
} // End of _STA Method
// Device Disable
Method (_DIS) {
ENFG()
Store (Zero, CR23) // Set Activate Reg = 0
EXFG()
} // End of _DIS Method
// Current Resource Settings
Method (_CRS) {
Name(BUF6,Buffer(){
0x47, // IO Port Descriptor
0x01, // 16 bit decode
0x00, //
0x00,
0x00,
0x00,
0x01, // Alignment
0x08, // Number of ports
0x47, // IO port descriptor
0x01, // 16 bit decode
0x00, // LPT1 @ 0x778h
0x00,
0x00,
0x00,
0x01, // Alignment
0x04, // Number of Ports
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -