2 // This file is part of the LinuxBIOS project.
4 // Copyright (C) 2007 Advanced Micro Devices, Inc.
6 // This program is free software; you can redistribute it and/or modify
7 // it under the terms of the GNU General Public License as published by
8 // the Free Software Foundation; version 2 of the License.
10 // This program is distributed in the hope that it will be useful,
11 // but WITHOUT ANY WARRANTY; without even the implied warranty of
12 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 // GNU General Public License for more details.
15 // You should have received a copy of the GNU General Public License
16 // along with this program; if not, write to the Free Software
17 // Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
22 Method (_ADR, 0, NotSerialized)
24 Return (DADD(GHCD(HCIN, 0), 0x00000000))
27 Method (_PRW, 0, NotSerialized)
29 If (CondRefOf (\_S3, Local0)) { Return (Package (0x02) { 0x29, 0x03 }) }
30 Else { Return (Package (0x02) { 0x29, 0x01 }) }
33 Name (APIC, Package (0x04)
36 Package (0x04) { 0x0001FFFF, 0x00, 0x00, 0x0018 }, //Slot 2
37 Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x0019 },
38 Package (0x04) { 0x0001FFFF, 0x02, 0x00, 0x001A },
39 Package (0x04) { 0x0001FFFF, 0x03, 0x00, 0x001B },
41 Name (PICM, Package (0x04)
43 Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },//Slot 2
44 Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LNKB, 0x00 },
45 Package (0x04) { 0x0001FFFF, 0x02, \_SB.PCI0.LNKC, 0x00 },
46 Package (0x04) { 0x0001FFFF, 0x03, \_SB.PCI0.LNKD, 0x00 },
51 Method (_PRT, 0, NotSerialized)
53 If (LEqual (^DNCG, Ones))
55 Multiply (HCIN, 0x0008, Local2) // GSI for 8132 is 4 so we get 8
57 While (LLess (Local1, 0x04))
59 // Update the GSI according to HCIN
60 Store(DeRefOf(Index (DeRefOf (Index (APIC, Local1)), 3)), Local0)
61 Add(Local2, Local0, Local0)
62 Store(Local0, Index (DeRefOf (Index (APIC, Local1)), 3))
67 If (LNot (PICF)) { Return (PICM) }
68 Else { Return (APIC) }
75 Method (_ADR, 0, NotSerialized)
77 Return (DADD(GHCD(HCIN, 0), 0x00010000))
80 Method (_PRW, 0, NotSerialized)
82 If (CondRefOf (\_S3, Local0)) { Return (Package (0x02) { 0x22, 0x03 }) }
83 Else { Return (Package (0x02) { 0x22, 0x01 }) }
86 Name (APIC, Package (0x04)
89 Package (0x04) { 0x0001FFFF, 0x00, 0x00, 0x001F },// Slot 1
90 Package (0x04) { 0x0001FFFF, 0x01, 0x00, 0x0020 },
91 Package (0x04) { 0x0001FFFF, 0x02, 0x00, 0x0021 },
92 Package (0x04) { 0x0001FFFF, 0x03, 0x00, 0x0022 }
94 Name (PICM, Package (0x04)
96 Package (0x04) { 0x0001FFFF, 0x00, \_SB.PCI0.LNKA, 0x00 },//Slot 1
97 Package (0x04) { 0x0001FFFF, 0x01, \_SB.PCI0.LNKB, 0x00 },
98 Package (0x04) { 0x0001FFFF, 0x02, \_SB.PCI0.LNKC, 0x00 },
99 Package (0x04) { 0x0001FFFF, 0x03, \_SB.PCI0.LNKD, 0x00 }
104 Method (_PRT, 0, NotSerialized)
106 If (LEqual (^DNCG, Ones))
108 Multiply (HCIN, 0x0008, Local2) // GSI for 8132 is 4 so we get 8
110 While (LLess (Local1, 0x04))
112 // Update the GSI according to HCIN
113 Store(DeRefOf(Index (DeRefOf (Index (APIC, Local1)), 3)), Local0)
114 Add(Local2, Local0, Local0)
115 Store(Local0, Index (DeRefOf (Index (APIC, Local1)), 3))
123 If (LNot (PICF)) { Return (PICM) }
124 Else { Return (APIC) }