[coreboot-gerrit] Change in coreboot[master]: soc/intel/cannonlake/irqlinks.asl: Don't use hardcoded _CRS

Arthur Heymans (Code Review) gerrit at coreboot.org
Mon Nov 12 11:27:58 CET 2018


Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/29592


Change subject: soc/intel/cannonlake/irqlinks.asl: Don't use hardcoded _CRS
......................................................................

soc/intel/cannonlake/irqlinks.asl: Don't use hardcoded _CRS

While FSP hardcodes the ITSS PIRQx registers to LINKB to IRQ10 and all the rest
to IRQ11, it is no reason not to fetch this information from the ITSS registers.

Change-Id: I8f9c4acbc1ea029ca679ee752592ca55b8eecb8e
Signed-off-by: Arthur Heymans <arthur at aheymans.xyz>
---
M src/soc/intel/cannonlake/acpi/irqlinks.asl
1 file changed, 184 insertions(+), 30 deletions(-)



  git pull ssh://review.coreboot.org:29418/coreboot refs/changes/92/29592/1

diff --git a/src/soc/intel/cannonlake/acpi/irqlinks.asl b/src/soc/intel/cannonlake/acpi/irqlinks.asl
index 0403ea0..1dd50ba 100644
--- a/src/soc/intel/cannonlake/acpi/irqlinks.asl
+++ b/src/soc/intel/cannonlake/acpi/irqlinks.asl
@@ -1,7 +1,9 @@
 /*
  * This file is part of the coreboot project.
  *
- * Copyright (C) 2018 Intel Corporation.
+ * Copyright (C) 2007-2009 coresystems GmbH
+ * Copyright (C) 2014 Google Inc.
+ * Copyright (C) 2015 Intel Corporation.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
@@ -46,11 +48,17 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 1)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
 		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
 		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
@@ -61,6 +69,14 @@
 		Return (RTLA)
 	}
 
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRA)
+	}
+
 	Method (_STA, 0, Serialized)
 	{
 		If (And (^^PIRA, ^^IREN)) {
@@ -69,6 +85,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRA, ^^IREN, ^^PIRA)
+	}
 }
 
 Device (LNKB)
@@ -76,19 +97,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 2)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLB, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {10}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLB, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRB, ^^IREM), IRQ0)
 
-		Return (RTLB)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRB)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -99,6 +134,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRB, ^^IREN, ^^PIRB)
+	}
 }
 
 Device (LNKC)
@@ -106,19 +146,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 3)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLC, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLC, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRC, ^^IREM), IRQ0)
 
-		Return (RTLC)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRC)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -129,6 +183,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRC, ^^IREN, ^^PIRC)
+	}
 }
 
 Device (LNKD)
@@ -136,19 +195,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 4)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLD, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLD, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRD, ^^IREM), IRQ0)
 
-		Return (RTLD)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRD)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -159,6 +232,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRD, ^^IREN, ^^PIRD)
+	}
 }
 
 Device (LNKE)
@@ -166,19 +244,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 5)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLE, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLE, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRE, ^^IREM), IRQ0)
 
-		Return (RTLE)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRE)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -189,6 +281,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRE, ^^IREN, ^^PIRE)
+	}
 }
 
 Device (LNKF)
@@ -196,19 +293,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 6)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLF, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLF, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRF, ^^IREM), IRQ0)
 
-		Return (RTLF)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRF)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -219,6 +330,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRF, ^^IREN, ^^PIRF)
+	}
 }
 
 Device (LNKG)
@@ -226,19 +342,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 7)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLG, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLG, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRG, ^^IREM), IRQ0)
 
-		Return (RTLG)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRG)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -249,6 +379,11 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRG, ^^IREN, ^^PIRG)
+	}
 }
 
 Device (LNKH)
@@ -256,19 +391,33 @@
 	Name (_HID, EISAID ("PNP0C0F"))
 	Name (_UID, 8)
 
+	Name (_PRS, ResourceTemplate ()
+	{
+		IRQ (Level, ActiveLow, Shared)
+			{ 3, 4, 5, 6, 10, 12, 14, 15 }
+	})
+
 	Method (_CRS, 0, Serialized)
 	{
-		Name (RTLH, ResourceTemplate ()
+		Name (RTLA, ResourceTemplate ()
 		{
-			IRQ (Level, ActiveLow, Shared) {11}
+			IRQ (Level, ActiveLow, Shared) {}
 		})
-		CreateWordField (RTLH, 1, IRQ0)
+		CreateWordField (RTLA, 1, IRQ0)
 		Store (Zero, IRQ0)
 
 		/* Set the bit from PIRQ Routing Register */
 		ShiftLeft (1, And (^^PIRH, ^^IREM), IRQ0)
 
-		Return (RTLH)
+		Return (RTLA)
+	}
+
+	Method (_SRS, 1, Serialized)
+	{
+		CreateWordField (Arg0, 1, IRQ0)
+		FindSetRightBit (IRQ0, Local0)
+		Decrement (Local0)
+		Store (Local0, ^^PIRH)
 	}
 
 	Method (_STA, 0, Serialized)
@@ -279,4 +428,9 @@
 			Return (0xb)
 		}
 	}
+
+	Method (_DIS, 0, Serialized)
+	{
+		Or (^^PIRH, ^^IREN, ^^PIRH)
+	}
 }

-- 
To view, visit https://review.coreboot.org/29592
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I8f9c4acbc1ea029ca679ee752592ca55b8eecb8e
Gerrit-Change-Number: 29592
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur at aheymans.xyz>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.coreboot.org/pipermail/coreboot-gerrit/attachments/20181112/ec6bcbc2/attachment-0001.html>


More information about the coreboot-gerrit mailing list