⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 p364uar2.asl

📁 awardbios源文件.供喜欢研究底层技术人员参考学习.
💻 ASL
字号:

Device(COMB)	
{ 
        Name(_HID,EISAID("PNP0501"))
        Name(_UID,0x02)
        Method(_STA,0)	
        {
                Store(0x02,LDN_)	// set logical device number for Serial Port 2
                And(SFLG,0x10,Local0)	//R01
                If (LNotEqual(Local0, 0x10)) 
                {
                        If(ACTR) 
                        {
                                Return(0x0F)
                        }
                        Else 
                        {
                                If (LOr(IOAH,IOAL)) 
                                {
                                        Return(0x0D)
                                }
                                Else 
                                {
                                        Return(0x00)  // code = Device not even Present
                                }
                        }
                }
                Else 
                {
                        Return(0x00) 	// Not present
                }
        } 			// end of _STA method

        Method(_DIS,0)	
        {
                Store(0x02, LDN_)
                Store(Zero, ACTR)
                DISD(0x01)		//R02
                      }	// end _DIS method


        Method(_CRS,0)	
        {
                Name(BUF2,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
                        0x08, 		// Base Alignment
                        0x08, 		// Length of contiguous IO Ports

                        0x22, 		// IRQ Descriptor
                        0x10, 		// IRQ Mask Lo=bit 2
                        0x00,

                        0x79, 		// end tag
                        0x00,
                 })

                CreateByteField (BUF2, 0x02, IOLO) 	// IO Port Low
                CreateByteField (BUF2, 0x03, IOHI) 	// IO Port High
                CreateByteField (BUF2, 0x04, IORL) 	// IO Port Low
                CreateByteField (BUF2, 0x05, IORH) 	// IO Port High
                CreateWordField (BUF2, 0x09, IRQW) 	// IRQ Word

                Store(0x02,LDN_)
                Store(IOAL,IOLO)
                Store(IOAL,IORL)
                Store(IOAH,IOHI)
                Store(IOAH,IORH)

                Store(Zero, IRQW)
                If(LNotEqual(INTR,Zero))
                {
                        ShiftLeft(One,INTR,IRQW)
                }

                Return(BUF2)
        } 	// end _CRS method

        Name(_PRS,Buffer()
        { 
                0x30, 			// Start Dependent Function

                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
                                           
                0x30, 			// Start Dependent Function
                                           
                0x47, 			// IO Port Descriptor
                0x01, 			// 16 bit decode
                0xF8, 			// IO Port Range Minimum Base Low
                0x02, 			// IO Port Range Minimum Base High
                0xF8, 			// IO Port Range Maximum Base LOW
                0x02, 			// IO Port Range Maximum Base High
                0x08, 			// Base Alignment
                0x08, 			// Length of contiguous IO Ports

                0x30, 			// Start Dependent Function

                0x47, 			// IO Port Descriptor
                0x01, 			// 16 bit decode
                0xE8, 			// IO Port Range Minimum Base Low
                0x03, 			// IO Port Range Minimum Base High
                0xE8, 			// IO Port Range Maximum Base LOW
                0x03, 			// IO Port Range Maximum Base High
                0x08, 			// Base Alignment
                0x08, 			// Length of contiguous IO Ports
                                           
                0x30, 			// Start Dependent Function

                0x47, 			// IO Port Descriptor
                0x01, 			// 16 bit decode
                0xE8, 			// IO Port Range Minimum Base Low
                0x02, 			// IO Port Range Minimum Base High
                0xE8, 			// IO Port Range Maximum Base LOW
                0x02, 			// IO Port Range Maximum Base High
                0x08, 			// Base Alignment
                0x08, 			// Length of contiguous IO Ports
                                           
                0x38, 			// End Dependent Function

                0x22, 			// IRQ Descriptor
                0xB8,	// IRQ Mask Lo=bits 3 and 4
                0x1E,

                0x79, 			// end tag
                0x00, 			// Checksum = 0 Treat as if the
        })

        Method(_SRS,1)	
        {
                CreateByteField (Arg0, 0x02, IOLO) 	//IO Port Low
                CreateByteField (Arg0, 0x03, IOHI) 	//IO Port High
                CreateWordField (Arg0, 0x02, IOAD)	//R02
                CreateWordField (Arg0, 0x09, IRQW) 	//IRQ word

                Store(0x02, LDN_)	
                Store(One, ACTR) 	// Set activate configuration register
                Store(IOLO, IOAL)
                Store(IOHI, IOAH)
                FindSetLeftBit(IRQW, Local0)
                If(LNotEqual(Local0, Zero))
                {
                        Subtract(Local0, 0x01, Local0)
                }
                Store (Local0, INTR)
                CKIO(IOAD,0x01)		//R02
        }	// end _SRS method
} 				// end COMB device

