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