blob: b38acba5241b3f47f446a169cb1070c7d058ca75 [file] [log] [blame]
Frank Vibrans2b4c8312011-02-14 18:30:54 +00001/*
2 *****************************************************************************
3 *
4 * Copyright (c) 2011, Advanced Micro Devices, Inc.
5 * All rights reserved.
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions are met:
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 * * Redistributions in binary form must reproduce the above copyright
12 * notice, this list of conditions and the following disclaimer in the
13 * documentation and/or other materials provided with the distribution.
14 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
15 * its contributors may be used to endorse or promote products derived
16 * from this software without specific prior written permission.
17 *
18 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
19 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
20 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
21 * DISCLAIMED. IN NO EVENT SHALL ADVANCED MICRO DEVICES, INC. BE LIABLE FOR ANY
22 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
23 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
24 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
25 * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
27 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 *
29 * ***************************************************************************
30 *
31 */
32
Kerry Shefeed3292011-08-18 18:03:44 +080033#ifndef BIOS_SIZE
34 #define BIOS_SIZE 0x04 //04 - 1MB
35#endif
Frank Vibrans2b4c8312011-02-14 18:30:54 +000036#define LEGACY_FREE 0x00
Scott Duplichan2b9143a2011-05-15 21:19:54 +000037//#define ACPI_SLEEP_TRAP 0x01
Frank Vibrans2b4c8312011-02-14 18:30:54 +000038//#define SPREAD_SPECTRUM_EPROM_LOAD 0x01
39
40/**
41 * Module Specific Defines for platform BIOS
42 *
43 */
44
45/**
46 * PCIEX_BASE_ADDRESS - Define PCIE base address
47 *
48 * @param[Option] MOVE_PCIEBAR_TO_F0000000 Set PCIe base address to 0xF7000000
49 */
50#ifdef MOVE_PCIEBAR_TO_F0000000
51 #define PCIEX_BASE_ADDRESS 0xF7000000
52#else
Marc Jones44d3c3d2011-05-15 23:13:54 +000053 #define PCIEX_BASE_ADDRESS CONFIG_MMCONF_BASE_ADDRESS
Frank Vibrans2b4c8312011-02-14 18:30:54 +000054#endif
55
56/**
57 * SMBUS0_BASE_ADDRESS - Smbus base address
58 *
59 */
60#ifndef SMBUS0_BASE_ADDRESS
61 #define SMBUS0_BASE_ADDRESS 0xB00
62#endif
63
64/**
65 * SMBUS1_BASE_ADDRESS - Smbus1 (ASF) base address
66 *
67 */
68#ifndef SMBUS1_BASE_ADDRESS
69 #define SMBUS1_BASE_ADDRESS 0xB20
70#endif
71
72/**
73 * GEC_BASE_ADDRESS - Gec Shadow ROM base address
74 *
75 */
76#ifndef GEC_BASE_ADDRESS
77 #define GEC_BASE_ADDRESS 0xFED61000
78#endif
79
80
81/**
82 * SIO_PME_BASE_ADDRESS - Super IO PME base address
83 *
84 */
85#ifndef SIO_PME_BASE_ADDRESS
86 #define SIO_PME_BASE_ADDRESS 0xE00
87#endif
88
89/**
Kerry She6209c822011-08-18 18:44:00 +080090 * SIO_HWM_BASE_ADDRESS - Super IO HWM base address
91 *
92 */
93#ifndef SIO_HWM_BASE_ADDRESS
94 #define SIO_HWM_BASE_ADDRESS 0x290
95#endif
96
97/**
Frank Vibrans2b4c8312011-02-14 18:30:54 +000098 * SPI_BASE_ADDRESS - SPI controller (ROM) base address
99 *
100 */
101#ifndef SPI_BASE_ADDRESS
102 #define SPI_BASE_ADDRESS 0xFEC10000
103#endif
104
105/**
106 * WATCHDOG_TIMER_BASE_ADDRESS - WATCHDOG timer base address
107 *
108 */
109#ifndef WATCHDOG_TIMER_BASE_ADDRESS
110 #define WATCHDOG_TIMER_BASE_ADDRESS 0xFEC000F0 // Watchdog Timer Base Address
111#endif
112
113/**
114 * HPET_BASE_ADDRESS - HPET base address
115 *
116 */
117#ifndef HPET_BASE_ADDRESS
118 #define HPET_BASE_ADDRESS 0xFED00000 // HPET Base address
119#endif
120
121/**
122 * ALT_ADDR_400 - For some BIOS codebases which use 0x400 as ACPI base address
123 *
124 */
125#ifdef ALT_ADDR_400
126 #define ACPI_BLK_BASE 0x400
127#else
128 #define ACPI_BLK_BASE 0x800
129#endif
130
131#define PM1_STATUS_OFFSET 0x00
132#define PM1_ENABLE_OFFSET 0x02
133#define PM1_CONTROL_OFFSET 0x04
134#define PM_TIMER_OFFSET 0x08
135#define CPU_CONTROL_OFFSET 0x10
136#define EVENT_STATUS_OFFSET 0x20
137#define EVENT_ENABLE_OFFSET 0x24
138
139/**
140 * PM1_EVT_BLK_ADDRESS - ACPI power management Event Block base address
141 *
142 */
143#define PM1_EVT_BLK_ADDRESS ACPI_BLK_BASE + PM1_STATUS_OFFSET // AcpiPm1EvtBlkAddr
144
145/**
146 * PM1_CNT_BLK_ADDRESS - ACPI power management Control block base address
147 *
148 */
149#define PM1_CNT_BLK_ADDRESS ACPI_BLK_BASE + PM1_CONTROL_OFFSET // AcpiPm1CntBlkAddr
150
151/**
152 * PM1_TMR_BLK_ADDRESS - ACPI power management Timer block base address
153 *
154 */
155#define PM1_TMR_BLK_ADDRESS ACPI_BLK_BASE + PM_TIMER_OFFSET // AcpiPmTmrBlkAddr
156
157/**
158 * CPU_CNT_BLK_ADDRESS - ACPI power management CPU Control block base address
159 *
160 */
161#define CPU_CNT_BLK_ADDRESS ACPI_BLK_BASE + CPU_CONTROL_OFFSET // CpuControlBlkAddr
162
163/**
164 * GPE0_BLK_ADDRESS - ACPI power management General Purpose Event block base address
165 *
166 */
167#define GPE0_BLK_ADDRESS ACPI_BLK_BASE + EVENT_STATUS_OFFSET // AcpiGpe0BlkAddr
168
169/**
170 * SMI_CMD_PORT - ACPI SMI Command block base address
171 *
172 */
173#define SMI_CMD_PORT 0xB0 // SmiCmdPortAddr
174
175/**
176 * ACPI_PMA_CNT_BLK_ADDRESS - ACPI power management additional control block base address
177 *
178 */
179#define ACPI_PMA_CNT_BLK_ADDRESS 0xFE00 // AcpiPmaCntBlkAddr
180
181/**
182 * SATA_IDE_MODE_SSID - Sata controller IDE mode SSID.
183 * Define value for SSID while SATA controller set to IDE mode.
184 */
185#ifndef SATA_IDE_MODE_SSID
186 #define SATA_IDE_MODE_SSID 0x43901002
187#endif
188
189/**
190 * SATA_RAID_MODE_SSID - Sata controller RAID mode SSID.
191 * Define value for SSID while SATA controller set to RAID mode.
192 */
193#ifndef SATA_RAID_MODE_SSID
194 #define SATA_RAID_MODE_SSID 0x43921002
195#endif
196
197/**
198 * SATA_RAID5_MODE_SSID - Sata controller RAID5 mode SSID.
199 * Define value for SSID while SATA controller set to RAID5 mode.
200 */
201#ifndef SATA_RAID5_MODE_SSID
202 #define SATA_RAID5_MODE_SSID 0x43931002
203#endif
204
205/**
206 * SATA_AHCI_MODE_SSID - Sata controller AHCI mode SSID.
207 * Define value for SSID while SATA controller set to AHCI mode.
208 */
209#ifndef SATA_AHCI_SSID
210 #define SATA_AHCI_SSID 0x43911002
211#endif
212
213/**
214 * OHCI_SSID - All SB OHCI controllers SSID value.
215 *
216 */
217#ifndef OHCI_SSID
218 #define OHCI_SSID 0x43971002
219#endif
220
221/**
222 * EHCI_SSID - All SB EHCI controllers SSID value.
223 *
224 */
225#ifndef EHCI_SSID
226 #define EHCI_SSID 0x43961002
227#endif
228
229/**
230 * OHCI4_SSID - OHCI (USB 1.1 mode *HW force) controllers SSID value.
231 *
232 */
233#ifndef OHCI4_SSID
234 #define OHCI4_SSID 0x43991002
235#endif
236
237/**
238 * SMBUS_SSID - Smbus controller (South Bridge device 0x14 function 0) SSID value.
239 *
240 */
241#ifndef SMBUS_SSID
242 #define SMBUS_SSID 0x43851002
243#endif
244
245/**
246 * IDE_SSID - SATA IDE controller (South Bridge device 0x14 function 1) SSID value.
247 *
248 */
249#ifndef IDE_SSID
250 #define IDE_SSID 0x439C1002
251#endif
252
253/**
254 * AZALIA_SSID - AZALIA controller (South Bridge device 0x14 function 2) SSID value.
255 *
256 */
257#ifndef AZALIA_SSID
258 #define AZALIA_SSID 0x43831002
259#endif
260
261/**
262 * LPC_SSID - LPC controller (South Bridge device 0x14 function 3) SSID value.
263 *
264 */
265#ifndef LPC_SSID
266 #define LPC_SSID 0x439D1002
267#endif
268
269/**
270 * PCIB_SSID - PCIB controller (South Bridge device 0x14 function 4) SSID value.
271 *
272 */
273#ifndef PCIB_SSID
274 #define PCIB_SSID 0x43841002
275#endif
276
277/**
278 * USB_PLL_Voltage - CG2 Clock voltage setting.
279 *
280 */
281#ifndef USB_PLL_Voltage
282 #define USB_PLL_Voltage 0x10
283#endif
284
285/**
286 * Spread_Spectrum_Type
287 *
288 * - 0 : Normal platform
289 * - 1 : Ontario platform
290 */
291#ifndef Spread_Spectrum_Type
292 #define Spread_Spectrum_Type 0x00
293#endif