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