Device(IRDA)	
{
        Name(_HID,EISAID("PNP0510")) 	// Generic ID for IRDA
        Method(_STA,0)	
        {
                Store(0x02,LDN_)	
                And(SFLG,0x10,Local0)	//R01
                If(LEqual(Local0, 0x10)) 
                {
                        If(ACTR) 
                        {
                                Return(0x0F)
                        }
                        Else 
                        {
                                If (LOr(IOAH,IOAL)) 
                                {
                                        Return(0x0D)
                                }
                                Else 
                                {
                                        Return(0x00)  
                                }	
                        }
                }
                Else 
                {
                        Return(0x00) 	//Not present
                }
        }	// end of _STA method

        Method(_DIS,0)	
        {
                Store(0x02, LDN_)
                Store(Zero, ACTR)
                DISD(0x01)		//R02
        } 	// end _DIS method

        Method(_CRS,0)	
        {
                Name(BUF4,Buffer()
                {	 		//13*8
                        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
                        0x08, 		// Base Alignment
                        0x08, 		// Length of contiguous IO Ports

                        0x22, 		// IRQ Descriptor
                        0x00, 		// IRQ Mask Lo=bit 4
                        0x00,

                        0x79, 		// end tag
                        0x00,
                })

                CreateByteField (BUF4, 0x02, IOLO) 	// IO Port Low
                CreateByteField (BUF4, 0x03, IOHI) 	// IO Port High
                CreateByteField (BUF4, 0x04, IORL) 	// IO Port Low
                CreateByteField (BUF4, 0x05, IORH) 	// IO Port High
                CreateWordField (BUF4, 0x09, IRQW) 	// IRQ word

                Store(0x02, LDN_)

                Store(IOAL,IOLO)
                Store(IOAL,IORL)
                Store(IOAH,IOHI)
                Store(IOAH,IORH)

                Store(Zero, IRQW)
                If(LNotEqual(INTR,Zero))
                {
                        ShiftLeft(One,INTR,IRQW)	// (src, shiftcount, result)
                }

                Return(BUF4) 		// Return BUF4
        } 				// end _CRS method

        Name(_PRS,Buffer()
        {
                0x30, 			// Start Dependent Function

                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

                0x30, 			// Start Dependent Function

                0x47, 			//IO Port Descriptor
                0x01, 			//16 bit decode
                0xF8, 			//IO Port Range Minimum Base Low
                0x02, 			//IO Port Range Minimum Base High
                0xF8, 			//IO Port Range Maximum Base LOW
                0x02, 			//IO Port Range Maximum Base High
                0x08, 			//Base Alignment
                0x08, 			//Length of contiguous IO Ports

                0x30, 			// Start Dependent Function

                0x47, 			//IO Port Descriptor
                0x01, 			//16 bit decode
                0xE8, 			//IO Port Range Minimum Base Low
                0x03, 			//IO Port Range Minimum Base High
                0xE8, 			//IO Port Range Maximum Base LOW
                0x03, 			//IO Port Range Maximum Base High
                0x08, 			//Base Alignment
                0x08, 			//Length of contiguous IO Ports

                0x30, 			// Start Dependent Function

                0x47, 			//IO Port Descriptor
                0x01, 			//16 bit decode
                0xE8, 			//IO Port Range Minimum Base Low
                0x02, 			//IO Port Range Minimum Base High
                0xE8, 			//IO Port Range Maximum Base LOW
                0x02, 			//IO Port Range Maximum Base High
                0x08, 			//Base Alignment
                0x08, 			//Length of contiguous IO Ports

                0x38, 			// End Dependent Function

                0x22, 			//IRQ Descriptor
                0xB8, 	//IRQ Mask Lo=bits 3 and 4
                0x1E,

                0x79, 			//end tag
                0x00, 			// Checksum = 0 Treat as if the
        })

        Method(_SRS,1)	{		 //Set Resource
                CreateByteField (Arg0, 0x02, IOLO) 	//IO Port Low
                CreateByteField (Arg0, 0x03, IOHI) 	//IO Port High
                CreateWordField (Arg0, 0x02, IOAD)	//R02
                CreateWordField (Arg0, 0x09, IRQW) 	//IRQ word

                Store(0x02, LDN_)
                Store(ONE, ACTR) 
                Store(IOLO, IOAL)
                Store(IOHI, IOAH)

                FindSetLeftBit(IRQW, Local0)
                If(LNotEqual(Local0, Zero))
                {
                        Subtract(Local0, 0x01, Local0)
                }
                Store (Local0, INTR)
                CKIO(IOAD,0x01)		//R02
        } 	// end _SRS method
} 	// end IRDA device



⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -