--- /dev/null
+/** @file\r
+Legacy resource template\r
+\r
+Copyright (c) 2013-2015 Intel Corporation.\r
+\r
+This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution. The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+\r
+**/\r
+\r
+#ifndef LPC_DEV_ASI\r
+#define LPC_DEV_ASI\r
+\r
+Device(RTC)\r
+{\r
+ Name(_HID,EISAID("PNP0B00"))\r
+ Name(BUF0,ResourceTemplate() {\r
+ IO(Decode16,0x70,0x70,0x01,0x04)\r
+ IO(Decode16,0x74,0x74,0x01,0x04)\r
+ })\r
+ Name(BUF1,ResourceTemplate() {\r
+ IO(Decode16,0x70,0x70,0x01,0x04)\r
+ IO(Decode16,0x74,0x74,0x01,0x04)\r
+ IRQNoFlags(){8}\r
+ })\r
+ Method(_CRS,0,Serialized)\r
+ {\r
+ If (HPEA)\r
+ {\r
+ return (BUF0)\r
+ }\r
+ Else\r
+ {\r
+ return (BUF1)\r
+ }\r
+ }\r
+}\r
+\r
+Device(PIC)\r
+{\r
+ Name(_HID,EISAID("PNP0000"))\r
+\r
+ Name(_CRS,ResourceTemplate() {\r
+ IO(Decode16,0x20,0x20,0x01,0x1E) // length of 1Eh includes all aliases\r
+ IO(Decode16,0xA0,0xA0,0x01,0x1E)\r
+ IO(Decode16,0x4D0,0x4D0,0x01,0x02)\r
+ })\r
+}\r
+\r
+Device(TMR)\r
+{\r
+ Name(_HID,EISAID("PNP0100"))\r
+\r
+ Name(BUF0,ResourceTemplate() {\r
+ IO(Decode16,0x40,0x40,0x01,0x04)\r
+ IO(Decode16,0x50,0x50,0x01,0x04) // alias\r
+ })\r
+ Name(BUF1,ResourceTemplate() {\r
+ IO(Decode16,0x40,0x40,0x01,0x04)\r
+ IO(Decode16,0x50,0x50,0x01,0x04) // alias\r
+ IRQNoFlags(){0}\r
+ })\r
+ Method(_CRS,0,Serialized)\r
+ {\r
+ If (HPEA)\r
+ {\r
+ return (BUF0)\r
+ }\r
+ Else\r
+ {\r
+ return (BUF1)\r
+ }\r
+ }\r
+}\r
+\r
+Device(SPKR)\r
+{\r
+ Name(_HID,EISAID("PNP0800"))\r
+\r
+ Name(_CRS,ResourceTemplate() {\r
+ IO(Decode16,0x61,0x61,0x01,0x01)\r
+ })\r
+}\r
+\r
+Device(XTRA) // all "PNP0C02" devices- pieces that don't fit anywhere else\r
+{\r
+ Name(_HID,EISAID("PNP0C02")) // Generic motherboard devices\r
+\r
+ Name(CRS,\r
+ ResourceTemplate()\r
+ {\r
+ IO(Decode16,0x2E,0x2E,0x01,0x02)\r
+ IO(Decode16,0x4E,0x2E,0x01,0x02)\r
+ IO(Decode16,0x63,0x61,0x01,0x01)\r
+ IO(Decode16,0x65,0x61,0x01,0x01)\r
+ IO(Decode16,0x67,0x61,0x01,0x01)\r
+ IO(Decode16,0x80,0x80,0x01,0x01)\r
+ IO(Decode16,0x84,0x84,0x01,0x04)\r
+ IO(Decode16,0x88,0x88,0x01,0x01)\r
+ IO(Decode16,0x8c,0x8c,0x01,0x03)\r
+ IO(Decode16,0x92,0x92,0x01,0x01)\r
+\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x10,\r
+ FIX1\r
+ )\r
+\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x10,\r
+ FIX2\r
+ )\r
+\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x40,\r
+ FIX3\r
+ )\r
+\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x40,\r
+ FIX5\r
+ )\r
+\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x40,\r
+ FIX6\r
+ )\r
+\r
+ }\r
+ )\r
+\r
+ Method (_CRS, 0, NotSerialized) {\r
+ CreateWordField (CRS, ^FIX1._MIN, MBR0)\r
+ Store(\P1BB, MBR0)\r
+ CreateWordField (CRS, ^FIX1._MAX, MBR1)\r
+ Store(\P1BB, MBR1)\r
+ CreateWordField (CRS, ^FIX2._MIN, MBR2)\r
+ Store(\PBAB, MBR2)\r
+ CreateWordField (CRS, ^FIX2._MAX, MBR3)\r
+ Store(\PBAB, MBR3)\r
+ CreateWordField (CRS, ^FIX3._MIN, MBR4)\r
+ Store(\GP0B, MBR4)\r
+ CreateWordField (CRS, ^FIX3._MAX, MBR5)\r
+ Store(\GP0B, MBR5)\r
+ CreateWordField (CRS, ^FIX5._MIN, MBR8)\r
+ Store(\SMBB, MBR8)\r
+ CreateWordField (CRS, ^FIX5._MAX, MBR9)\r
+ Store(\SMBB, MBR9)\r
+ CreateWordField (CRS, ^FIX6._MIN, MBRA)\r
+ Store(\WDTB, MBRA)\r
+ CreateWordField (CRS, ^FIX6._MAX, MBRB)\r
+ Store(\WDTB, MBRB)\r
+ return (CRS)\r
+ }\r
+}\r
+\r
+Device(LGIO) // Legacy GPIO.\r
+{\r
+ Name(_HID, "INT3488")\r
+ Name(_CID, "INT3488")\r
+\r
+ Name(CRS,\r
+ ResourceTemplate()\r
+ {\r
+ IO(\r
+ Decode16,\r
+ 0,\r
+ 0,\r
+ 0x01,\r
+ 0x48,\r
+ FIX4\r
+ )\r
+ }\r
+ )\r
+\r
+ Method (_CRS, 0, NotSerialized) {\r
+ CreateWordField (CRS, ^FIX4._MIN, MBR6)\r
+ Store(\GPAB, MBR6)\r
+ CreateWordField (CRS, ^FIX4._MAX, MBR7)\r
+ Store(\GPAB, MBR7)\r
+ return (CRS)\r
+ }\r
+}\r
+\r
+Device(HPET) // High Performance Event Timer\r
+{\r
+ Name(_HID,EISAID("PNP0103"))\r
+\r
+ Name(BUF0,ResourceTemplate()\r
+ {\r
+ IRQNoFlags() {0}\r
+ IRQNoFlags() {8}\r
+ Memory32Fixed(ReadOnly, 0, 0, FIX1)\r
+ })\r
+\r
+ Method(_STA,0)\r
+ {\r
+ // Show this Device only if the OS is WINXP or beyond.\r
+\r
+ If(LGreaterEqual(OSTP,WINDOWS_XP))\r
+ {\r
+ If(HPEA)\r
+ {\r
+ Return(0x000F) // Enabled, do Display.\r
+ }\r
+ }\r
+ Else\r
+ {\r
+ // OS = WIN98, WINME, or WIN2000.\r
+\r
+ If(HPEA)\r
+ {\r
+ Return(0x000B) // Enabled, don't Display.\r
+ }\r
+ }\r
+\r
+ Return(0x0000) // Return Nothing.\r
+ }\r
+\r
+ Method(_CRS,0,Serialized)\r
+ {\r
+ CreateDWordField (BUF0, ^FIX1._BAS, MBR0)\r
+ Store(\HPTB, MBR0)\r
+ CreateDWordField (BUF0, ^FIX1._LEN, MBR1)\r
+ Store(\HPTS, MBR1)\r
+ Return(BUF0)\r
+ }\r
+}\r
+\r
+#endif\r