blob: bb297a935695745ad0566abd11bd462b7db92d2e [file] [log] [blame]
Marc Jones24484842017-05-04 21:17:45 -06001##
2## This file is part of the coreboot project.
3##
4## Copyright (C) 2017 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
Marc Jones21cde8b2017-05-07 16:47:36 -060016config SOC_AMD_STONEYRIDGE_FP4
Marc Jones24484842017-05-04 21:17:45 -060017 bool
Marshall Dawson12294d02019-11-25 07:21:18 -070018 select AMD_APU_STONEYRIDGE
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070019 select AMD_APU_PKG_FP4
Marc Jones21cde8b2017-05-07 16:47:36 -060020 help
21 AMD Stoney Ridge FP4 support
22
23config SOC_AMD_STONEYRIDGE_FT4
24 bool
Marshall Dawson12294d02019-11-25 07:21:18 -070025 select AMD_APU_STONEYRIDGE
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070026 select AMD_APU_PKG_FT4
Marc Jones21cde8b2017-05-07 16:47:36 -060027 help
28 AMD Stoney Ridge FT4 support
29
Richard Spiegel1bc578a2019-06-18 18:19:47 -070030config SOC_AMD_MERLINFALCON
31 bool
Marshall Dawson12294d02019-11-25 07:21:18 -070032 select AMD_APU_MERLINFALCON
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070033 select AMD_APU_PKG_FP4
Richard Spiegel1bc578a2019-06-18 18:19:47 -070034 help
35 AMD Merlin Falcon FP4 support
36
37config HAVE_MERLINFALCON_BINARIES
Marshall Dawson12294d02019-11-25 07:21:18 -070038 depends on AMD_APU_MERLINFALCON
Richard Spiegel1bc578a2019-06-18 18:19:47 -070039 bool "Merlinfalcon binaries are present"
40 default n
41 help
42 This config option will be removed once the binaries are merged
43 to the blobs repo. See 33615.
44
45if SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4 || SOC_AMD_MERLINFALCON
Marc Jones21cde8b2017-05-07 16:47:36 -060046
47config CPU_SPECIFIC_OPTIONS
48 def_bool y
49 select ARCH_BOOTBLOCK_X86_32
50 select ARCH_VERSTAGE_X86_32
51 select ARCH_ROMSTAGE_X86_32
52 select ARCH_RAMSTAGE_X86_32
Marshall Dawson82145a12017-10-20 12:36:35 -060053 select X86_AMD_FIXED_MTRRS
Marshall Dawson68592c32017-11-06 10:56:52 -070054 select ACPI_AMD_HARDWARE_SLEEP_VALUES
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070055 select COLLECT_TIMESTAMPS_NO_TSC
Chris Ching6fc39d42017-12-20 16:06:03 -070056 select DRIVERS_I2C_DESIGNWARE
Marc Jones9156cac2017-07-12 11:05:38 -060057 select GENERIC_GPIO_LIB
Aaron Durbin51e4c1a2018-01-24 17:42:51 -070058 select GENERIC_UDELAY
Marc Jones24484842017-05-04 21:17:45 -060059 select IOAPIC
60 select HAVE_USBDEBUG_OPTIONS
Richard Spiegelbf171242019-08-21 10:09:51 -070061 select SOC_AMD_COMMON_BLOCK_SPI
Marc Jones21cde8b2017-05-07 16:47:36 -060062 select TSC_SYNC_LFENCE
Marc Jones1587dc82017-05-15 18:55:11 -060063 select SOC_AMD_PI
Marshall Dawson68243a52017-06-15 16:59:20 -060064 select SOC_AMD_COMMON
65 select SOC_AMD_COMMON_BLOCK
Marshall Dawsonec63a712019-05-03 12:55:16 -060066 select SOC_AMD_COMMON_BLOCK_IOMMU
Marshall Dawson69486ca2019-05-02 12:03:45 -060067 select SOC_AMD_COMMON_BLOCK_ACPIMMIO
Marshall Dawson251d3052019-05-02 17:27:57 -060068 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
Marshall Dawson3ce03602019-05-03 10:20:44 -060069 select SOC_AMD_COMMON_BLOCK_ACPI
Marshall Dawson6ab5ed32019-05-29 09:24:18 -060070 select SOC_AMD_COMMON_BLOCK_LPC
Richard Spiegel2bbc3dc2017-12-06 16:14:58 -070071 select SOC_AMD_COMMON_BLOCK_PCI
Marshall Dawson43c26cb2019-05-03 12:42:29 -060072 select SOC_AMD_COMMON_BLOCK_HDA
Marshall Dawsonaa67def2019-05-03 16:10:34 -060073 select SOC_AMD_COMMON_BLOCK_SATA
Richard Spiegel19f67a32017-12-08 18:16:02 -070074 select SOC_AMD_COMMON_BLOCK_PI
Marshall Dawson68243a52017-06-15 16:59:20 -060075 select SOC_AMD_COMMON_BLOCK_PSP
Marshall Dawson9df969a2017-07-25 18:46:46 -060076 select SOC_AMD_COMMON_BLOCK_CAR
Kyösti Mälkkia8eb4772018-06-28 17:23:27 +030077 select SOC_AMD_COMMON_BLOCK_S3
John E. Kabat Jraf327702017-11-29 18:49:37 -070078 select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
Marc Jones4c887ea2018-04-25 16:43:18 -060079 select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if BOOT_DEVICE_SPI_FLASH
Marshall Dawsona7bfbbe2017-09-13 17:24:53 -060080 select PARALLEL_MP
Marc Jones33eef132017-10-26 16:50:42 -060081 select PARALLEL_MP_AP_WORK
Marshall Dawsonb6172112017-09-13 17:47:31 -060082 select HAVE_SMI_HANDLER
Martin Roth37b8bde2017-09-26 09:41:10 -060083 select SSE2
Marc Jones17e85ad2017-12-20 16:21:25 -070084 select RTC
Marc Jones24484842017-05-04 21:17:45 -060085
Marshall Dawson12294d02019-11-25 07:21:18 -070086config AMD_APU_STONEYRIDGE
87 bool
88 help
89 AMD Stoney Ridge APU
90
91config AMD_APU_MERLINFALCON
92 bool
93 help
94 AMD Merlin Falcon APU
95
Marshall Dawson3ac0ab52019-11-24 19:03:56 -070096config AMD_APU_PKG_FP4
97 bool
98 help
99 AMD FP4 package
100
101config AMD_APU_PKG_FT4
102 bool
103 help
104 AMD FT4 package
105
106config AMD_SOC_PACKAGE
107 string
108 default "FP4" if AMD_APU_PKG_FP4
109 default "FT4" if AMD_APU_PKG_FT4
110
Marshall Dawsone7557de2017-06-09 16:35:14 -0600111config VBOOT
Marshall Dawsone7557de2017-06-09 16:35:14 -0600112 select VBOOT_SEPARATE_VERSTAGE
113 select VBOOT_STARTS_IN_BOOTBLOCK
114 select VBOOT_SAVE_RECOVERY_REASON_ON_REBOOT
Marc Jones4c887ea2018-04-25 16:43:18 -0600115 select VBOOT_VBNV_CMOS
116 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
Marshall Dawsone7557de2017-06-09 16:35:14 -0600117
Marc Jones21cde8b2017-05-07 16:47:36 -0600118# TODO: Sync these with definitions in PI vendorcode.
119# DCACHE_RAM_BASE must equal BSP_STACK_BASE_ADDR.
120# DCACHE_RAM_SIZE must equal BSP_STACK_SIZE.
121
122config DCACHE_RAM_BASE
123 hex
124 default 0x30000
125
126config DCACHE_RAM_SIZE
127 hex
128 default 0x10000
129
Marshall Dawson9df969a2017-07-25 18:46:46 -0600130config DCACHE_BSP_STACK_SIZE
Marshall Dawson9df969a2017-07-25 18:46:46 -0600131 hex
132 default 0x4000
133 help
134 The amount of anticipated stack usage in CAR by bootblock and
135 other stages.
136
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600137config PRERAM_CBMEM_CONSOLE_SIZE
138 hex
Marshall Dawson1df6bc62017-12-19 20:41:29 -0700139 default 0x1600
Marshall Dawson7c3f1e72017-08-24 09:59:10 -0600140 help
141 Increase this value if preram cbmem console is getting truncated
142
Marc Jones21cde8b2017-05-07 16:47:36 -0600143config CPU_ADDR_BITS
144 int
145 default 48
146
Marc Jones1587dc82017-05-15 18:55:11 -0600147config BOTTOMIO_POSITION
148 hex "Bottom of 32-bit IO space"
149 default 0xD0000000
150 help
151 If PCI peripherals with big BARs are connected to the system
152 the bottom of the IO must be decreased to allocate such
153 devices.
154
155 Declare the beginning of the 128MB-aligned MMIO region. This
156 option is useful when PCI peripherals requesting large address
157 ranges are present.
158
Marc Jones1587dc82017-05-15 18:55:11 -0600159config MMCONF_BASE_ADDRESS
160 hex
161 default 0xF8000000
162
163config MMCONF_BUS_NUMBER
164 int
165 default 64
166
167config VGA_BIOS_ID
168 string
Marshall Dawson12294d02019-11-25 07:21:18 -0700169 default "1002,9874" if AMD_APU_MERLINFALCON
Marc Jones1587dc82017-05-15 18:55:11 -0600170 default "1002,98e4"
171 help
172 The default VGA BIOS PCI vendor/device ID should be set to the
173 result of the map_oprom_vendev() function in northbridge.c.
174
175config VGA_BIOS_FILE
176 string
Marshall Dawson12294d02019-11-25 07:21:18 -0700177 default "3rdparty/blobs/soc/amd/merlinfalcon/VBIOS.bin" if AMD_APU_MERLINFALCON && HAVE_MERLINFALCON_BINARIES
Richard Spiegel4eaf0fa2018-01-23 15:51:57 -0700178 default "3rdparty/blobs/soc/amd/stoneyridge/VBIOS.bin"
Marc Jones1587dc82017-05-15 18:55:11 -0600179
Marshall Dawson668dea02017-11-29 09:57:15 -0700180config S3_VGA_ROM_RUN
181 bool
182 default n
183
Marc Jones1587dc82017-05-15 18:55:11 -0600184config HEAP_SIZE
185 hex
186 default 0xc0000
187
Marc Jones24484842017-05-04 21:17:45 -0600188config EHCI_BAR
189 hex
190 default 0xfef00000
191
192config STONEYRIDGE_XHCI_ENABLE
193 bool "Enable Stoney Ridge XHCI Controller"
194 default y
195 help
196 The XHCI controller must be enabled and the XHCI firmware
197 must be added in order to have USB 3.0 support configured
198 by coreboot. The OS will be responsible for enabling the XHCI
Jonathan Neuschäfer45e6c822018-12-11 17:53:07 +0100199 controller if the XHCI firmware is available but the
Marc Jones24484842017-05-04 21:17:45 -0600200 XHCI controller is not enabled by coreboot.
201
202config STONEYRIDGE_XHCI_FWM
203 bool "Add xhci firmware"
204 default y
205 help
206 Add Stoney Ridge XHCI Firmware to support the onboard USB 3.0
207
Marc Jones24484842017-05-04 21:17:45 -0600208config STONEYRIDGE_GEC_FWM
209 bool
210 default n
211 help
212 Add Stoney Ridge GEC Firmware to support the onboard gigabit Ethernet MAC.
213 Must be connected to a Broadcom B50610 or B50610M PHY on the motherboard.
214
215config STONEYRIDGE_XHCI_FWM_FILE
216 string "XHCI firmware path and filename"
Richard Spiegela9872782018-01-04 17:26:54 -0700217 default "3rdparty/blobs/soc/amd/stoneyridge/xhci.bin"
Marc Jones24484842017-05-04 21:17:45 -0600218 depends on STONEYRIDGE_XHCI_FWM
219
Marc Jones24484842017-05-04 21:17:45 -0600220config STONEYRIDGE_GEC_FWM_FILE
221 string "GEC firmware path and filename"
222 depends on STONEYRIDGE_GEC_FWM
223
224config AMD_PUBKEY_FILE
225 string "AMD public Key"
Marshall Dawson12294d02019-11-25 07:21:18 -0700226 default "3rdparty/blobs/soc/amd/merlinfalcon/PSP/AmdPubKeyCZ.bin" if AMD_APU_MERLINFALCON && HAVE_MERLINFALCON_BINARIES
Richard Spiegela9872782018-01-04 17:26:54 -0700227 default "3rdparty/blobs/soc/amd/stoneyridge/PSP/AmdPubKeyST.bin"
Marc Jones24484842017-05-04 21:17:45 -0600228
229config STONEYRIDGE_SATA_MODE
230 int "SATA Mode"
231 default 0
232 range 0 6
233 help
234 Select the mode in which SATA should be driven.
235 The default is NATIVE.
236 0: NATIVE mode does not require a ROM.
237 2: AHCI may work with or without AHCI ROM. It depends on the payload support.
238 For example, seabios does not require the AHCI ROM.
239 3: LEGACY IDE
240 4: IDE to AHCI
241 5: AHCI7804: ROM Required, and AMD driver required in the OS.
242 6: IDE to AHCI7804: ROM Required, and AMD driver required in the OS.
243
244comment "NATIVE"
245 depends on STONEYRIDGE_SATA_MODE = 0
246
247comment "AHCI"
248 depends on STONEYRIDGE_SATA_MODE = 2
249
250comment "LEGACY IDE"
251 depends on STONEYRIDGE_SATA_MODE = 3
252
253comment "IDE to AHCI"
254 depends on STONEYRIDGE_SATA_MODE = 4
255
256comment "AHCI7804"
257 depends on STONEYRIDGE_SATA_MODE = 5
258
259comment "IDE to AHCI7804"
260 depends on STONEYRIDGE_SATA_MODE = 6
261
262if STONEYRIDGE_SATA_MODE = 2 || STONEYRIDGE_SATA_MODE = 5
263
264config AHCI_ROM_ID
265 string "AHCI device PCI IDs"
266 default "1022,7801" if STONEYRIDGE_SATA_MODE = 2
267 default "1022,7804" if STONEYRIDGE_SATA_MODE = 5
268
269endif # STONEYRIDGE_SATA_MODE = 2 || STONEYRIDGE_SATA_MODE = 5
270
271config STONEYRIDGE_LEGACY_FREE
272 bool "System is legacy free"
273 help
274 Select y if there is no keyboard controller in the system.
275 This sets variables in AGESA and ACPI.
276
Marc Jones24484842017-05-04 21:17:45 -0600277config SERIRQ_CONTINUOUS_MODE
278 bool
279 default n
280 help
281 Set this option to y for serial IRQ in continuous mode.
282 Otherwise it is in quiet mode.
283
284config STONEYRIDGE_ACPI_IO_BASE
285 hex
286 default 0x400
287 help
288 Base address for the ACPI registers.
289 This value must match the hardcoded value of AGESA.
290
291config STONEYRIDGE_UART
292 bool "UART controller on Stoney Ridge"
293 default n
294 select DRIVERS_UART_8250MEM
295 select DRIVERS_UART_8250MEM_32
296 select NO_UART_ON_SUPERIO
297 select UART_OVERRIDE_REFCLK
298 help
299 There are two UART controllers in Stoney Ridge.
300 The UART registers are memory-mapped. UART
301 controller 0 registers range from FEDC_6000h
302 to FEDC_6FFFh. UART controller 1 registers
303 range from FEDC_8000h to FEDC_8FFFh.
304
Arthur Heymansb5e72b62018-01-02 23:41:24 +0100305config CONSOLE_UART_BASE_ADDRESS
306 depends on CONSOLE_SERIAL
307 hex
308 default 0xfedc6000
309
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600310config SMM_TSEG_SIZE
311 hex
Marshall Dawson0801b332017-08-25 15:29:45 -0600312 default 0x800000 if SMM_TSEG && HAVE_SMI_HANDLER
Marshall Dawsonc6ef9db2017-05-14 14:16:56 -0600313 default 0x0
314
Marshall Dawsonb6172112017-09-13 17:47:31 -0600315config SMM_RESERVED_SIZE
316 hex
Marshall Dawsonfceac7e2018-05-18 14:40:53 -0600317 default 0x150000
Marshall Dawsonb6172112017-09-13 17:47:31 -0600318
Raul E Rangel846b4942018-06-12 10:43:09 -0600319config SMM_MODULE_STACK_SIZE
320 hex
321 default 0x800
322
Marc Jonese013df92017-08-23 16:28:02 -0600323config ACPI_CPU_STRING
324 string
325 default "\\_PR.P%03d"
326
Marshall Dawson9a32c412018-09-04 13:29:12 -0600327config ACPI_BERT
328 bool "Build ACPI BERT Table"
329 default y
330 depends on HAVE_ACPI_TABLES
331 help
332 Report Machine Check errors identified in POST to the OS in an
333 ACPI Boot Error Record Table. This option reserves an 8MB region
334 for building the error structures.
335
Marshall Dawson25eb2bc2019-03-14 12:42:46 -0600336config USE_PSPSECUREOS
Martin Rothb617e322017-09-07 13:23:55 -0600337 bool "Include PSP SecureOS blobs in AMD firmware"
338 default y
339 help
340 Include the PspSecureOs, PspTrustlet and TrustletKey binaries
341 in the amdfw section.
342
343 If unsure, answer 'y'
344
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700345config SOC_AMD_PSP_SELECTABLE_SMU_FW
346 bool
Marshall Dawson12294d02019-11-25 07:21:18 -0700347 default y if AMD_APU_STONEYRIDGE
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700348 help
349 Some ST implementations allow storing SMU firmware into cbfs and
350 calling the PSP to load the blobs at the proper time.
351
352 Merlin Falcon does not support it. If you are using 00670F00 SOC,
353 ask your AMD representative if it supports it or not.
354
Marshall Dawson5f0520a2017-10-30 16:11:45 -0600355config SOC_AMD_SMU_FANLESS
356 bool
357 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
358 default n if SOC_AMD_SMU_NOTFANLESS
359 default y
360
361config SOC_AMD_SMU_FANNED
362 bool
363 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
364 default n
365 select SOC_AMD_SMU_NOTFANLESS
366
367config SOC_AMD_SMU_NOTFANLESS # helper symbol - do not use
368 bool
369 depends on SOC_AMD_PSP_SELECTABLE_SMU_FW
370
Martin Roth30f9b952017-10-03 15:54:45 -0600371config AMDFW_OUTSIDE_CBFS
372 bool "The AMD firmware is outside CBFS"
373 default n
374 help
375 The AMDFW (PSP) is typically locatable in cbfs. Select this
376 option to manually attach the generated amdfw.rom outside of
377 cbfs. The location is selected by the FWM position.
378
Martin Roth6d8ef242017-09-08 14:39:35 -0600379config AMD_FWM_POSITION_INDEX
380 int "Firmware Directory Table location (0 to 5)"
381 range 0 5
382 default 0 if BOARD_ROMSIZE_KB_512
383 default 1 if BOARD_ROMSIZE_KB_1024
384 default 2 if BOARD_ROMSIZE_KB_2048
385 default 3 if BOARD_ROMSIZE_KB_4096
386 default 4 if BOARD_ROMSIZE_KB_8192
387 default 5 if BOARD_ROMSIZE_KB_16384
388 help
389 Typically this is calculated by the ROM size, but there may
390 be situations where you want to put the firmware directory
391 table in a different location.
392 0: 512 KB - 0xFFFA0000
393 1: 1 MB - 0xFFF20000
394 2: 2 MB - 0xFFE20000
395 3: 4 MB - 0xFFC20000
396 4: 8 MB - 0xFF820000
397 5: 16 MB - 0xFF020000
398
399comment "AMD Firmware Directory Table set to location for 512KB ROM"
400 depends on AMD_FWM_POSITION_INDEX = 0
401comment "AMD Firmware Directory Table set to location for 1MB ROM"
402 depends on AMD_FWM_POSITION_INDEX = 1
403comment "AMD Firmware Directory Table set to location for 2MB ROM"
404 depends on AMD_FWM_POSITION_INDEX = 2
405comment "AMD Firmware Directory Table set to location for 4MB ROM"
406 depends on AMD_FWM_POSITION_INDEX = 3
407comment "AMD Firmware Directory Table set to location for 8MB ROM"
408 depends on AMD_FWM_POSITION_INDEX = 4
409comment "AMD Firmware Directory Table set to location for 16MB ROM"
410 depends on AMD_FWM_POSITION_INDEX = 5
411
Marc Jones17431ab2017-11-16 15:26:00 -0700412config DIMM_SPD_SIZE
413 int
414 default 512 # DDR4
415
Marc Jones578a79d2017-12-06 16:27:04 -0700416config RO_REGION_ONLY
417 string
418 depends on CHROMEOS
419 default "apu/amdfw"
420
Chris Ching6fc39d42017-12-20 16:06:03 -0700421config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
422 int
423 default 133
424
Richard Spiegel6a389142018-03-05 14:28:10 -0700425config MAINBOARD_POWER_RESTORE
426 def_bool n
427 help
428 This option determines what state to go to once power is restored
429 after having been lost in S0. Select this option to automatically
430 return to S0. Otherwise the system will remain in S5 once power
431 is restored.
432
Richard Spiegel1bc578a2019-06-18 18:19:47 -0700433endif # SOC_AMD_STONEYRIDGE_FP4 || SOC_AMD_STONEYRIDGE_FT4 || SOC_AMD_MERLINFALCON