blob: a042ea2fa26fa2630e4fbdfc8ce21ff42d77404b [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
Felix Heldaab8a222024-01-08 23:30:38 +010039 select SOC_AMD_COMMON_BLOCK_ACPI_MADT
Martin Rothf95a11e2022-10-21 16:43:08 -060040 select SOC_AMD_COMMON_BLOCK_AOAC # TODO: Check if this is still correct
41 select SOC_AMD_COMMON_BLOCK_APOB # TODO: Check if this is still correct
42 select SOC_AMD_COMMON_BLOCK_APOB_HASH # TODO: Check if this is still correct
43 select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS # TODO: Check if this is still correct
Felix Helda63f8592023-03-24 16:30:55 +010044 select SOC_AMD_COMMON_BLOCK_CPUFREQ_FAM1AH
Fred Reitberger28908412022-11-01 10:49:16 -040045 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC
Felix Heldb56ea252023-05-31 16:25:30 +020046 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_DOMAIN
Felix Heldea831392023-08-08 02:55:09 +020047 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_MULTI_PCI_SEGMENT
Martin Rothf95a11e2022-10-21 16:43:08 -060048 select SOC_AMD_COMMON_BLOCK_ESPI_EXTENDED_DECODE_RANGES # TODO: Check if this is still correct
49 select SOC_AMD_COMMON_BLOCK_GRAPHICS # TODO: Check if this is still correct
50 select SOC_AMD_COMMON_BLOCK_HAS_ESPI # TODO: Check if this is still correct
51 select SOC_AMD_COMMON_BLOCK_HAS_ESPI_ALERT_ENABLE # TODO: Check if this is still correct
52 select SOC_AMD_COMMON_BLOCK_I2C # TODO: Check if this is still correct
53 select SOC_AMD_COMMON_BLOCK_I23C_PAD_CTRL # TODO: Check if this is still correct
54 select SOC_AMD_COMMON_BLOCK_IOMMU # TODO: Check if this is still correct
55 select SOC_AMD_COMMON_BLOCK_LPC # TODO: Check if this is still correct
56 select SOC_AMD_COMMON_BLOCK_MCAX # TODO: Check if this is still correct
57 select SOC_AMD_COMMON_BLOCK_NONCAR # TODO: Check if this is still correct
58 select SOC_AMD_COMMON_BLOCK_PCI # TODO: Check if this is still correct
59 select SOC_AMD_COMMON_BLOCK_PCI_MMCONF # TODO: Check if this is still correct
60 select SOC_AMD_COMMON_BLOCK_PCIE_GPP_DRIVER # TODO: Check if this is still correct
61 select SOC_AMD_COMMON_BLOCK_PM # TODO: Check if this is still correct
62 select SOC_AMD_COMMON_BLOCK_PM_CHIPSET_STATE_SAVE # TODO: Check if this is still correct
63 select SOC_AMD_COMMON_BLOCK_PSP_GEN2 # TODO: Check if this is still correct
Felix Held51d1f302023-10-04 21:10:36 +020064 select SOC_AMD_COMMON_BLOCK_PSP_SPL
Martin Roth10c43a22023-02-02 17:21:37 -070065 select SOC_AMD_COMMON_BLOCK_RESET
Martin Rothf95a11e2022-10-21 16:43:08 -060066 select SOC_AMD_COMMON_BLOCK_SMBUS # TODO: Check if this is still correct
67 select SOC_AMD_COMMON_BLOCK_SMI # TODO: Check if this is still correct
68 select SOC_AMD_COMMON_BLOCK_SMM # TODO: Check if this is still correct
69 select SOC_AMD_COMMON_BLOCK_SMU # TODO: Check if this is still correct
Felix Held71375622023-01-12 23:11:54 +010070 select SOC_AMD_COMMON_BLOCK_SMU_SX_ENTRY # TODO: Check if this is still correct
Martin Rothf95a11e2022-10-21 16:43:08 -060071 select SOC_AMD_COMMON_BLOCK_SPI # TODO: Check if this is still correct
Felix Held23a398e2023-03-23 23:44:03 +010072 select SOC_AMD_COMMON_BLOCK_SVI3
Felix Held60df7ca2023-03-24 20:33:15 +010073 select SOC_AMD_COMMON_BLOCK_TSC
Martin Rothf95a11e2022-10-21 16:43:08 -060074 select SOC_AMD_COMMON_BLOCK_UART # TODO: Check if this is still correct
75 select SOC_AMD_COMMON_BLOCK_UCODE # TODO: Check if this is still correct
76 select SOC_AMD_COMMON_FSP_CCX_CPPC_HOB # TODO: Check if this is still correct
77 select SOC_AMD_COMMON_FSP_DMI_TABLES # TODO: Check if this is still correct
78 select SOC_AMD_COMMON_FSP_PCI # TODO: Check if this is still correct
Fred Reitbergereb594932023-01-11 15:12:21 -050079 select SOC_AMD_COMMON_FSP_PRELOAD_FSPS
Felix Heldce60fb12024-01-18 20:42:54 +010080 select SOC_AMD_COMMON_ROMSTAGE_LEGACY_DMA_FIXUP
Martin Rothf95a11e2022-10-21 16:43:08 -060081 select SSE2
82 select UDK_2017_BINDING
Martin Rothbcb610a2022-10-29 13:31:54 -060083 select USE_DDR5
Martin Rothf95a11e2022-10-21 16:43:08 -060084 select USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
85 select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
86 select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
87 select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK
88 select X86_AMD_FIXED_MTRRS
89 select X86_INIT_NEED_1_SIPI
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010090 help
91 AMD Glinda support
92
93if SOC_AMD_GLINDA
Martin Rothf95a11e2022-10-21 16:43:08 -060094
Martin Rothf95a11e2022-10-21 16:43:08 -060095config CHIPSET_DEVICETREE
96 string
97 default "soc/amd/glinda/chipset.cb"
98
99config EARLY_RESERVED_DRAM_BASE
100 hex
101 default 0x2000000
102 help
103 This variable defines the base address of the DRAM which is reserved
104 for usage by coreboot in early stages (i.e. before ramstage is up).
105 This memory gets reserved in BIOS tables to ensure that the OS does
106 not use it, thus preventing corruption of OS memory in case of S3
107 resume.
108
109config EARLYRAM_BSP_STACK_SIZE
110 hex
111 default 0x1000
112
113config PSP_APOB_DRAM_ADDRESS
114 hex
115 default 0x2001000
116 help
117 Location in DRAM where the PSP will copy the AGESA PSP Output
118 Block.
119
120config PSP_APOB_DRAM_SIZE
121 hex
122 default 0x1E000
123
124config PSP_SHAREDMEM_BASE
125 hex
126 default 0x201F000 if VBOOT
127 default 0x0
128 help
129 This variable defines the base address in DRAM memory where PSP copies
130 the vboot workbuf. This is used in the linker script to have a static
131 allocation for the buffer as well as for adding relevant entries in
132 the BIOS directory table for the PSP.
133
134config PSP_SHAREDMEM_SIZE
135 hex
136 default 0x8000 if VBOOT
137 default 0x0
138 help
139 Sets the maximum size for the PSP to pass the vboot workbuf and
140 any logs or timestamps back to coreboot. This will be copied
141 into main memory by the PSP and will be available when the x86 is
142 started. The workbuf's base depends on the address of the reset
143 vector.
144
145config PRE_X86_CBMEM_CONSOLE_SIZE
146 hex
147 default 0x1600
148 help
149 Size of the CBMEM console used in PSP verstage.
150
151config PRERAM_CBMEM_CONSOLE_SIZE
152 hex
153 default 0x1600
154 help
155 Increase this value if preram cbmem console is getting truncated
156
157config CBFS_MCACHE_SIZE
158 hex
159 default 0x2000 if VBOOT_STARTS_BEFORE_BOOTBLOCK
160
161config C_ENV_BOOTBLOCK_SIZE
162 hex
163 default 0x10000
164 help
165 Sets the size of the bootblock stage that should be loaded in DRAM.
166 This variable controls the DRAM allocation size in linker script
167 for bootblock stage.
168
169config ROMSTAGE_ADDR
170 hex
171 default 0x2040000
172 help
173 Sets the address in DRAM where romstage should be loaded.
174
175config ROMSTAGE_SIZE
176 hex
177 default 0x80000
178 help
179 Sets the size of DRAM allocation for romstage in linker script.
180
181config FSP_M_ADDR
182 hex
183 default 0x20C0000
184 help
185 Sets the address in DRAM where FSP-M should be loaded. cbfstool
186 performs relocation of FSP-M to this address.
187
188config FSP_M_SIZE
189 hex
190 default 0xC0000
191 help
192 Sets the size of DRAM allocation for FSP-M in linker script.
193
194config FSP_TEMP_RAM_SIZE
195 hex
196 default 0x40000
197 help
198 The amount of coreboot-allocated heap and stack usage by the FSP.
199
200config VERSTAGE_ADDR
201 hex
202 depends on VBOOT_SEPARATE_VERSTAGE
203 default 0x2180000
204 help
205 Sets the address in DRAM where verstage should be loaded if running
206 as a separate stage on x86.
207
208config VERSTAGE_SIZE
209 hex
210 depends on VBOOT_SEPARATE_VERSTAGE
211 default 0x80000
212 help
213 Sets the size of DRAM allocation for verstage in linker script if
214 running as a separate stage on x86.
215
216config ASYNC_FILE_LOADING
217 bool "Loads files from SPI asynchronously"
218 select COOP_MULTITASKING
219 select SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
220 select CBFS_PRELOAD
221 help
222 When enabled, the platform will use the LPC SPI DMA controller to
223 asynchronously load contents from the SPI ROM. This will improve
224 boot time because the CPUs can be performing useful work while the
225 SPI contents are being preloaded.
226
227config CBFS_CACHE_SIZE
228 hex
229 default 0x40000 if CBFS_PRELOAD
230
231config RO_REGION_ONLY
232 string
233 depends on VBOOT_SLOTS_RW_AB || VBOOT_SLOTS_RW_A
234 default "apu/amdfw"
235
236config ECAM_MMCONF_BASE_ADDRESS
Anand Vaikard873d3a2024-01-05 14:27:02 +0530237 default 0xE0000000
Martin Rothf95a11e2022-10-21 16:43:08 -0600238
239config ECAM_MMCONF_BUS_NUMBER
Anand Vaikard873d3a2024-01-05 14:27:02 +0530240 default 256
Martin Rothf95a11e2022-10-21 16:43:08 -0600241
242config MAX_CPUS
243 int
Anand Vaikar72249992023-12-13 16:21:02 +0530244 default 24
Martin Rothf95a11e2022-10-21 16:43:08 -0600245 help
246 Maximum number of threads the platform can have.
247
248config CONSOLE_UART_BASE_ADDRESS
249 depends on CONSOLE_SERIAL && AMD_SOC_CONSOLE_UART
250 hex
251 default 0xfedc9000 if UART_FOR_CONSOLE = 0
252 default 0xfedca000 if UART_FOR_CONSOLE = 1
253 default 0xfedce000 if UART_FOR_CONSOLE = 2
254 default 0xfedcf000 if UART_FOR_CONSOLE = 3
255 default 0xfedd1000 if UART_FOR_CONSOLE = 4
256
257config SMM_TSEG_SIZE
258 hex
259 default 0x800000 if HAVE_SMI_HANDLER
260 default 0x0
261
262config SMM_RESERVED_SIZE
263 hex
264 default 0x180000
265
266config SMM_MODULE_STACK_SIZE
267 hex
268 default 0x800
269
270config ACPI_BERT
271 bool "Build ACPI BERT Table"
272 default y
273 depends on HAVE_ACPI_TABLES
274 help
275 Report Machine Check errors identified in POST to the OS in an
276 ACPI Boot Error Record Table.
277
278config ACPI_BERT_SIZE
279 hex
280 default 0x4000 if ACPI_BERT
281 default 0x0
282 help
283 Specify the amount of DRAM reserved for gathering the data used to
284 generate the ACPI table.
285
286config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
287 int
288 default 150
289
290config DISABLE_SPI_FLASH_ROM_SHARING
291 def_bool n
292 help
293 Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
294 which indicates a board level ROM transaction request. This
295 removes arbitration with board and assumes the chipset controls
296 the SPI flash bus entirely.
297
298config DISABLE_KEYBOARD_RESET_PIN
299 bool
300 help
Martin Roth9ceac742023-02-08 14:26:02 -0700301 Instruct the SoC to not to reset based on the state of GPIO_21, KBDRST_L.
Martin Rothf95a11e2022-10-21 16:43:08 -0600302
Martin Rothf95a11e2022-10-21 16:43:08 -0600303menu "PSP Configuration Options"
304
Martin Rothf95a11e2022-10-21 16:43:08 -0600305config AMDFW_CONFIG_FILE
306 string "AMD PSP Firmware config file"
307 default "src/soc/amd/glinda/fw.cfg"
308 help
309 Specify the path/location of AMD PSP Firmware config file.
310
311config PSP_DISABLE_POSTCODES
312 bool "Disable PSP post codes"
313 help
314 Disables the output of port80 post codes from PSP.
315
316config PSP_POSTCODES_ON_ESPI
317 bool "Use eSPI bus for PSP post codes"
318 default y
319 depends on !PSP_DISABLE_POSTCODES
320 help
321 Select to send PSP port80 post codes on eSPI bus.
322 If not selected, PSP port80 codes will be sent on LPC bus.
323
324config PSP_LOAD_MP2_FW
325 bool
326 default n
327 help
328 Include the MP2 firmwares and configuration into the PSP build.
329
330 If unsure, answer 'n'
331
332config PSP_UNLOCK_SECURE_DEBUG
333 bool "Unlock secure debug"
334 default y
335 help
336 Select this item to enable secure debug options in PSP.
337
338config HAVE_PSP_WHITELIST_FILE
339 bool "Include a debug whitelist file in PSP build"
340 default n
341 help
342 Support secured unlock prior to reset using a whitelisted
343 serial number. This feature requires a signed whitelist image
344 and bootloader from AMD.
345
346 If unsure, answer 'n'
347
348config PSP_WHITELIST_FILE
349 string "Debug whitelist file path"
350 depends on HAVE_PSP_WHITELIST_FILE
351 default "site-local/3rdparty/amd_blobs/glinda/PSP/wtl-mrg.sbin"
352
Martin Rothf95a11e2022-10-21 16:43:08 -0600353config PSP_SOFTFUSE_BITS
354 string "PSP Soft Fuse bits to enable"
355 default "34 28 6"
356 help
357 Space separated list of Soft Fuse bits to enable.
358 Bit 0: Enable secure debug (Set by PSP_UNLOCK_SECURE_DEBUG)
359 Bit 7: Disable PSP postcodes on Renoir and newer chips only
360 (Set by PSP_DISABLE_PORT80)
361 Bit 15: PSP debug output destination:
362 0=SoC MMIO UART, 1=IO port 0x3F8
363 Bit 29: Disable MP2 firmware loading (Set by PSP_LOAD_MP2_FW)
364
365 See #55758 (NDA) for additional bit definitions.
366
367config PSP_VERSTAGE_FILE
368 string "Specify the PSP_verstage file path"
369 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
370 default "\$(obj)/psp_verstage.bin"
371 help
372 Add psp_verstage file to the build & PSP Directory Table
373
374config PSP_VERSTAGE_SIGNING_TOKEN
375 string "Specify the PSP_verstage Signature Token file path"
376 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
377 default ""
378 help
379 Add psp_verstage signature token to the build & PSP Directory Table
380
381endmenu
382
383config VBOOT
384 select VBOOT_VBNV_CMOS
385 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
386
387config VBOOT_STARTS_BEFORE_BOOTBLOCK
388 def_bool n
389 depends on VBOOT
390 select ARCH_VERSTAGE_ARMV7
391 help
392 Runs verstage on the PSP. Only available on
393 certain ChromeOS branded parts from AMD.
394
395config VBOOT_HASH_BLOCK_SIZE
396 hex
397 default 0x9000
398 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
399 help
400 Because the bulk of the time in psp_verstage to hash the RO cbfs is
401 spent in the overhead of doing svc calls, increasing the hash block
402 size significantly cuts the verstage hashing time as seen below.
403
404 4k takes 180ms
405 16k takes 44ms
406 32k takes 33.7ms
407 36k takes 32.5ms
408 There's actually still room for an even bigger stack, but we've
409 reached a point of diminishing returns.
410
411config CMOS_RECOVERY_BYTE
412 hex
413 default 0x51
414 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
415 help
416 If the workbuf is not passed from the PSP to coreboot, set the
417 recovery flag and reboot. The PSP will read this byte, mark the
418 recovery request in VBNV, and reset the system into recovery mode.
419
420 This is the byte before the default first byte used by VBNV
421 (0x26 + 0x0E - 1)
422
423if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
424
425config RWA_REGION_ONLY
426 string
427 default "apu/amdfw_a"
428 help
429 Add a space-delimited list of filenames that should only be in the
430 RW-A section.
431
432config RWB_REGION_ONLY
433 string
434 default "apu/amdfw_b"
435 help
436 Add a space-delimited list of filenames that should only be in the
437 RW-B section.
438
439endif # VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
440
Felix Held431c0b42023-08-10 20:40:29 +0200441endif # SOC_AMD_GLINDA