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