📄 8661fdc.asl
字号:
Device(FDC0) { // Floppy Disk controller
Name(_HID, EISAID("PNP0700")) // PnP Device ID
Method(_STA,0) { //Status of the Floppy disk controller
ENFG() // Enter Config Mode
Store(Zero,LDN_)
If (ACTR) {
EXFG()
Return(0x0F)
} // Device present and active
Else {
If (LOr(IOAH,IOAL)) {
EXFG()
Return(0x0D)
}
Else {
EXFG()
Return(0x00) // code = Device not even Present
}
}
} // end of _STA method
Method(_DIS,0) { //Disable
ENFG()
Store(0x00, LDN_) //set logical device number for Floppy
Store(Zero, ACTR) //Set Activate Register to zero
EXFG()
} //end _DIS method
Method(_CRS,0) { //Current FDC Resource
Name(BUF0,Buffer()
{
0x47, //IO Port Descriptor
0x01, //16 bit decode
0x00, //IO Port Range Minimum Base Low
0x00, //IO Port Range Minimum Base High
0x00, //IO Port Range Maximum Base LOW
0x00, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x04, //Length of contiguous IO Ports
0x47, //IO Port Descriptor
0x01, //16 bit decode
0x00, //IO Port Range Minimum Base Low
0x00, //IO Port Range Minimum Base High
0x00, //IO Port Range Maximum Base LOW
0x00, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x01, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x00, //IRQ Mask Lo=bit 6
0x00, //IRQ Mask High
0x2A, //DMA Descriptor
0x00, //DMA Mask CH2
0x00, //DMA Channel Speed Support
0x79, //end tag
0x00,
}
)
CreateByteField (BUF0, 0x02, IOLO)
CreateByteField (BUF0, 0x03, IOHI)
CreateByteField (BUF0, 0x04, IORL)
CreateByteField (BUF0, 0x05, IORH)
CreateByteField (BUF0, 0x0A, ILO1)
CreateByteField (BUF0, 0x0B, IHI1)
CreateByteField (BUF0, 0x0C, IRL1)
CreateByteField (BUF0, 0x0D, IRH1)
CreateByteField (BUF0, 0x11, IRQL)
CreateByteField (BUF0, 0x14, DMAV)
ENFG()
Store (Zero,LDN_) //Logical device number for serial 1
Store (One,ACTR)
Add (IOAL, 2, LOCAL2)
Store (Local2, IOLO)
Store (Local2, IORL)
Store (IOAH, IOHI)
Store (IOAH, IORH)
Add (IOAL, 7, LOCAL2)
Store (Local2, ILO1)
Store (Local2, IRL1)
Store (IOAH, IHI1)
Store (IOAH, IRH1)
Store (One, Local0)
ShiftLeft (Local0,INTR,IRQL)
Store (One, Local0)
ShiftLeft (Local0,DMCH,DMAV)
EXFG()
Return(BUF0) // Return Buf0
} // end _CRS method
Name(_PRS,Buffer() //24*8
{
0x30,
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xF2, //IO Port Range Minimum Base Low
0x03, //IO Port Range Minimum Base High
0xF2, //IO Port Range Maximum Base LOW
0x03, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x04, //Length of contiguous IO Ports
0x47, //IO Port Descriptor
0x01, //16 bit decode
0xF7, //IO Port Range Minimum Base Low
0x03, //IO Port Range Minimum Base High
0xF7, //IO Port Range Maximum Base LOW
0x03, //IO Port Range Maximum Base High
0x00, //Base Alignment
0x01, //Length of contiguous IO Ports
0x22, //IRQ Descriptor
0x40, //IRQ Mask Lo=bit 6
0x00, //IRQ Mask High
0x2A, //DMA Descriptor
0x04, //DMA Mask CH2
0x00, //DMA Channel Speed Support
0x38,
0x79, //end tag
0x00,
} // end Buffer
) // end _PRS method
Method(_SRS,1) { //Set Resource
CreateByteField (Arg0, 0x02, IOLO) //IO Port Low
CreateByteField (Arg0, 0x03, IOHI) //IO Port High
CreateWordField (Arg0, 0x11, IRQL) //IRQ low
CreateByteField (Arg0, 0x14, DMAV) //DMA
ENFG()
Store(Zero, LDN_)
Store(0xF0, IOAL)
Store(IOHI, IOAH)
FindSetRightBit(IRQL,Local0)
Subtract (Local0, 0x01, INTR)
FindSetRightBit(DMAV,Local0)
Subtract (Local0, 0x01, DMCH)
Store(One, ACTR) //Set activate configuration register
EXFG()
} // end of _SRS method
} // end of FDC0 device
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -