blob: cd287254cfc9e3eb5b0b13397319aa4883e72dcf [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
Fred Reitberger097f5402023-02-24 13:27:13 -050011 select CACHE_MRC_SETTINGS
Martin Roth1a3de8e2022-10-06 15:57:21 -060012 select DRIVERS_USB_ACPI
13 select DRIVERS_USB_PCI_XHCI
14 select FSP_COMPRESS_FSP_M_LZMA if !ASYNC_FILE_LOADING
15 select FSP_COMPRESS_FSP_M_LZ4 if ASYNC_FILE_LOADING
16 select FSP_COMPRESS_FSP_S_LZ4
17 select GENERIC_GPIO_LIB
18 select HAVE_ACPI_TABLES
19 select HAVE_CF9_RESET
20 select HAVE_EM100_SUPPORT
21 select HAVE_FSP_GOP
22 select HAVE_SMI_HANDLER
23 select IDT_IN_EVERY_STAGE
24 select PARALLEL_MP_AP_WORK
25 select PLATFORM_USES_FSP2_0
26 select PROVIDES_ROM_SHARING
27 select PSP_SUPPORTS_EFS2_RELATIVE_ADDR if VBOOT_STARTS_BEFORE_BOOTBLOCK
Karthikeyan Ramasubramanian637a21e2023-10-04 17:50:52 -060028 # TODO: (b/303516266) Re-enable CCP DMA after addressing a stall
29 # select PSP_VERSTAGE_CCP_DMA if VBOOT_STARTS_BEFORE_BOOTBLOCK
Martin Roth1a3de8e2022-10-06 15:57:21 -060030 select RESET_VECTOR_IN_RAM
31 select RTC
32 select SOC_AMD_COMMON
Fred Reitberger2dceb122022-11-04 14:37:34 -040033 select SOC_AMD_COMMON_BLOCK_ACP_GEN2
Martin Roth9c64c082022-10-18 17:54:52 -060034 select SOC_AMD_COMMON_BLOCK_ACPI # TODO: Check if this is still correct
35 select SOC_AMD_COMMON_BLOCK_ACPIMMIO # TODO: Check if this is still correct
36 select SOC_AMD_COMMON_BLOCK_ACPI_ALIB # TODO: Check if this is still correct
Fred Reitberger559f3d42023-06-29 15:13:49 -040037 select SOC_AMD_COMMON_BLOCK_ACPI_CPPC
Felix Held8ec90ac2023-03-07 00:31:41 +010038 select SOC_AMD_COMMON_BLOCK_ACPI_CPU_POWER_STATE
Martin Roth9c64c082022-10-18 17:54:52 -060039 select SOC_AMD_COMMON_BLOCK_ACPI_GPIO # TODO: Check if this is still correct
40 select SOC_AMD_COMMON_BLOCK_ACPI_IVRS # TODO: Check if this is still correct
Felix Heldaab8a222024-01-08 23:30:38 +010041 select SOC_AMD_COMMON_BLOCK_ACPI_MADT
Fred Reitberger2dceb122022-11-04 14:37:34 -040042 select SOC_AMD_COMMON_BLOCK_AOAC
Fred Reitbergerc53ab572023-07-17 08:31:45 -040043 select SOC_AMD_COMMON_BLOCK_APOB
44 select SOC_AMD_COMMON_BLOCK_APOB_HASH
Fred Reitberger2dceb122022-11-04 14:37:34 -040045 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
Felix Helda63f8592023-03-24 16:30:55 +010046 select SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM17H_19H
Fred Reitberger28908412022-11-01 10:49:16 -040047 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC
Felix Held268dadb2023-05-31 16:23:38 +020048 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_DOMAIN
Felix Heldea831392023-08-08 02:55:09 +020049 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_MULTI_PCI_SEGMENT
Felix Heldd6326972023-09-15 22:40:02 +020050 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_NP_REGION
Fred Reitberger267edec2022-12-13 12:56:09 -050051 select SOC_AMD_COMMON_BLOCK_ESPI_EXTENDED_DECODE_RANGES
Martin Roth9c64c082022-10-18 17:54:52 -060052 select SOC_AMD_COMMON_BLOCK_GRAPHICS # TODO: Check if this is still correct
Fred Reitberger267edec2022-12-13 12:56:09 -050053 select SOC_AMD_COMMON_BLOCK_HAS_ESPI
54 select SOC_AMD_COMMON_BLOCK_HAS_ESPI_ALERT_ENABLE
Fred Reitberger2dceb122022-11-04 14:37:34 -040055 select SOC_AMD_COMMON_BLOCK_I2C
56 select SOC_AMD_COMMON_BLOCK_I23C_PAD_CTRL
57 select SOC_AMD_COMMON_BLOCK_IOMMU
Fred Reitberger267edec2022-12-13 12:56:09 -050058 select SOC_AMD_COMMON_BLOCK_LPC
Fred Reitberger2dceb122022-11-04 14:37:34 -040059 select SOC_AMD_COMMON_BLOCK_MCAX
60 select SOC_AMD_COMMON_BLOCK_NONCAR
Fred Reitbergera6514e22022-12-07 08:39:55 -050061 select SOC_AMD_COMMON_BLOCK_PCI
62 select SOC_AMD_COMMON_BLOCK_PCI_MMCONF
63 select SOC_AMD_COMMON_BLOCK_PCIE_GPP_DRIVER
Fred Reitberger2dceb122022-11-04 14:37:34 -040064 select SOC_AMD_COMMON_BLOCK_PM
65 select SOC_AMD_COMMON_BLOCK_PM_CHIPSET_STATE_SAVE
Martin Roth9c64c082022-10-18 17:54:52 -060066 select SOC_AMD_COMMON_BLOCK_PSP_GEN2 # TODO: Check if this is still correct
Felix Held51d1f302023-10-04 21:10:36 +020067 select SOC_AMD_COMMON_BLOCK_PSP_SPL
Martin Roth10c43a22023-02-02 17:21:37 -070068 select SOC_AMD_COMMON_BLOCK_RESET
Fred Reitberger2dceb122022-11-04 14:37:34 -040069 select SOC_AMD_COMMON_BLOCK_SMBUS
70 select SOC_AMD_COMMON_BLOCK_SMI
Fred Reitberger267edec2022-12-13 12:56:09 -050071 select SOC_AMD_COMMON_BLOCK_SMM
72 select SOC_AMD_COMMON_BLOCK_SMU
Felix Held65d822e2023-01-12 23:11:42 +010073 select SOC_AMD_COMMON_BLOCK_SMU_SX_ENTRY
Fred Reitberger2dceb122022-11-04 14:37:34 -040074 select SOC_AMD_COMMON_BLOCK_SPI
Felix Held23a398e2023-03-23 23:44:03 +010075 select SOC_AMD_COMMON_BLOCK_SVI3
Felix Held60df7ca2023-03-24 20:33:15 +010076 select SOC_AMD_COMMON_BLOCK_TSC
Fred Reitberger2dceb122022-11-04 14:37:34 -040077 select SOC_AMD_COMMON_BLOCK_UART
78 select SOC_AMD_COMMON_BLOCK_UCODE
Jon Murphydf2edde2023-04-06 17:15:14 -060079 select SOC_AMD_COMMON_BLOCK_XHCI
Fred Reitberger559f3d42023-06-29 15:13:49 -040080 select SOC_AMD_COMMON_FSP_CCX_CPPC_HOB
Konrad Adamczykff786b52023-06-27 13:18:30 +000081 select SOC_AMD_COMMON_FSP_DMI_TABLES
Martin Roth9c64c082022-10-18 17:54:52 -060082 select SOC_AMD_COMMON_FSP_PCI # TODO: Check if this is still correct
Matt DeVillier6bb0f8a2023-11-13 20:57:12 -060083 select SOC_AMD_COMMON_FSP_PCIE_CLK_REQ
Fred Reitberger010c4082023-01-11 15:11:48 -050084 select SOC_AMD_COMMON_FSP_PRELOAD_FSPS
Martin Roth1a3de8e2022-10-06 15:57:21 -060085 select SSE2
86 select UDK_2017_BINDING
Martin Rothbcb610a2022-10-29 13:31:54 -060087 select USE_DDR5
Martin Roth1a3de8e2022-10-06 15:57:21 -060088 select USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
89 select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
90 select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
91 select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK
Fred Reitberger5b9957b2023-06-29 15:15:26 -040092 select VBOOT_X86_SHA256_ACCELERATION if VBOOT
Martin Roth1a3de8e2022-10-06 15:57:21 -060093 select X86_AMD_FIXED_MTRRS
94 select X86_INIT_NEED_1_SIPI
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010095 help
Martin Roth20646cd2023-01-04 21:27:06 -070096 AMD Phoenix support
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010097
Martin Roth20646cd2023-01-04 21:27:06 -070098if SOC_AMD_PHOENIX
Martin Roth1a3de8e2022-10-06 15:57:21 -060099
Martin Roth1a3de8e2022-10-06 15:57:21 -0600100config CHIPSET_DEVICETREE
101 string
Martin Roth20646cd2023-01-04 21:27:06 -0700102 default "soc/amd/phoenix/chipset.cb"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600103
104config EARLY_RESERVED_DRAM_BASE
105 hex
106 default 0x2000000
107 help
108 This variable defines the base address of the DRAM which is reserved
109 for usage by coreboot in early stages (i.e. before ramstage is up).
110 This memory gets reserved in BIOS tables to ensure that the OS does
111 not use it, thus preventing corruption of OS memory in case of S3
112 resume.
113
114config EARLYRAM_BSP_STACK_SIZE
115 hex
116 default 0x1000
117
118config PSP_APOB_DRAM_ADDRESS
119 hex
120 default 0x2001000
121 help
122 Location in DRAM where the PSP will copy the AGESA PSP Output
123 Block.
124
125config PSP_APOB_DRAM_SIZE
126 hex
Fred Reitberger40646772023-02-08 13:05:05 -0500127 default 0x40000
Martin Roth1a3de8e2022-10-06 15:57:21 -0600128
129config PSP_SHAREDMEM_BASE
130 hex
Fred Reitberger40646772023-02-08 13:05:05 -0500131 default 0x2041000 if VBOOT
Martin Roth1a3de8e2022-10-06 15:57:21 -0600132 default 0x0
133 help
134 This variable defines the base address in DRAM memory where PSP copies
135 the vboot workbuf. This is used in the linker script to have a static
136 allocation for the buffer as well as for adding relevant entries in
137 the BIOS directory table for the PSP.
138
139config PSP_SHAREDMEM_SIZE
140 hex
141 default 0x8000 if VBOOT
142 default 0x0
143 help
144 Sets the maximum size for the PSP to pass the vboot workbuf and
145 any logs or timestamps back to coreboot. This will be copied
146 into main memory by the PSP and will be available when the x86 is
147 started. The workbuf's base depends on the address of the reset
148 vector.
149
150config PRE_X86_CBMEM_CONSOLE_SIZE
151 hex
152 default 0x1600
153 help
154 Size of the CBMEM console used in PSP verstage.
155
156config PRERAM_CBMEM_CONSOLE_SIZE
157 hex
158 default 0x1600
159 help
160 Increase this value if preram cbmem console is getting truncated
161
162config CBFS_MCACHE_SIZE
163 hex
164 default 0x2000 if VBOOT_STARTS_BEFORE_BOOTBLOCK
165
166config C_ENV_BOOTBLOCK_SIZE
167 hex
168 default 0x10000
169 help
170 Sets the size of the bootblock stage that should be loaded in DRAM.
171 This variable controls the DRAM allocation size in linker script
172 for bootblock stage.
173
174config ROMSTAGE_ADDR
175 hex
Fred Reitberger40646772023-02-08 13:05:05 -0500176 default 0x2060000
Martin Roth1a3de8e2022-10-06 15:57:21 -0600177 help
178 Sets the address in DRAM where romstage should be loaded.
179
180config ROMSTAGE_SIZE
181 hex
182 default 0x80000
183 help
184 Sets the size of DRAM allocation for romstage in linker script.
185
186config FSP_M_ADDR
187 hex
Fred Reitberger40646772023-02-08 13:05:05 -0500188 default 0x20E0000
Martin Roth1a3de8e2022-10-06 15:57:21 -0600189 help
190 Sets the address in DRAM where FSP-M should be loaded. cbfstool
191 performs relocation of FSP-M to this address.
192
193config FSP_M_SIZE
194 hex
195 default 0xC0000
196 help
197 Sets the size of DRAM allocation for FSP-M in linker script.
198
199config FSP_TEMP_RAM_SIZE
200 hex
201 default 0x40000
202 help
203 The amount of coreboot-allocated heap and stack usage by the FSP.
204
205config VERSTAGE_ADDR
206 hex
207 depends on VBOOT_SEPARATE_VERSTAGE
Fred Reitberger40646772023-02-08 13:05:05 -0500208 default 0x21A0000
Martin Roth1a3de8e2022-10-06 15:57:21 -0600209 help
210 Sets the address in DRAM where verstage should be loaded if running
211 as a separate stage on x86.
212
213config VERSTAGE_SIZE
214 hex
215 depends on VBOOT_SEPARATE_VERSTAGE
216 default 0x80000
217 help
218 Sets the size of DRAM allocation for verstage in linker script if
219 running as a separate stage on x86.
220
221config ASYNC_FILE_LOADING
222 bool "Loads files from SPI asynchronously"
223 select COOP_MULTITASKING
224 select SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
225 select CBFS_PRELOAD
226 help
227 When enabled, the platform will use the LPC SPI DMA controller to
228 asynchronously load contents from the SPI ROM. This will improve
229 boot time because the CPUs can be performing useful work while the
230 SPI contents are being preloaded.
231
232config CBFS_CACHE_SIZE
233 hex
234 default 0x40000 if CBFS_PRELOAD
235
236config RO_REGION_ONLY
237 string
238 depends on VBOOT_SLOTS_RW_AB || VBOOT_SLOTS_RW_A
239 default "apu/amdfw"
240
241config ECAM_MMCONF_BASE_ADDRESS
Ritul Guru75a073d2023-01-12 17:42:54 +0530242 default 0xE0000000
Martin Roth1a3de8e2022-10-06 15:57:21 -0600243
244config ECAM_MMCONF_BUS_NUMBER
Ritul Guru75a073d2023-01-12 17:42:54 +0530245 default 256
Martin Roth1a3de8e2022-10-06 15:57:21 -0600246
247config MAX_CPUS
248 int
Martin Roth1a3de8e2022-10-06 15:57:21 -0600249 default 16
250 help
251 Maximum number of threads the platform can have.
252
Martin Rothab059642023-05-01 14:00:40 -0600253config VGA_BIOS_ID
254 string
Felix Heldbc069ea2023-05-26 18:23:43 +0200255 default "1002,15bf"
Martin Rothab059642023-05-01 14:00:40 -0600256 help
257 The default VGA BIOS PCI vendor/device ID should be set to the
258 result of the map_oprom_vendev() function in graphics.c.
259
Felix Heldd4440dd2023-05-26 18:25:33 +0200260# TODO: add VGA_BIOS_FILE default once the correct VBIOS binaries are available in amd_blobs
Martin Rothab059642023-05-01 14:00:40 -0600261
Martin Roth1a3de8e2022-10-06 15:57:21 -0600262config CONSOLE_UART_BASE_ADDRESS
263 depends on CONSOLE_SERIAL && AMD_SOC_CONSOLE_UART
264 hex
265 default 0xfedc9000 if UART_FOR_CONSOLE = 0
266 default 0xfedca000 if UART_FOR_CONSOLE = 1
267 default 0xfedce000 if UART_FOR_CONSOLE = 2
268 default 0xfedcf000 if UART_FOR_CONSOLE = 3
269 default 0xfedd1000 if UART_FOR_CONSOLE = 4
270
271config SMM_TSEG_SIZE
272 hex
273 default 0x800000 if HAVE_SMI_HANDLER
274 default 0x0
275
276config SMM_RESERVED_SIZE
277 hex
278 default 0x180000
279
280config SMM_MODULE_STACK_SIZE
281 hex
282 default 0x800
283
284config ACPI_BERT
285 bool "Build ACPI BERT Table"
286 default y
287 depends on HAVE_ACPI_TABLES
288 help
289 Report Machine Check errors identified in POST to the OS in an
290 ACPI Boot Error Record Table.
291
292config ACPI_BERT_SIZE
293 hex
294 default 0x4000 if ACPI_BERT
295 default 0x0
296 help
297 Specify the amount of DRAM reserved for gathering the data used to
298 generate the ACPI table.
299
300config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
301 int
302 default 150
303
304config DISABLE_SPI_FLASH_ROM_SHARING
305 def_bool n
306 help
307 Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
308 which indicates a board level ROM transaction request. This
309 removes arbitration with board and assumes the chipset controls
310 the SPI flash bus entirely.
311
312config DISABLE_KEYBOARD_RESET_PIN
313 bool
314 help
Martin Roth9ceac742023-02-08 14:26:02 -0700315 Instruct the SoC to not to reset based on the state of GPIO_21, KBDRST_L.
Martin Roth1a3de8e2022-10-06 15:57:21 -0600316
Martin Roth1a3de8e2022-10-06 15:57:21 -0600317menu "PSP Configuration Options"
318
Martin Roth1a3de8e2022-10-06 15:57:21 -0600319config AMDFW_CONFIG_FILE
320 string "AMD PSP Firmware config file"
Martin Roth20646cd2023-01-04 21:27:06 -0700321 default "src/soc/amd/phoenix/fw.cfg"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600322 help
323 Specify the path/location of AMD PSP Firmware config file.
324
325config PSP_DISABLE_POSTCODES
326 bool "Disable PSP post codes"
327 help
328 Disables the output of port80 post codes from PSP.
329
330config PSP_POSTCODES_ON_ESPI
331 bool "Use eSPI bus for PSP post codes"
332 default y
333 depends on !PSP_DISABLE_POSTCODES
334 help
335 Select to send PSP port80 post codes on eSPI bus.
336 If not selected, PSP port80 codes will be sent on LPC bus.
337
338config PSP_LOAD_MP2_FW
339 bool
340 default n
341 help
342 Include the MP2 firmwares and configuration into the PSP build.
343
344 If unsure, answer 'n'
345
346config PSP_UNLOCK_SECURE_DEBUG
347 bool "Unlock secure debug"
348 default y
349 help
350 Select this item to enable secure debug options in PSP.
351
352config HAVE_PSP_WHITELIST_FILE
353 bool "Include a debug whitelist file in PSP build"
354 default n
355 help
356 Support secured unlock prior to reset using a whitelisted
357 serial number. This feature requires a signed whitelist image
358 and bootloader from AMD.
359
360 If unsure, answer 'n'
361
362config PSP_WHITELIST_FILE
363 string "Debug whitelist file path"
364 depends on HAVE_PSP_WHITELIST_FILE
Martin Roth20646cd2023-01-04 21:27:06 -0700365 default "site-local/3rdparty/amd_blobs/phoenix/PSP/wtl-phx.sbin"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600366
Martin Roth1a3de8e2022-10-06 15:57:21 -0600367config PSP_SOFTFUSE_BITS
368 string "PSP Soft Fuse bits to enable"
Fred Reitberger5c1c7b62023-05-12 12:53:52 -0400369 default "36 28 6"
Martin Roth1a3de8e2022-10-06 15:57:21 -0600370 help
371 Space separated list of Soft Fuse bits to enable.
372 Bit 0: Enable secure debug (Set by PSP_UNLOCK_SECURE_DEBUG)
373 Bit 7: Disable PSP postcodes on Renoir and newer chips only
374 (Set by PSP_DISABLE_PORT80)
375 Bit 15: PSP debug output destination:
376 0=SoC MMIO UART, 1=IO port 0x3F8
377 Bit 29: Disable MP2 firmware loading (Set by PSP_LOAD_MP2_FW)
378
379 See #55758 (NDA) for additional bit definitions.
380
381config PSP_VERSTAGE_FILE
382 string "Specify the PSP_verstage file path"
383 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
384 default "\$(obj)/psp_verstage.bin"
385 help
386 Add psp_verstage file to the build & PSP Directory Table
387
388config PSP_VERSTAGE_SIGNING_TOKEN
389 string "Specify the PSP_verstage Signature Token file path"
390 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
391 default ""
392 help
393 Add psp_verstage signature token to the build & PSP Directory Table
394
395endmenu
396
397config VBOOT
398 select VBOOT_VBNV_CMOS
399 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
400
401config VBOOT_STARTS_BEFORE_BOOTBLOCK
402 def_bool n
403 depends on VBOOT
404 select ARCH_VERSTAGE_ARMV7
405 help
406 Runs verstage on the PSP. Only available on
407 certain ChromeOS branded parts from AMD.
408
409config VBOOT_HASH_BLOCK_SIZE
410 hex
411 default 0x9000
412 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
413 help
414 Because the bulk of the time in psp_verstage to hash the RO cbfs is
415 spent in the overhead of doing svc calls, increasing the hash block
416 size significantly cuts the verstage hashing time as seen below.
417
418 4k takes 180ms
419 16k takes 44ms
420 32k takes 33.7ms
421 36k takes 32.5ms
422 There's actually still room for an even bigger stack, but we've
423 reached a point of diminishing returns.
424
425config CMOS_RECOVERY_BYTE
426 hex
427 default 0x51
428 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
429 help
430 If the workbuf is not passed from the PSP to coreboot, set the
431 recovery flag and reboot. The PSP will read this byte, mark the
432 recovery request in VBNV, and reset the system into recovery mode.
433
434 This is the byte before the default first byte used by VBNV
435 (0x26 + 0x0E - 1)
436
437if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
438
439config RWA_REGION_ONLY
440 string
441 default "apu/amdfw_a"
442 help
443 Add a space-delimited list of filenames that should only be in the
444 RW-A section.
445
446config RWB_REGION_ONLY
447 string
448 default "apu/amdfw_b"
449 help
450 Add a space-delimited list of filenames that should only be in the
451 RW-B section.
452
453endif # VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
454
Fred Reitbergerd45402a2023-04-24 12:18:31 -0400455endif # SOC_AMD_PHOENIX