f00069fc873bf31cbbd913ff59a8c7e1ad30549b
[coreboot.git] / src / mainboard / amd / serengeti_cheetah_fam10 / acpi / amd8111_isa.asl
1 //
2 // This file is part of the coreboot project.
3 //
4 // Copyright (C) 2007 Advanced Micro Devices, Inc.
5 //
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.
9 //
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.
14 //
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
18 //
19
20 //AMD8111 isa
21
22         Device (ISA)
23         {
24                 // lpc 0x00040000
25                 Method (_ADR, 0, NotSerialized)
26                 {
27                         Return (DADD(\_SB.PCI0.SBDN, 0x00010000))
28                 }
29
30                 OperationRegion (PIRY, PCI_Config, 0x51, 0x02) // LPC Decode Registers
31                 Field (PIRY, ByteAcc, NoLock, Preserve)
32                 {
33                         Z000,   2,       // Parallel Port Range
34                          ,   1,
35                         ECP,    1,       // ECP Enable
36                         FDC1,   1,       // Floppy Drive Controller 1
37                         FDC2,   1,       // Floppy Drive Controller 2
38                         Offset (0x01),
39                         Z001,   3,       // Serial Port A Range
40                         SAEN,   1,       // Serial Post A Enabled
41                         Z002,   3,       // Serial Port B Range
42                         SBEN,   1       // Serial Post B Enabled
43                 }
44
45                 Device (PIC)
46                 {
47                         Name (_HID, EisaId ("PNP0000"))
48                         Name (_CRS, ResourceTemplate ()
49                         {
50                                 IO (Decode16, 0x0020, 0x0020, 0x01, 0x02)
51                                 IO (Decode16, 0x00A0, 0x00A0, 0x01, 0x02)
52                                 IRQ (Edge, ActiveHigh, Exclusive) {2}
53                         })
54                 }
55
56                 Device (DMA1)
57                 {
58                         Name (_HID, EisaId ("PNP0200"))
59                         Name (_CRS, ResourceTemplate ()
60                         {
61                                 IO (Decode16, 0x0000, 0x0000, 0x01, 0x10)
62                                 IO (Decode16, 0x0080, 0x0080, 0x01, 0x10)
63                                 IO (Decode16, 0x00C0, 0x00C0, 0x01, 0x20)
64                                 DMA (Compatibility, NotBusMaster, Transfer16) {4}
65                         })
66                 }
67
68                 Device (TMR)
69                 {
70                         Name (_HID, EisaId ("PNP0100"))
71                         Name (_CRS, ResourceTemplate ()
72                         {
73                                 IO (Decode16, 0x0040, 0x0040, 0x01, 0x04)
74                                 IRQ (Edge, ActiveHigh, Exclusive) {0}
75                         })
76                 }
77
78                 Device (RTC)
79                 {
80                         Name (_HID, EisaId ("PNP0B00"))
81                         Name (_CRS, ResourceTemplate ()
82                         {
83                                 IO (Decode16, 0x0070, 0x0070, 0x01, 0x06)
84                                 IRQ (Edge, ActiveHigh, Exclusive) {8}
85                         })
86                 }
87
88                 Device (SPKR)
89                 {
90                         Name (_HID, EisaId ("PNP0800"))
91                         Name (_CRS, ResourceTemplate ()
92                         {
93                                 IO (Decode16, 0x0061, 0x0061, 0x01, 0x01)
94                         })
95                 }
96
97                 Device (COPR)
98                 {
99                         Name (_HID, EisaId ("PNP0C04"))
100                         Name (_CRS, ResourceTemplate ()
101                         {
102                                 IO (Decode16, 0x00F0, 0x00F0, 0x01, 0x10)
103                                 IRQ (Edge, ActiveHigh, Exclusive) {13}
104                         })
105                 }
106
107                 Device (SYSR)
108                 {
109                         Name (_HID, EisaId ("PNP0C02"))
110                         Name (_UID, 0x00)
111                         Name (SYR1, ResourceTemplate ()
112                         {
113                                 IO (Decode16, 0x04D0, 0x04D0, 0x01, 0x02) //report Thor NVRAM
114                                 IO (Decode16, 0x1100, 0x117F, 0x01, 0x80) //report Thor NVRAM
115                                 IO (Decode16, 0x1180, 0x11FF, 0x01, 0x80)
116                                 IO (Decode16, 0x0010, 0x0010, 0x01, 0x10)
117                                 IO (Decode16, 0x0022, 0x0022, 0x01, 0x1E)
118                                 IO (Decode16, 0x0044, 0x0044, 0x01, 0x1C)
119                                 IO (Decode16, 0x0062, 0x0062, 0x01, 0x02)
120                                 IO (Decode16, 0x0065, 0x0065, 0x01, 0x0B)
121                                 IO (Decode16, 0x0076, 0x0076, 0x01, 0x0A)
122                                 IO (Decode16, 0x0090, 0x0090, 0x01, 0x10)
123                                 IO (Decode16, 0x00A2, 0x00A2, 0x01, 0x1E)
124                                 IO (Decode16, 0x00E0, 0x00E0, 0x01, 0x10)
125                                 IO (Decode16, 0x0B78, 0x0B78, 0x01, 0x04) // Added this to remove ACPI Unrepoted IO Error
126                                 IO (Decode16, 0x0190, 0x0190, 0x01, 0x04) // Added this to remove ACPI Unrepoted IO Error
127                                 })
128                         Method (_CRS, 0, NotSerialized)
129                         {
130                                 Return (SYR1)
131                         }
132                 }
133
134                 Device (MEM)
135                 {
136                         Name (_HID, EisaId ("PNP0C02"))
137                         Name (_UID, 0x01)
138                         Method (_CRS, 0, NotSerialized)
139                         {
140                                 Name (BUF0, ResourceTemplate ()
141                                 {
142                                         Memory32Fixed (ReadWrite, 0x000E0000, 0x00020000) // BIOS E4000-FFFFF
143                                         Memory32Fixed (ReadWrite, 0x000C0000, 0x00010000) // video BIOS c0000-c8404
144                                         Memory32Fixed (ReadWrite, 0xFEC00000, 0x00001000) // I/O APIC
145                                         Memory32Fixed (ReadWrite, 0xFFC00000, 0x00380000) // LPC forwarded, 4 MB w/ROM
146                                         Memory32Fixed (ReadWrite, 0xFEE00000, 0x00001000) // Local APIC
147                                         Memory32Fixed (ReadWrite, 0xFFF80000, 0x00080000) // Overlay BIOS
148                                         Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) // Overlay BIOS
149                                         Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) // Overlay BIOS
150                                         Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) // Overlay BIOS
151                                         Memory32Fixed (ReadWrite, 0x00000000, 0x00000000) // Overlay BIOS
152                                 })
153                                 // Read the Video Memory length
154                                 CreateDWordField (BUF0, 0x14, CLEN)
155                                 CreateDWordField (BUF0, 0x10, CBAS)
156
157                                 ShiftLeft (VGA1, 0x09, Local0)
158                                 Store (Local0, CLEN)
159
160                                 Return (BUF0)
161                         }
162                 }
163
164                 Device (PS2M)
165                 {
166                         Name (_HID, EisaId ("PNP0F13"))
167                         Name (_CRS, ResourceTemplate ()
168                         {
169                                 IRQNoFlags () {12}
170                         })
171                         Method (_STA, 0, NotSerialized)
172                         {
173                                 And (FLG0, 0x04, Local0)
174                                 If (LEqual (Local0, 0x04)) { Return (0x0F) }
175                                 Else { Return (0x00) }
176                         }
177                 }
178
179                 Device (PS2K)
180                 {
181                         Name (_HID, EisaId ("PNP0303"))
182                         Name (_CRS, ResourceTemplate ()
183                         {
184                                 IO (Decode16, 0x0060, 0x0060, 0x01, 0x01)
185                                 IO (Decode16, 0x0064, 0x0064, 0x01, 0x01)
186                                 IRQNoFlags () {1}
187                         })
188                 }
189                 #include "superio.asl"
190
191         }
192