summaryrefslogtreecommitdiffstats
path: root/OvmfPkg/AcpiTables
diff options
context:
space:
mode:
authorjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-13 15:40:07 +0000
committerjljusten <jljusten@6f19259b-4bc3-4df7-8a09-765794883524>2012-08-13 15:40:07 +0000
commitcc16a9298b55ac20d95aa6da2043211ed49afbba (patch)
tree35a660eb5425646d638e81d7f476378d43382c65 /OvmfPkg/AcpiTables
parent5e57fb754a6d50825cb011b02193dc8a3924fc46 (diff)
downloadedk2-cc16a9298b55ac20d95aa6da2043211ed49afbba.tar.gz
edk2-cc16a9298b55ac20d95aa6da2043211ed49afbba.tar.bz2
edk2-cc16a9298b55ac20d95aa6da2043211ed49afbba.zip
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 <lersek@redhat.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@13619 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'OvmfPkg/AcpiTables')
-rw-r--r--OvmfPkg/AcpiTables/Dsdt.asl44
1 files changed, 22 insertions, 22 deletions
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)
}
//