blob: c184c657cae0ec8efe5d6bf0d4c8ff0a0098354d [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.
Edward O'Callaghanb9a67002014-07-06 19:29:03 +10006 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +00007 * 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.
Edward O'Callaghanb9a67002014-07-06 19:29:03 +100014 * * Neither the name of Advanced Micro Devices, Inc. nor the names of
15 * its contributors may be used to endorse or promote products derived
Frank Vibrans2b4c8312011-02-14 18:30:54 +000016 * from this software without specific prior written permission.
Edward O'Callaghanb9a67002014-07-06 19:29:03 +100017 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000018 * 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.
Edward O'Callaghanb9a67002014-07-06 19:29:03 +100028 *
Frank Vibrans2b4c8312011-02-14 18:30:54 +000029 * ***************************************************************************
30 *
31 */
32
Kerry Shefeed3292011-08-18 18:03:44 +080033#ifndef BIOS_SIZE
34 #define BIOS_SIZE 0x04 //04 - 1MB
35#endif
Martin Rotha4953352012-05-07 16:45:29 -060036#ifndef LEGACY_FREE
37 #define LEGACY_FREE 0x00
38#endif
Scott Duplichan2b9143a2011-05-15 21:19:54 +000039//#define ACPI_SLEEP_TRAP 0x01
Frank Vibrans2b4c8312011-02-14 18:30:54 +000040//#define SPREAD_SPECTRUM_EPROM_LOAD 0x01
41
42/**
43 * Module Specific Defines for platform BIOS
44 *
45 */
46
47/**
48 * PCIEX_BASE_ADDRESS - Define PCIE base address
49 *
50 * @param[Option] MOVE_PCIEBAR_TO_F0000000 Set PCIe base address to 0xF7000000
51 */
52#ifdef MOVE_PCIEBAR_TO_F0000000
53 #define PCIEX_BASE_ADDRESS 0xF7000000
54#else
Shelley Chen4e9bb332021-10-20 15:43:45 -070055 #define PCIEX_BASE_ADDRESS CONFIG_ECAM_MMCONF_BASE_ADDRESS
Frank Vibrans2b4c8312011-02-14 18:30:54 +000056#endif
57
58/**
59 * SMBUS0_BASE_ADDRESS - Smbus base address
60 *
61 */
62#ifndef SMBUS0_BASE_ADDRESS
63 #define SMBUS0_BASE_ADDRESS 0xB00
64#endif
65
66/**
67 * SMBUS1_BASE_ADDRESS - Smbus1 (ASF) base address
68 *
69 */
70#ifndef SMBUS1_BASE_ADDRESS
71 #define SMBUS1_BASE_ADDRESS 0xB20
72#endif
73
74/**
75 * GEC_BASE_ADDRESS - Gec Shadow ROM base address
76 *
77 */
78#ifndef GEC_BASE_ADDRESS
79 #define GEC_BASE_ADDRESS 0xFED61000
80#endif
81
82
83/**
84 * SIO_PME_BASE_ADDRESS - Super IO PME base address
85 *
86 */
87#ifndef SIO_PME_BASE_ADDRESS
88 #define SIO_PME_BASE_ADDRESS 0xE00
89#endif
90
91/**
Kerry She6209c822011-08-18 18:44:00 +080092 * SIO_HWM_BASE_ADDRESS - Super IO HWM base address
93 *
94 */
95#ifndef SIO_HWM_BASE_ADDRESS
96 #define SIO_HWM_BASE_ADDRESS 0x290
97#endif
98
99/**
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000100 * SPI_BASE_ADDRESS - SPI controller (ROM) base address
101 *
102 */
103#ifndef SPI_BASE_ADDRESS
104 #define SPI_BASE_ADDRESS 0xFEC10000
105#endif
106
107/**
108 * WATCHDOG_TIMER_BASE_ADDRESS - WATCHDOG timer base address
109 *
110 */
111#ifndef WATCHDOG_TIMER_BASE_ADDRESS
112 #define WATCHDOG_TIMER_BASE_ADDRESS 0xFEC000F0 // Watchdog Timer Base Address
113#endif
114
115/**
116 * HPET_BASE_ADDRESS - HPET base address
117 *
118 */
119#ifndef HPET_BASE_ADDRESS
120 #define HPET_BASE_ADDRESS 0xFED00000 // HPET Base address
121#endif
122
123/**
124 * ALT_ADDR_400 - For some BIOS codebases which use 0x400 as ACPI base address
125 *
126 */
127#ifdef ALT_ADDR_400
128 #define ACPI_BLK_BASE 0x400
129#else
130 #define ACPI_BLK_BASE 0x800
131#endif
132
133#define PM1_STATUS_OFFSET 0x00
134#define PM1_ENABLE_OFFSET 0x02
135#define PM1_CONTROL_OFFSET 0x04
136#define PM_TIMER_OFFSET 0x08
137#define CPU_CONTROL_OFFSET 0x10
138#define EVENT_STATUS_OFFSET 0x20
139#define EVENT_ENABLE_OFFSET 0x24
140
141/**
142 * PM1_EVT_BLK_ADDRESS - ACPI power management Event Block base address
143 *
144 */
145#define PM1_EVT_BLK_ADDRESS ACPI_BLK_BASE + PM1_STATUS_OFFSET // AcpiPm1EvtBlkAddr
146
147/**
148 * PM1_CNT_BLK_ADDRESS - ACPI power management Control block base address
149 *
150 */
151#define PM1_CNT_BLK_ADDRESS ACPI_BLK_BASE + PM1_CONTROL_OFFSET // AcpiPm1CntBlkAddr
152
153/**
154 * PM1_TMR_BLK_ADDRESS - ACPI power management Timer block base address
155 *
156 */
157#define PM1_TMR_BLK_ADDRESS ACPI_BLK_BASE + PM_TIMER_OFFSET // AcpiPmTmrBlkAddr
158
159/**
160 * CPU_CNT_BLK_ADDRESS - ACPI power management CPU Control block base address
161 *
162 */
163#define CPU_CNT_BLK_ADDRESS ACPI_BLK_BASE + CPU_CONTROL_OFFSET // CpuControlBlkAddr
164
165/**
166 * GPE0_BLK_ADDRESS - ACPI power management General Purpose Event block base address
167 *
168 */
169#define GPE0_BLK_ADDRESS ACPI_BLK_BASE + EVENT_STATUS_OFFSET // AcpiGpe0BlkAddr
170
171/**
172 * SMI_CMD_PORT - ACPI SMI Command block base address
173 *
174 */
175#define SMI_CMD_PORT 0xB0 // SmiCmdPortAddr
176
177/**
178 * ACPI_PMA_CNT_BLK_ADDRESS - ACPI power management additional control block base address
179 *
180 */
181#define ACPI_PMA_CNT_BLK_ADDRESS 0xFE00 // AcpiPmaCntBlkAddr
182
183/**
184 * SATA_IDE_MODE_SSID - Sata controller IDE mode SSID.
185 * Define value for SSID while SATA controller set to IDE mode.
186 */
187#ifndef SATA_IDE_MODE_SSID
188 #define SATA_IDE_MODE_SSID 0x43901002
189#endif
190
191/**
192 * SATA_RAID_MODE_SSID - Sata controller RAID mode SSID.
193 * Define value for SSID while SATA controller set to RAID mode.
194 */
195#ifndef SATA_RAID_MODE_SSID
196 #define SATA_RAID_MODE_SSID 0x43921002
197#endif
198
199/**
200 * SATA_RAID5_MODE_SSID - Sata controller RAID5 mode SSID.
201 * Define value for SSID while SATA controller set to RAID5 mode.
202 */
203#ifndef SATA_RAID5_MODE_SSID
204 #define SATA_RAID5_MODE_SSID 0x43931002
205#endif
206
207/**
208 * SATA_AHCI_MODE_SSID - Sata controller AHCI mode SSID.
209 * Define value for SSID while SATA controller set to AHCI mode.
210 */
211#ifndef SATA_AHCI_SSID
212 #define SATA_AHCI_SSID 0x43911002
213#endif
214
215/**
216 * OHCI_SSID - All SB OHCI controllers SSID value.
217 *
218 */
219#ifndef OHCI_SSID
220 #define OHCI_SSID 0x43971002
221#endif
222
223/**
224 * EHCI_SSID - All SB EHCI controllers SSID value.
225 *
226 */
227#ifndef EHCI_SSID
228 #define EHCI_SSID 0x43961002
229#endif
230
231/**
232 * OHCI4_SSID - OHCI (USB 1.1 mode *HW force) controllers SSID value.
233 *
234 */
235#ifndef OHCI4_SSID
236 #define OHCI4_SSID 0x43991002
237#endif
238
239/**
240 * SMBUS_SSID - Smbus controller (South Bridge device 0x14 function 0) SSID value.
241 *
242 */
243#ifndef SMBUS_SSID
244 #define SMBUS_SSID 0x43851002
245#endif
246
247/**
248 * IDE_SSID - SATA IDE controller (South Bridge device 0x14 function 1) SSID value.
249 *
250 */
251#ifndef IDE_SSID
252 #define IDE_SSID 0x439C1002
253#endif
254
255/**
256 * AZALIA_SSID - AZALIA controller (South Bridge device 0x14 function 2) SSID value.
257 *
258 */
259#ifndef AZALIA_SSID
260 #define AZALIA_SSID 0x43831002
261#endif
262
263/**
264 * LPC_SSID - LPC controller (South Bridge device 0x14 function 3) SSID value.
265 *
266 */
267#ifndef LPC_SSID
268 #define LPC_SSID 0x439D1002
269#endif
270
271/**
272 * PCIB_SSID - PCIB controller (South Bridge device 0x14 function 4) SSID value.
273 *
274 */
275#ifndef PCIB_SSID
276 #define PCIB_SSID 0x43841002
277#endif
278
279/**
280 * USB_PLL_Voltage - CG2 Clock voltage setting.
281 *
282 */
283#ifndef USB_PLL_Voltage
284 #define USB_PLL_Voltage 0x10
285#endif
286
287/**
Tobias Diedrich0dab6d12015-06-15 01:59:03 +0200288 * USB_RX_MODE - Enable CG2 clock voltage setting.
289 *
290 */
291#ifndef USB_RX_MODE
292 #define USB_RX_MODE 0x01
293#endif
294
295/**
Frank Vibrans2b4c8312011-02-14 18:30:54 +0000296 * Spread_Spectrum_Type
297 *
298 * - 0 : Normal platform
299 * - 1 : Ontario platform
300 */
301#ifndef Spread_Spectrum_Type
302 #define Spread_Spectrum_Type 0x00
303#endif
Martin Rothe899e512012-12-05 16:07:11 -0700304
305/**
306 * Imc Enable OverWrite
307 * 2 - by default strapping
308 * 1 - On
309 * 0 - Off
310 */
311#ifndef IMC_ENABLE_OVER_WRITE
312 #define IMC_ENABLE_OVER_WRITE 0x02
313#endif