blob: fc79ad8470bcea2810165ba44b160f90b3bfd0d0 [file] [log] [blame]
Martin Roth1a3de8e2022-10-06 15:57:21 -06001# SPDX-License-Identifier: GPL-2.0-only
2
3# TODO: Evaluate what can be moved to a common directory
Martin Roth20646cd2023-01-04 21:27:06 -07004# TODO: Update for Phoenix
Martin Roth1a3de8e2022-10-06 15:57:21 -06005
Martin Roth20646cd2023-01-04 21:27:06 -07006config SOC_AMD_PHOENIX
Martin Roth1a3de8e2022-10-06 15:57:21 -06007 bool
Martin Roth1a3de8e2022-10-06 15:57:21 -06008 select ACPI_SOC_NVS
Martin Roth1a3de8e2022-10-06 15:57:21 -06009 select ARCH_X86
10 select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
11 select DRIVERS_USB_ACPI
12 select DRIVERS_USB_PCI_XHCI
13 select FSP_COMPRESS_FSP_M_LZMA if !ASYNC_FILE_LOADING
14 select FSP_COMPRESS_FSP_M_LZ4 if ASYNC_FILE_LOADING
15 select FSP_COMPRESS_FSP_S_LZ4
16 select GENERIC_GPIO_LIB
17 select HAVE_ACPI_TABLES
18 select HAVE_CF9_RESET
19 select HAVE_EM100_SUPPORT
20 select HAVE_FSP_GOP
21 select HAVE_SMI_HANDLER
22 select IDT_IN_EVERY_STAGE
Martin Rothbcb610a2022-10-29 13:31:54 -060023 select NO_DDR4
24 select NO_DDR3
25 select NO_DDR2
26 select NO_LPDDR4
Martin Roth1a3de8e2022-10-06 15:57:21 -060027 select PARALLEL_MP_AP_WORK
28 select PLATFORM_USES_FSP2_0
29 select PROVIDES_ROM_SHARING
30 select PSP_SUPPORTS_EFS2_RELATIVE_ADDR if VBOOT_STARTS_BEFORE_BOOTBLOCK
31 select PSP_VERSTAGE_CCP_DMA if VBOOT_STARTS_BEFORE_BOOTBLOCK
32 select RESET_VECTOR_IN_RAM
33 select RTC
34 select SOC_AMD_COMMON
Fred Reitberger2dceb122022-11-04 14:37:34 -040035 select SOC_AMD_COMMON_BLOCK_ACP_GEN2
Martin Roth9c64c082022-10-18 17:54:52 -060036 select SOC_AMD_COMMON_BLOCK_ACPI # TODO: Check if this is still correct
37 select SOC_AMD_COMMON_BLOCK_ACPIMMIO # TODO: Check if this is still correct
38 select SOC_AMD_COMMON_BLOCK_ACPI_ALIB # TODO: Check if this is still correct
39 select SOC_AMD_COMMON_BLOCK_ACPI_CPPC # TODO: Check if this is still correct
40 select SOC_AMD_COMMON_BLOCK_ACPI_GPIO # TODO: Check if this is still correct
41 select SOC_AMD_COMMON_BLOCK_ACPI_IVRS # TODO: Check if this is still correct
Fred Reitberger2dceb122022-11-04 14:37:34 -040042 select SOC_AMD_COMMON_BLOCK_AOAC
Martin Roth9c64c082022-10-18 17:54:52 -060043 select SOC_AMD_COMMON_BLOCK_APOB # TODO: Check if this is still correct
Fred Reitberger2dceb122022-11-04 14:37:34 -040044 select SOC_AMD_COMMON_BLOCK_APOB_HASH
45 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
Fred Reitberger28908412022-11-01 10:49:16 -040046 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC
Fred Reitberger267edec2022-12-13 12:56:09 -050047 select SOC_AMD_COMMON_BLOCK_ESPI_EXTENDED_DECODE_RANGES
Martin Roth9c64c082022-10-18 17:54:52 -060048 select SOC_AMD_COMMON_BLOCK_GRAPHICS # TODO: Check if this is still correct
Fred Reitberger267edec2022-12-13 12:56:09 -050049 select SOC_AMD_COMMON_BLOCK_HAS_ESPI
50 select SOC_AMD_COMMON_BLOCK_HAS_ESPI_ALERT_ENABLE
Fred Reitberger2dceb122022-11-04 14:37:34 -040051 select SOC_AMD_COMMON_BLOCK_I2C
52 select SOC_AMD_COMMON_BLOCK_I23C_PAD_CTRL
53 select SOC_AMD_COMMON_BLOCK_IOMMU
Fred Reitberger267edec2022-12-13 12:56:09 -050054 select SOC_AMD_COMMON_BLOCK_LPC
Fred Reitberger2dceb122022-11-04 14:37:34 -040055 select SOC_AMD_COMMON_BLOCK_MCAX
56 select SOC_AMD_COMMON_BLOCK_NONCAR
Fred Reitbergera6514e22022-12-07 08:39:55 -050057 select SOC_AMD_COMMON_BLOCK_PCI
58 select SOC_AMD_COMMON_BLOCK_PCI_MMCONF
59 select SOC_AMD_COMMON_BLOCK_PCIE_GPP_DRIVER
60 select SOC_AMD_COMMON_BLOCK_PCIE_CLK_REQ
Fred Reitberger2dceb122022-11-04 14:37:34 -040061 select SOC_AMD_COMMON_BLOCK_PM
62 select SOC_AMD_COMMON_BLOCK_PM_CHIPSET_STATE_SAVE
Martin Roth9c64c082022-10-18 17:54:52 -060063 select SOC_AMD_COMMON_BLOCK_PSP_GEN2 # TODO: Check if this is still correct
Fred Reitberger2dceb122022-11-04 14:37:34 -040064 select SOC_AMD_COMMON_BLOCK_SMBUS
65 select SOC_AMD_COMMON_BLOCK_SMI
Fred Reitberger267edec2022-12-13 12:56:09 -050066 select SOC_AMD_COMMON_BLOCK_SMM
67 select SOC_AMD_COMMON_BLOCK_SMU
Fred Reitberger2dceb122022-11-04 14:37:34 -040068 select SOC_AMD_COMMON_BLOCK_SPI
69 select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H
70 select SOC_AMD_COMMON_BLOCK_UART
71 select SOC_AMD_COMMON_BLOCK_UCODE
Martin Roth9c64c082022-10-18 17:54:52 -060072 select SOC_AMD_COMMON_FSP_CCX_CPPC_HOB # TODO: Check if this is still correct
73 select SOC_AMD_COMMON_FSP_DMI_TABLES # TODO: Check if this is still correct
74 select SOC_AMD_COMMON_FSP_PCI # TODO: Check if this is still correct
Fred Reitberger010c4082023-01-11 15:11:48 -050075 select SOC_AMD_COMMON_FSP_PRELOAD_FSPS
Martin Roth1a3de8e2022-10-06 15:57:21 -060076 select SSE2
77 select UDK_2017_BINDING
Martin Rothbcb610a2022-10-29 13:31:54 -060078 select USE_DDR5
Martin Roth1a3de8e2022-10-06 15:57:21 -060079 select USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
80 select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
81 select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
82 select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK
83 select X86_AMD_FIXED_MTRRS
84 select X86_INIT_NEED_1_SIPI
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010085 help
Martin Roth20646cd2023-01-04 21:27:06 -070086 AMD Phoenix support
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010087
Martin Roth20646cd2023-01-04 21:27:06 -070088if SOC_AMD_PHOENIX
Martin Roth1a3de8e2022-10-06 15:57:21 -060089
Martin Roth1a3de8e2022-10-06 15:57:21 -060090config CHIPSET_DEVICETREE
91 string
Martin Roth20646cd2023-01-04 21:27:06 -070092 default "soc/amd/phoenix/chipset.cb"
Martin Roth1a3de8e2022-10-06 15:57:21 -060093
94config EARLY_RESERVED_DRAM_BASE
95 hex
96 default 0x2000000
97 help
98 This variable defines the base address of the DRAM which is reserved
99 for usage by coreboot in early stages (i.e. before ramstage is up).
100 This memory gets reserved in BIOS tables to ensure that the OS does
101 not use it, thus preventing corruption of OS memory in case of S3
102 resume.
103
104config EARLYRAM_BSP_STACK_SIZE
105 hex
106 default 0x1000
107
108config PSP_APOB_DRAM_ADDRESS
109 hex
110 default 0x2001000
111 help
112 Location in DRAM where the PSP will copy the AGESA PSP Output
113 Block.
114
115config PSP_APOB_DRAM_SIZE
116 hex
117 default 0x1E000
118
119config PSP_SHAREDMEM_BASE
120 hex
121 default 0x201F000 if VBOOT
122 default 0x0
123 help
124 This variable defines the base address in DRAM memory where PSP copies
125 the vboot workbuf. This is used in the linker script to have a static
126 allocation for the buffer as well as for adding relevant entries in
127 the BIOS directory table for the PSP.
128
129config PSP_SHAREDMEM_SIZE
130 hex
131 default 0x8000 if VBOOT
132 default 0x0
133 help
134 Sets the maximum size for the PSP to pass the vboot workbuf and
135 any logs or timestamps back to coreboot. This will be copied
136 into main memory by the PSP and will be available when the x86 is
137 started. The workbuf's base depends on the address of the reset
138 vector.
139
140config PRE_X86_CBMEM_CONSOLE_SIZE
141 hex
142 default 0x1600
143 help
144 Size of the CBMEM console used in PSP verstage.
145
146config PRERAM_CBMEM_CONSOLE_SIZE
147 hex
148 default 0x1600
149 help
150 Increase this value if preram cbmem console is getting truncated
151
152config CBFS_MCACHE_SIZE
153 hex
154 default 0x2000 if VBOOT_STARTS_BEFORE_BOOTBLOCK
155
156config C_ENV_BOOTBLOCK_SIZE
157 hex
158 default 0x10000
159 help
160 Sets the size of the bootblock stage that should be loaded in DRAM.
161 This variable controls the DRAM allocation size in linker script
162 for bootblock stage.
163
164config ROMSTAGE_ADDR
165 hex
166 default 0x2040000
167 help
168 Sets the address in DRAM where romstage should be loaded.
169
170config ROMSTAGE_SIZE
171 hex
172 default 0x80000
173 help
174 Sets the size of DRAM allocation for romstage in linker script.
175
176config FSP_M_ADDR
177 hex
178 default 0x20C0000
179 help
180 Sets the address in DRAM where FSP-M should be loaded. cbfstool
181 performs relocation of FSP-M to this address.
182
183config FSP_M_SIZE
184 hex
185 default 0xC0000
186 help
187 Sets the size of DRAM allocation for FSP-M in linker script.
188
189config FSP_TEMP_RAM_SIZE
190 hex
191 default 0x40000
192 help
193 The amount of coreboot-allocated heap and stack usage by the FSP.
194
195config VERSTAGE_ADDR
196 hex
197 depends on VBOOT_SEPARATE_VERSTAGE
198 default 0x2180000
199 help
200 Sets the address in DRAM where verstage should be loaded if running
201 as a separate stage on x86.
202
203config VERSTAGE_SIZE
204 hex
205 depends on VBOOT_SEPARATE_VERSTAGE
206 default 0x80000
207 help
208 Sets the size of DRAM allocation for verstage in linker script if
209 running as a separate stage on x86.
210
211config ASYNC_FILE_LOADING
212 bool "Loads files from SPI asynchronously"
213 select COOP_MULTITASKING
214 select SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
215 select CBFS_PRELOAD
216 help
217 When enabled, the platform will use the LPC SPI DMA controller to
218 asynchronously load contents from the SPI ROM. This will improve
219 boot time because the CPUs can be performing useful work while the
220 SPI contents are being preloaded.
221
222config CBFS_CACHE_SIZE
223 hex
224 default 0x40000 if CBFS_PRELOAD
225
226config RO_REGION_ONLY
227 string
228 depends on VBOOT_SLOTS_RW_AB || VBOOT_SLOTS_RW_A
229 default "apu/amdfw"
230
231config ECAM_MMCONF_BASE_ADDRESS
232 default 0xF8000000
233
234config ECAM_MMCONF_BUS_NUMBER
235 default 64
236
237config MAX_CPUS
238 int
Martin Roth1a3de8e2022-10-06 15:57:21 -0600239 default 16
240 help
241 Maximum number of threads the platform can have.
242
243config CONSOLE_UART_BASE_ADDRESS
244 depends on CONSOLE_SERIAL && AMD_SOC_CONSOLE_UART
245 hex
246 default 0xfedc9000 if UART_FOR_CONSOLE = 0
247 default 0xfedca000 if UART_FOR_CONSOLE = 1
248 default 0xfedce000 if UART_FOR_CONSOLE = 2
249 default 0xfedcf000 if UART_FOR_CONSOLE = 3
250 default 0xfedd1000 if UART_FOR_CONSOLE = 4
251
252config SMM_TSEG_SIZE
253 hex
254 default 0x800000 if HAVE_SMI_HANDLER
255 default 0x0
256
257config SMM_RESERVED_SIZE
258 hex
259 default 0x180000
260
261config SMM_MODULE_STACK_SIZE
262 hex
263 default 0x800
264
265config ACPI_BERT
266 bool "Build ACPI BERT Table"
267 default y
268 depends on HAVE_ACPI_TABLES
269 help
270 Report Machine Check errors identified in POST to the OS in an
271 ACPI Boot Error Record Table.
272
273config ACPI_BERT_SIZE
274 hex
275 default 0x4000 if ACPI_BERT
276 default 0x0
277 help
278 Specify the amount of DRAM reserved for gathering the data used to
279 generate the ACPI table.
280
281config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
282 int
283 default 150
284
285config DISABLE_SPI_FLASH_ROM_SHARING
286 def_bool n
287 help
288 Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
289 which indicates a board level ROM transaction request. This
290 removes arbitration with board and assumes the chipset controls
291 the SPI flash bus entirely.
292
293config DISABLE_KEYBOARD_RESET_PIN
294 bool
295 help
296 Instruct the SoC to not use the state of GPIO_129 as keyboard reset
297 signal. When this pin is used as GPIO and the keyboard reset
298 functionality isn't disabled, configuring it as an output and driving
299 it as 0 will cause a reset.
300
301config ACPI_SSDT_PSD_INDEPENDENT
302 bool "Allow core p-state independent transitions"
303 default y
304 help
305 AMD recommends the ACPI _PSD object to be configured to cause
306 cores to transition between p-states independently. A vendor may
307 choose to generate _PSD object to allow cores to transition together.
308
309menu "PSP Configuration Options"
310
311config AMD_FWM_POSITION_INDEX
312 int "Firmware Directory Table location (0 to 5)"
313 range 0 5
314 default 0 if BOARD_ROMSIZE_KB_512
315 default 1 if BOARD_ROMSIZE_KB_1024
316 default 2 if BOARD_ROMSIZE_KB_2048
317 default 3 if BOARD_ROMSIZE_KB_4096
318 default 4 if BOARD_ROMSIZE_KB_8192
319 default 5 if BOARD_ROMSIZE_KB_16384
320 help
321 Typically this is calculated by the ROM size, but there may
322 be situations where you want to put the firmware directory
323 table in a different location.
324 0: 512 KB - 0xFFFA0000
325 1: 1 MB - 0xFFF20000
326 2: 2 MB - 0xFFE20000
327 3: 4 MB - 0xFFC20000
328 4: 8 MB - 0xFF820000
329 5: 16 MB - 0xFF020000
330
331comment "AMD Firmware Directory Table set to location for 512KB ROM"
332 depends on AMD_FWM_POSITION_INDEX = 0
333comment "AMD Firmware Directory Table set to location for 1MB ROM"
334 depends on AMD_FWM_POSITION_INDEX = 1
335comment "AMD Firmware Directory Table set to location for 2MB ROM"
336 depends on AMD_FWM_POSITION_INDEX = 2
337comment "AMD Firmware Directory Table set to location for 4MB ROM"
338 depends on AMD_FWM_POSITION_INDEX = 3
339comment "AMD Firmware Directory Table set to location for 8MB ROM"
340 depends on AMD_FWM_POSITION_INDEX = 4
341comment "AMD Firmware Directory Table set to location for 16MB ROM"
342 depends on AMD_FWM_POSITION_INDEX = 5
343
344config AMDFW_CONFIG_FILE
345 string "AMD PSP Firmware config file"
Martin Roth20646cd2023-01-04 21:27:06 -0700346 default "src/soc/amd/phoenix/fw.cfg"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600347 help
348 Specify the path/location of AMD PSP Firmware config file.
349
350config PSP_DISABLE_POSTCODES
351 bool "Disable PSP post codes"
352 help
353 Disables the output of port80 post codes from PSP.
354
355config PSP_POSTCODES_ON_ESPI
356 bool "Use eSPI bus for PSP post codes"
357 default y
358 depends on !PSP_DISABLE_POSTCODES
359 help
360 Select to send PSP port80 post codes on eSPI bus.
361 If not selected, PSP port80 codes will be sent on LPC bus.
362
363config PSP_LOAD_MP2_FW
364 bool
365 default n
366 help
367 Include the MP2 firmwares and configuration into the PSP build.
368
369 If unsure, answer 'n'
370
371config PSP_UNLOCK_SECURE_DEBUG
372 bool "Unlock secure debug"
373 default y
374 help
375 Select this item to enable secure debug options in PSP.
376
377config HAVE_PSP_WHITELIST_FILE
378 bool "Include a debug whitelist file in PSP build"
379 default n
380 help
381 Support secured unlock prior to reset using a whitelisted
382 serial number. This feature requires a signed whitelist image
383 and bootloader from AMD.
384
385 If unsure, answer 'n'
386
387config PSP_WHITELIST_FILE
388 string "Debug whitelist file path"
389 depends on HAVE_PSP_WHITELIST_FILE
Martin Roth20646cd2023-01-04 21:27:06 -0700390 default "site-local/3rdparty/amd_blobs/phoenix/PSP/wtl-phx.sbin"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600391
392config HAVE_SPL_FILE
393 bool "Have a mainboard specific SPL table file"
394 default n
395 help
396 Have a mainboard specific Security Patch Level (SPL) table file. SPL file
397 is required to support PSP FW anti-rollback and needs to be created by AMD.
398 The default SPL file applies to all boards that use the concerned SoC and
399 is dropped under 3rdparty/blobs. The mainboard specific SPL file override
400 can be applied through SPL_TABLE_FILE config.
401
402 If unsure, answer 'n'
403
404config SPL_TABLE_FILE
405 string "SPL table file"
406 depends on HAVE_SPL_FILE
Martin Roth20646cd2023-01-04 21:27:06 -0700407 default "3rdparty/blobs/mainboard/\$(CONFIG_MAINBOARD_DIR)/TypeId0x55_SplTableBl_PHX.sbin"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600408
409config HAVE_SPL_RW_AB_FILE
410 bool "Have a separate mainboard-specific SPL file in RW A/B partitions"
411 default n
412 depends on HAVE_SPL_FILE
413 depends on VBOOT_SLOTS_RW_AB
414 help
415 Have separate mainboard-specific Security Patch Level (SPL) table
416 file for the RW A/B FMAP partitions. See the help text of
417 HAVE_SPL_FILE for a more detailed description.
418
419config SPL_RW_AB_TABLE_FILE
420 string "Separate SPL table file for RW A/B partitions"
421 depends on HAVE_SPL_RW_AB_FILE
Martin Roth20646cd2023-01-04 21:27:06 -0700422 default "3rdparty/blobs/mainboard/\$(CONFIG_MAINBOARD_DIR)/TypeId0x55_SplTableBl_PHX.sbin"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600423
424config PSP_SOFTFUSE_BITS
425 string "PSP Soft Fuse bits to enable"
426 default "34 28 6"
427 help
428 Space separated list of Soft Fuse bits to enable.
429 Bit 0: Enable secure debug (Set by PSP_UNLOCK_SECURE_DEBUG)
430 Bit 7: Disable PSP postcodes on Renoir and newer chips only
431 (Set by PSP_DISABLE_PORT80)
432 Bit 15: PSP debug output destination:
433 0=SoC MMIO UART, 1=IO port 0x3F8
434 Bit 29: Disable MP2 firmware loading (Set by PSP_LOAD_MP2_FW)
435
436 See #55758 (NDA) for additional bit definitions.
437
438config PSP_VERSTAGE_FILE
439 string "Specify the PSP_verstage file path"
440 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
441 default "\$(obj)/psp_verstage.bin"
442 help
443 Add psp_verstage file to the build & PSP Directory Table
444
445config PSP_VERSTAGE_SIGNING_TOKEN
446 string "Specify the PSP_verstage Signature Token file path"
447 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
448 default ""
449 help
450 Add psp_verstage signature token to the build & PSP Directory Table
451
452endmenu
453
454config VBOOT
455 select VBOOT_VBNV_CMOS
456 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
457
458config VBOOT_STARTS_BEFORE_BOOTBLOCK
459 def_bool n
460 depends on VBOOT
461 select ARCH_VERSTAGE_ARMV7
462 help
463 Runs verstage on the PSP. Only available on
464 certain ChromeOS branded parts from AMD.
465
466config VBOOT_HASH_BLOCK_SIZE
467 hex
468 default 0x9000
469 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
470 help
471 Because the bulk of the time in psp_verstage to hash the RO cbfs is
472 spent in the overhead of doing svc calls, increasing the hash block
473 size significantly cuts the verstage hashing time as seen below.
474
475 4k takes 180ms
476 16k takes 44ms
477 32k takes 33.7ms
478 36k takes 32.5ms
479 There's actually still room for an even bigger stack, but we've
480 reached a point of diminishing returns.
481
482config CMOS_RECOVERY_BYTE
483 hex
484 default 0x51
485 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
486 help
487 If the workbuf is not passed from the PSP to coreboot, set the
488 recovery flag and reboot. The PSP will read this byte, mark the
489 recovery request in VBNV, and reset the system into recovery mode.
490
491 This is the byte before the default first byte used by VBNV
492 (0x26 + 0x0E - 1)
493
494if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
495
496config RWA_REGION_ONLY
497 string
498 default "apu/amdfw_a"
499 help
500 Add a space-delimited list of filenames that should only be in the
501 RW-A section.
502
503config RWB_REGION_ONLY
504 string
505 default "apu/amdfw_b"
506 help
507 Add a space-delimited list of filenames that should only be in the
508 RW-B section.
509
510endif # VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
511
512endif # SOC_AMD_REMBRANDT_BASE