From cc16a9298b55ac20d95aa6da2043211ed49afbba Mon Sep 17 00:00:00 2001 From: jljusten Date: Mon, 13 Aug 2012 15:40:07 +0000 Subject: OvmfPkg: simplify _CRS, _PRS, _SRS methods in the DSDT Use Extended Interrupt Descriptors in the _CRS, _PRS, _SRS methods of \_SB.PCI0.LPC.LNK[A-D], eliminating bit shifting. Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Laszlo Ersek Reviewed-by: Jordan Justen git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13619 6f19259b-4bc3-4df7-8a09-765794883524 --- OvmfPkg/AcpiTables/Dsdt.asl | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'OvmfPkg/AcpiTables') diff --git a/OvmfPkg/AcpiTables/Dsdt.asl b/OvmfPkg/AcpiTables/Dsdt.asl index 2dda7abcb2..6a26c3b65d 100644 --- a/OvmfPkg/AcpiTables/Dsdt.asl +++ b/OvmfPkg/AcpiTables/Dsdt.asl @@ -250,46 +250,46 @@ DefinitionBlock ("Dsdt.aml", "DSDT", 1, "INTEL ", "OVMF ", 3) { // _CRS method for LNKA, LNKB, LNKC, LNKD // Method (PCRS, 1, NotSerialized) { - Name (BUF0, ResourceTemplate () {IRQ (Level, ActiveLow, Shared){0}}) // - // Define references to buffer elements + // create temporary buffer with an Extended Interrupt Descriptor + // whose single vector defaults to zero // - CreateWordField (BUF0, 0x01, IRQW) // IRQ low + Name (BUF0, ResourceTemplate () { + Interrupt (ResourceConsumer, Level, ActiveLow, Shared){0} + } + ) + // - // Write current settings into IRQ descriptor + // define reference to first interrupt vector in buffer // - If (And (Arg0, 0x80)) { - Store (Zero, Local0) - } Else { - Store (One, Local0) - } + CreateDWordField (BUF0, 0x05, IRQW) + // - // Shift 1 by value in register 70 + // If the disable-bit is clear, overwrite the default zero vector + // with the value in Arg0 (ie. PIRQRC[A:D]). Reserved bits are read + // as 0. // - ShiftLeft (Local0, And (Arg0, 0x0F), IRQW) // Save in buffer - Return (BUF0) // Return Buf0 + If (LNot (And (Arg0, 0x80))) { + Store (Arg0, IRQW) + } + Return (BUF0) } // // _PRS resource for LNKA, LNKB, LNKC, LNKD // Name (PPRS, ResourceTemplate () { - IRQ (Level, ActiveLow, Shared) {3, 4, 5, 7, 9, 10, 11, 12, 14, 15} + Interrupt (ResourceConsumer, Level, ActiveLow, Shared) { + 3, 4, 5, 7, 9, 10, 11, 12, 14, 15 + } }) // // _SRS method for LNKA, LNKB, LNKC, LNKD // Method (PSRS, 2, NotSerialized) { - CreateWordField (Arg1, 0x01, IRQW) // IRQ low - FindSetRightBit (IRQW, Local0) // Set IRQ - If (LNotEqual (IRQW, Zero)) { - And (Local0, 0x7F, Local0) - Decrement (Local0) - } Else { - Or (Local0, 0x80, Local0) - } - Store (Local0, Arg0) + CreateDWordField (Arg1, 0x05, IRQW) + Store (IRQW, Arg0) } // -- cgit v1.2.3