blob: 2df0b6a120201a7596698a39df487c6468e4cb18 [file] [log] [blame]
Felix Held4a8cd722020-04-18 22:26:39 +02001# SPDX-License-Identifier: GPL-2.0-only
Martin Roth5c354b92019-04-22 14:55:16 -06002
Martin Roth1f337622019-04-22 16:08:31 -06003config SOC_AMD_PICASSO
Martin Roth5c354b92019-04-22 14:55:16 -06004 bool
5 help
Martin Roth1f337622019-04-22 16:08:31 -06006 AMD Picasso support
Martin Roth5c354b92019-04-22 14:55:16 -06007
Martin Roth1f337622019-04-22 16:08:31 -06008if SOC_AMD_PICASSO
Martin Roth5c354b92019-04-22 14:55:16 -06009
10config CPU_SPECIFIC_OPTIONS
11 def_bool y
12 select ARCH_BOOTBLOCK_X86_32
13 select ARCH_VERSTAGE_X86_32
14 select ARCH_ROMSTAGE_X86_32
15 select ARCH_RAMSTAGE_X86_32
Felix Held46673222020-04-04 02:37:04 +020016 select RESET_VECTOR_IN_RAM
Martin Roth5c354b92019-04-22 14:55:16 -060017 select X86_AMD_FIXED_MTRRS
Marshall Dawson34c30562019-07-16 15:18:00 -060018 select X86_AMD_INIT_SIPI
Martin Roth5c354b92019-04-22 14:55:16 -060019 select ACPI_AMD_HARDWARE_SLEEP_VALUES
Martin Roth5c354b92019-04-22 14:55:16 -060020 select DRIVERS_I2C_DESIGNWARE
21 select GENERIC_GPIO_LIB
Furquan Shaikh8e915092020-06-17 23:15:35 -070022 select IDT_IN_EVERY_STAGE
Martin Roth5c354b92019-04-22 14:55:16 -060023 select IOAPIC
Furquan Shaikh0eabe132020-04-28 21:57:07 -070024 select HAVE_EM100_SUPPORT
Martin Roth5c354b92019-04-22 14:55:16 -060025 select HAVE_USBDEBUG_OPTIONS
Marshall Dawson80d0b012019-06-19 12:29:23 -060026 select TSC_MONOTONIC_TIMER
Richard Spiegel65562cd652019-08-21 10:27:05 -070027 select SOC_AMD_COMMON_BLOCK_SPI
Martin Roth5c354b92019-04-22 14:55:16 -060028 select TSC_SYNC_LFENCE
Marshall Dawson80d0b012019-06-19 12:29:23 -060029 select UDELAY_TSC
Martin Roth5c354b92019-04-22 14:55:16 -060030 select SOC_AMD_COMMON
31 select SOC_AMD_COMMON_BLOCK
Furquan Shaikh702cf302020-05-09 18:30:51 -070032 select SOC_AMD_COMMON_BLOCK_HAS_ESPI
Martin Roth5c354b92019-04-22 14:55:16 -060033 select SOC_AMD_COMMON_BLOCK_IOMMU
34 select SOC_AMD_COMMON_BLOCK_ACPIMMIO
35 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
36 select SOC_AMD_COMMON_BLOCK_ACPI
Furquan Shaikh9e1a49c2020-04-23 14:01:12 -070037 select SOC_AMD_COMMON_BLOCK_GRAPHICS
Martin Roth5c354b92019-04-22 14:55:16 -060038 select SOC_AMD_COMMON_BLOCK_LPC
39 select SOC_AMD_COMMON_BLOCK_PCI
40 select SOC_AMD_COMMON_BLOCK_HDA
41 select SOC_AMD_COMMON_BLOCK_SATA
Aaron Durbin3d2e18a2020-01-28 11:20:05 -070042 select SOC_AMD_COMMON_BLOCK_SMBUS
Marshall Dawson5a73fc32020-01-24 09:42:57 -070043 select SOC_AMD_COMMON_BLOCK_PSP_GEN2
Aaron Durbin1d0b99b2020-04-11 11:58:57 -060044 select PROVIDES_ROM_SHARING
Martin Roth5c354b92019-04-22 14:55:16 -060045 select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
46 select BOOT_DEVICE_SPI_FLASH_RW_NOMMAP_EARLY if BOOT_DEVICE_SPI_FLASH
Martin Roth5c354b92019-04-22 14:55:16 -060047 select PARALLEL_MP
48 select PARALLEL_MP_AP_WORK
49 select HAVE_SMI_HANDLER
Martin Roth5c354b92019-04-22 14:55:16 -060050 select SSE2
51 select RTC
Marshall Dawson00a22082020-01-20 23:05:31 -070052 select PLATFORM_USES_FSP2_0
Furquan Shaikhc3063c52020-05-28 11:58:20 -070053 select FSP_COMPRESS_FSP_M_LZMA
54 select FSP_COMPRESS_FSP_S_LZMA
Marshall Dawson00a22082020-01-20 23:05:31 -070055 select FSP_USES_CB_STACK
56 select UDK_2017_BINDING
57 select HAVE_CF9_RESET
Zheng Bao6ba591b2020-06-09 09:47:06 +080058 select SUPPORT_CPU_UCODE_IN_CBFS
Martin Roth5c354b92019-04-22 14:55:16 -060059
Furquan Shaikh3b032062020-06-10 11:52:49 -070060config MEMLAYOUT_LD_FILE
61 string
62 default "src/soc/amd/picasso/memlayout.ld"
63
Furquan Shaikhbc456502020-06-10 16:37:23 -070064config EARLY_RESERVED_DRAM_BASE
65 hex
66 default 0x2000000
67 help
68 This variable defines the base address of the DRAM which is reserved
69 for usage by coreboot in early stages (i.e. before ramstage is up).
70 This memory gets reserved in BIOS tables to ensure that the OS does
71 not use it, thus preventing corruption of OS memory in case of S3
72 resume.
73
74config EARLYRAM_BSP_STACK_SIZE
75 hex
76 default 0x1000
77
78config PSP_APOB_DRAM_ADDRESS
79 hex
80 default 0x2001000
81 help
82 Location in DRAM where the PSP will copy the AGESA PSP Output
83 Block.
84
85config PSP_SHAREDMEM_BASE
86 hex
87 default 0x2011000 if VBOOT
88 default 0x0
89 help
90 This variable defines the base address in DRAM memory where PSP copies
91 vboot workbuf to. This is used in linker script to have a static
92 allocation for the buffer as well as for adding relevant entries in
93 BIOS directory table for the PSP.
94
95config PSP_SHAREDMEM_SIZE
96 hex
97 default 0x8000 if VBOOT
98 default 0x0
99 help
100 Sets the maximum size for the PSP to pass the vboot workbuf and
101 any logs or timestamps back to coreboot. This will be copied
102 into main memory by the PSP and will be available when the x86 is
103 started. The workbuf's base depends on the address of the reset
104 vector.
105
Martin Roth5c354b92019-04-22 14:55:16 -0600106config PRERAM_CBMEM_CONSOLE_SIZE
107 hex
108 default 0x1600
109 help
110 Increase this value if preram cbmem console is getting truncated
111
Furquan Shaikhbc456502020-06-10 16:37:23 -0700112config BOOTBLOCK_ADDR
113 hex
114 default 0x2030000
115 help
116 Sets the address in DRAM where bootblock should be loaded.
117
118config C_ENV_BOOTBLOCK_SIZE
119 hex
120 default 0x10000
121 help
122 Sets the size of the bootblock stage that should be loaded in DRAM.
123 This variable controls the DRAM allocation size in linker script
124 for bootblock stage.
125
126config X86_RESET_VECTOR
127 hex
128 depends on ARCH_X86
129 default 0x203fff0
130 help
131 Sets the reset vector within bootblock where x86 starts execution.
132 Reset vector is supposed to live at offset -0x10 from end of
133 bootblock i.e. BOOTBLOCK_ADDR + C_ENV_BOOTBLOCK_SIZE - 0x10.
134
135config ROMSTAGE_ADDR
136 hex
137 default 0x2040000
138 help
139 Sets the address in DRAM where romstage should be loaded.
140
141config ROMSTAGE_SIZE
142 hex
143 default 0x80000
144 help
145 Sets the size of DRAM allocation for romstage in linker script.
146
147config FSP_M_ADDR
148 hex
149 default 0x20C0000
150 help
151 Sets the address in DRAM where FSP-M should be loaded. cbfstool
152 performs relocation of FSP-M to this address.
153
154config FSP_M_SIZE
155 hex
156 default 0x80000
157 help
158 Sets the size of DRAM allocation for FSP-M in linker script.
159
160config VERSTAGE_ADDR
161 hex
162 depends on VBOOT_SEPARATE_VERSTAGE
163 default 0x2140000
164 help
165 Sets the address in DRAM where verstage should be loaded if running
166 as a separate stage on x86.
167
168config VERSTAGE_SIZE
169 hex
170 depends on VBOOT_SEPARATE_VERSTAGE
171 default 0x80000
172 help
173 Sets the size of DRAM allocation for verstage in linker script if
174 running as a separate stage on x86.
175
176config RAMBASE
177 hex
178 default 0x10000000
179
Martin Roth5c354b92019-04-22 14:55:16 -0600180config CPU_ADDR_BITS
181 int
182 default 48
183
Martin Roth5c354b92019-04-22 14:55:16 -0600184config MMCONF_BASE_ADDRESS
185 hex
186 default 0xF8000000
187
188config MMCONF_BUS_NUMBER
189 int
190 default 64
191
Raul E Rangel5f52c0e2020-05-13 13:22:48 -0600192config VERSTAGE_ADDR
193 hex
194 default 0x4000000
195
Martin Roth5c354b92019-04-22 14:55:16 -0600196config VGA_BIOS_ID
197 string
Martin Roth86ba0d72020-02-05 16:46:30 -0700198 default "1002,15d8,c1"
Martin Roth5c354b92019-04-22 14:55:16 -0600199 help
200 The default VGA BIOS PCI vendor/device ID should be set to the
Martin Roth86ba0d72020-02-05 16:46:30 -0700201 result of the map_oprom_vendev_rev() function in northbridge.c.
Martin Roth5c354b92019-04-22 14:55:16 -0600202
203config VGA_BIOS_FILE
204 string
Raul E Rangelf39dab12020-05-13 16:46:57 -0600205 default "3rdparty/amd_blobs/picasso/PicassoGenericVbios.bin"
Martin Roth5c354b92019-04-22 14:55:16 -0600206
Martin Roth86ba0d72020-02-05 16:46:30 -0700207config VGA_BIOS_SECOND
208 def_bool y
209
210config VGA_BIOS_SECOND_ID
211 string
212 default "1002,15dd,c4"
213 help
214 Because Dali and Picasso need different video BIOSes, but have the
215 same vendor/device IDs, we need an alternate method to determine the
216 correct video BIOS. In map_oprom_vendev_rev(), we look at the cpuid
217 and decide which rom to load.
218
219 Even though the hardware has the same vendor/device IDs, the vBIOS
220 contains a *different* device ID, confusing the situation even more.
221
222config VGA_BIOS_SECOND_FILE
223 string
224 default "3rdparty/amd_blobs/picasso/Raven2GenericVbios.bin"
225
226config CHECK_REV_IN_OPROM_NAME
227 bool
228 default y
229 help
230 Select this in the platform BIOS or chipset if the option rom has a
231 revision that needs to be checked when searching CBFS.
232
Martin Roth5c354b92019-04-22 14:55:16 -0600233config S3_VGA_ROM_RUN
234 bool
235 default n
236
237config HEAP_SIZE
238 hex
239 default 0xc0000
240
241config EHCI_BAR
242 hex
243 default 0xfef00000
244
Martin Roth5c354b92019-04-22 14:55:16 -0600245config SERIRQ_CONTINUOUS_MODE
246 bool
247 default n
248 help
249 Set this option to y for serial IRQ in continuous mode.
250 Otherwise it is in quiet mode.
251
Marshall Dawsonbc4c9032019-06-11 12:18:20 -0600252config PICASSO_ACPI_IO_BASE
Martin Roth5c354b92019-04-22 14:55:16 -0600253 hex
254 default 0x400
255 help
256 Base address for the ACPI registers.
Martin Roth5c354b92019-04-22 14:55:16 -0600257
Felix Held097e4492020-06-16 15:35:20 +0200258config PICASSO_CONSOLE_UART
259 bool "Use Picasso UART controller for console"
Martin Roth5c354b92019-04-22 14:55:16 -0600260 default n
261 select DRIVERS_UART_8250MEM
262 select DRIVERS_UART_8250MEM_32
263 select NO_UART_ON_SUPERIO
264 select UART_OVERRIDE_REFCLK
265 help
Marshall Dawsonc0b8d0d2019-06-20 10:29:29 -0600266 There are four memory-mapped UARTs controllers in Picasso at:
267 0: 0xfedc9000
268 1: 0xfedca000
269 2: 0xfedc3000
270 3: 0xfedcf000
271
272choice PICASSO_UART_CLOCK_SOURCE
273 prompt "UART Frequency"
Felix Held097e4492020-06-16 15:35:20 +0200274 depends on PICASSO_CONSOLE_UART
Marshall Dawsonc0b8d0d2019-06-20 10:29:29 -0600275 default PICASSO_UART_48MZ
276
277config PICASSO_UART_48MZ
278 bool "48 MHz clock"
279 help
280 Select this option for the most compatibility.
281
282config PICASSO_UART_1_8MZ
283 bool "1.8432 MHz clock"
284 help
285 Select this option if an old payload or Linux ttyS0 arguments
286 require it.
287
288endchoice
289
290config PICASSO_UART_LEGACY
291 bool "Decode legacy I/O range"
Felix Held097e4492020-06-16 15:35:20 +0200292 depends on PICASSO_CONSOLE_UART # TODO: shouldn't depend on this
Marshall Dawsonc0b8d0d2019-06-20 10:29:29 -0600293 help
294 Assign I/O 3F8, 2F8, etc. to a Picasso UART. Only a single UART may
295 decode legacy addresses and this option enables the one used for the
296 console. A UART accessed with I/O does not allow all the features
297 of MMIO. The MMIO decode is still present when this option is used.
Martin Roth5c354b92019-04-22 14:55:16 -0600298
299config CONSOLE_UART_BASE_ADDRESS
Felix Held097e4492020-06-16 15:35:20 +0200300 depends on CONSOLE_SERIAL && PICASSO_CONSOLE_UART
Martin Roth5c354b92019-04-22 14:55:16 -0600301 hex
Marshall Dawsonc0b8d0d2019-06-20 10:29:29 -0600302 default 0xfedc9000 if UART_FOR_CONSOLE = 0
303 default 0xfedca000 if UART_FOR_CONSOLE = 1
304 default 0xfedc3000 if UART_FOR_CONSOLE = 2
305 default 0xfedcf000 if UART_FOR_CONSOLE = 3
Martin Roth5c354b92019-04-22 14:55:16 -0600306
307config SMM_TSEG_SIZE
308 hex
309 default 0x800000 if SMM_TSEG && HAVE_SMI_HANDLER
310 default 0x0
311
312config SMM_RESERVED_SIZE
313 hex
Marshall Dawson3e2fabf2020-06-12 10:28:04 -0600314 default 0x180000
Martin Roth5c354b92019-04-22 14:55:16 -0600315
316config SMM_MODULE_STACK_SIZE
317 hex
318 default 0x800
319
320config ACPI_CPU_STRING
321 string
Marshall Dawson879eba52019-11-22 17:52:39 -0700322 default "\\_PR.C%03d"
Martin Roth5c354b92019-04-22 14:55:16 -0600323
324config ACPI_BERT
325 bool "Build ACPI BERT Table"
326 default y
327 depends on HAVE_ACPI_TABLES
328 help
329 Report Machine Check errors identified in POST to the OS in an
Marshall Dawson03743b72020-06-18 10:23:48 -0600330 ACPI Boot Error Record Table.
Martin Roth5c354b92019-04-22 14:55:16 -0600331
Marshall Dawson901cb9c2020-01-21 14:53:45 -0700332config ACPI_BERT_SIZE
333 hex
Marshall Dawson03743b72020-06-18 10:23:48 -0600334 default 0x4000 if ACPI_BERT
335 default 0x0
Marshall Dawson901cb9c2020-01-21 14:53:45 -0700336 help
337 Specify the amount of DRAM reserved for gathering the data used to
338 generate the ACPI table.
339
Furquan Shaikh40a38882020-05-01 10:43:48 -0700340config CHROMEOS
341 select CHROMEOS_RAMOOPS_DYNAMIC
342
Marshall Dawson62611412019-06-19 11:46:06 -0600343config RO_REGION_ONLY
344 string
345 depends on CHROMEOS
346 default "apu/amdfw"
Martin Roth5c354b92019-04-22 14:55:16 -0600347
Marshall Dawson62611412019-06-19 11:46:06 -0600348config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
349 int
Martin Roth4017de02019-12-16 23:21:05 -0700350 default 150
Marshall Dawson62611412019-06-19 11:46:06 -0600351
Marshall Dawson39a4ac12019-06-20 16:28:33 -0600352config PICASSO_LPC_IOMUX
353 bool
354 help
355 Picasso's LPC bus signals are MUXed with some of the EMMC signals.
356 Select this option if LPC signals are required.
357
Aaron Durbin1d0b99b2020-04-11 11:58:57 -0600358config DISABLE_SPI_FLASH_ROM_SHARING
359 def_bool n
360 help
361 Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
362 which indicates a board level ROM transaction request. This
363 removes arbitration with board and assumes the chipset controls
364 the SPI flash bus entirely.
365
Marshall Dawson62611412019-06-19 11:46:06 -0600366config MAINBOARD_POWER_RESTORE
367 def_bool n
368 help
369 This option determines what state to go to once power is restored
370 after having been lost in S0. Select this option to automatically
371 return to S0. Otherwise the system will remain in S5 once power
372 is restored.
373
Marshall Dawson00a22082020-01-20 23:05:31 -0700374config FSP_TEMP_RAM_SIZE
375 hex
376 depends on FSP_USES_CB_STACK
377 default 0x40000
378 help
379 The amount of coreboot-allocated heap and stack usage by the FSP.
380
Marshall Dawson62611412019-06-19 11:46:06 -0600381menu "PSP Configuration Options"
Martin Roth5c354b92019-04-22 14:55:16 -0600382
Martin Roth5c354b92019-04-22 14:55:16 -0600383config AMDFW_OUTSIDE_CBFS
Furquan Shaikhd4ef9a42020-04-24 11:49:32 -0700384 bool
Martin Roth5c354b92019-04-22 14:55:16 -0600385 default n
386 help
387 The AMDFW (PSP) is typically locatable in cbfs. Select this
388 option to manually attach the generated amdfw.rom outside of
389 cbfs. The location is selected by the FWM position.
390
391config AMD_FWM_POSITION_INDEX
392 int "Firmware Directory Table location (0 to 5)"
393 range 0 5
394 default 0 if BOARD_ROMSIZE_KB_512
395 default 1 if BOARD_ROMSIZE_KB_1024
396 default 2 if BOARD_ROMSIZE_KB_2048
397 default 3 if BOARD_ROMSIZE_KB_4096
398 default 4 if BOARD_ROMSIZE_KB_8192
399 default 5 if BOARD_ROMSIZE_KB_16384
400 help
401 Typically this is calculated by the ROM size, but there may
402 be situations where you want to put the firmware directory
403 table in a different location.
404 0: 512 KB - 0xFFFA0000
405 1: 1 MB - 0xFFF20000
406 2: 2 MB - 0xFFE20000
407 3: 4 MB - 0xFFC20000
408 4: 8 MB - 0xFF820000
409 5: 16 MB - 0xFF020000
410
411comment "AMD Firmware Directory Table set to location for 512KB ROM"
412 depends on AMD_FWM_POSITION_INDEX = 0
413comment "AMD Firmware Directory Table set to location for 1MB ROM"
414 depends on AMD_FWM_POSITION_INDEX = 1
415comment "AMD Firmware Directory Table set to location for 2MB ROM"
416 depends on AMD_FWM_POSITION_INDEX = 2
417comment "AMD Firmware Directory Table set to location for 4MB ROM"
418 depends on AMD_FWM_POSITION_INDEX = 3
419comment "AMD Firmware Directory Table set to location for 8MB ROM"
420 depends on AMD_FWM_POSITION_INDEX = 4
421comment "AMD Firmware Directory Table set to location for 16MB ROM"
422 depends on AMD_FWM_POSITION_INDEX = 5
423
Marshall Dawson62611412019-06-19 11:46:06 -0600424config AMD_PUBKEY_FILE
Furquan Shaikhd4ef9a42020-04-24 11:49:32 -0700425 string
Raul E Rangelf39dab12020-05-13 16:46:57 -0600426 default "3rdparty/amd_blobs/picasso/PSP/AmdPubKeyRV.bin"
Martin Roth5c354b92019-04-22 14:55:16 -0600427
Marshall Dawson62611412019-06-19 11:46:06 -0600428config USE_PSPSCUREOS
Furquan Shaikhd4ef9a42020-04-24 11:49:32 -0700429 bool
Marshall Dawson62611412019-06-19 11:46:06 -0600430 default y
431 help
432 Include the PspSecureOs and PspTrustlet binaries in the PSP build.
433
434 If unsure, answer 'y'
435
436config PSP_LOAD_MP2_FW
Furquan Shaikhd4ef9a42020-04-24 11:49:32 -0700437 bool
Furquan Shaikh47cdf432020-04-23 18:01:34 -0700438 default n
Marshall Dawson62611412019-06-19 11:46:06 -0600439 help
440 Include the MP2 firmwares and configuration into the PSP build.
441
Furquan Shaikh47cdf432020-04-23 18:01:34 -0700442 If unsure, answer 'n'
Marshall Dawson62611412019-06-19 11:46:06 -0600443
444config PSP_LOAD_S0I3_FW
Furquan Shaikhd4ef9a42020-04-24 11:49:32 -0700445 bool
Furquan Shaikh30bc5b32020-04-23 18:02:53 -0700446 default n
Marshall Dawson62611412019-06-19 11:46:06 -0600447 help
448 Select this item to include the S0i3 file into the PSP build.
449
450config HAVE_PSP_WHITELIST_FILE
451 bool "Include a debug whitelist file in PSP build"
452 default n
453 help
454 Support secured unlock prior to reset using a whitelisted
455 number? This feature requires a signed whitelist image and
456 bootloader from AMD.
457
458 If unsure, answer 'n'
459
460config PSP_WHITELIST_FILE
Martin Roth49b09a02020-02-20 13:54:06 -0700461 string "Debug whitelist file path"
Marshall Dawson62611412019-06-19 11:46:06 -0600462 depends on HAVE_PSP_WHITELIST_FILE
Raul E Rangelf39dab12020-05-13 16:46:57 -0600463 default "3rdparty/amd_blobs/picasso/PSP/wtl-rvn.sbin"
Marshall Dawson62611412019-06-19 11:46:06 -0600464
Martin Roth49b09a02020-02-20 13:54:06 -0700465config PSP_BOOTLOADER_FILE
466 string "Specify the PSP Bootloader file path"
467 default "3rdparty/amd_blobs/picasso/PSP/PspBootLoader_WL_RV.sbin" if HAVE_PSP_WHITELIST_FILE
468 default "3rdparty/amd_blobs/picasso/PSP/PspBootLoader_prod_RV.sbin"
469 help
470 Supply the name of the PSP bootloader file.
471
472 Note that this option may conflict with the whitelist file if a
473 different PSP bootloader binary is specified.
474
Furquan Shaikh577db022020-04-24 15:52:04 -0700475config PSP_UNLOCK_SECURE_DEBUG
476 bool "Unlock secure debug"
477 default n
478 help
479 Select this item to enable secure debug options in PSP.
480
Marshall Dawson62611412019-06-19 11:46:06 -0600481endmenu
Martin Roth5c354b92019-04-22 14:55:16 -0600482
Martin Roth1f337622019-04-22 16:08:31 -0600483endif # SOC_AMD_PICASSO