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