blob: 9f5d5370763fa788449dbfbf21bb868db4a4515f [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
Felix Heldd6326972023-09-15 22:40:02 +020047 select SOC_AMD_COMMON_BLOCK_DATA_FABRIC_NP_REGION
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
Martin Roth10c43a22023-02-02 17:21:37 -070064 select SOC_AMD_COMMON_BLOCK_RESET
Martin Rothf95a11e2022-10-21 16:43:08 -060065 select SOC_AMD_COMMON_BLOCK_SMBUS # TODO: Check if this is still correct
66 select SOC_AMD_COMMON_BLOCK_SMI # TODO: Check if this is still correct
67 select SOC_AMD_COMMON_BLOCK_SMM # TODO: Check if this is still correct
68 select SOC_AMD_COMMON_BLOCK_SMU # TODO: Check if this is still correct
Felix Held71375622023-01-12 23:11:54 +010069 select SOC_AMD_COMMON_BLOCK_SMU_SX_ENTRY # TODO: Check if this is still correct
Martin Rothf95a11e2022-10-21 16:43:08 -060070 select SOC_AMD_COMMON_BLOCK_SPI # TODO: Check if this is still correct
Felix Held23a398e2023-03-23 23:44:03 +010071 select SOC_AMD_COMMON_BLOCK_SVI3
Felix Held60df7ca2023-03-24 20:33:15 +010072 select SOC_AMD_COMMON_BLOCK_TSC
Martin Rothf95a11e2022-10-21 16:43:08 -060073 select SOC_AMD_COMMON_BLOCK_UART # TODO: Check if this is still correct
74 select SOC_AMD_COMMON_BLOCK_UCODE # TODO: Check if this is still correct
75 select SOC_AMD_COMMON_FSP_CCX_CPPC_HOB # TODO: Check if this is still correct
76 select SOC_AMD_COMMON_FSP_DMI_TABLES # TODO: Check if this is still correct
77 select SOC_AMD_COMMON_FSP_PCI # TODO: Check if this is still correct
Fred Reitbergereb594932023-01-11 15:12:21 -050078 select SOC_AMD_COMMON_FSP_PRELOAD_FSPS
Martin Rothf95a11e2022-10-21 16:43:08 -060079 select SSE2
80 select UDK_2017_BINDING
Martin Rothbcb610a2022-10-29 13:31:54 -060081 select USE_DDR5
Martin Rothf95a11e2022-10-21 16:43:08 -060082 select USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
83 select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
84 select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
85 select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK
86 select X86_AMD_FIXED_MTRRS
87 select X86_INIT_NEED_1_SIPI
Elyes Haouas3cd06cc2023-01-05 07:42:24 +010088 help
89 AMD Glinda support
90
91if SOC_AMD_GLINDA
Martin Rothf95a11e2022-10-21 16:43:08 -060092
Martin Rothf95a11e2022-10-21 16:43:08 -060093config CHIPSET_DEVICETREE
94 string
95 default "soc/amd/glinda/chipset.cb"
96
97config EARLY_RESERVED_DRAM_BASE
98 hex
99 default 0x2000000
100 help
101 This variable defines the base address of the DRAM which is reserved
102 for usage by coreboot in early stages (i.e. before ramstage is up).
103 This memory gets reserved in BIOS tables to ensure that the OS does
104 not use it, thus preventing corruption of OS memory in case of S3
105 resume.
106
107config EARLYRAM_BSP_STACK_SIZE
108 hex
109 default 0x1000
110
111config PSP_APOB_DRAM_ADDRESS
112 hex
113 default 0x2001000
114 help
115 Location in DRAM where the PSP will copy the AGESA PSP Output
116 Block.
117
118config PSP_APOB_DRAM_SIZE
119 hex
120 default 0x1E000
121
122config PSP_SHAREDMEM_BASE
123 hex
124 default 0x201F000 if VBOOT
125 default 0x0
126 help
127 This variable defines the base address in DRAM memory where PSP copies
128 the vboot workbuf. This is used in the linker script to have a static
129 allocation for the buffer as well as for adding relevant entries in
130 the BIOS directory table for the PSP.
131
132config PSP_SHAREDMEM_SIZE
133 hex
134 default 0x8000 if VBOOT
135 default 0x0
136 help
137 Sets the maximum size for the PSP to pass the vboot workbuf and
138 any logs or timestamps back to coreboot. This will be copied
139 into main memory by the PSP and will be available when the x86 is
140 started. The workbuf's base depends on the address of the reset
141 vector.
142
143config PRE_X86_CBMEM_CONSOLE_SIZE
144 hex
145 default 0x1600
146 help
147 Size of the CBMEM console used in PSP verstage.
148
149config PRERAM_CBMEM_CONSOLE_SIZE
150 hex
151 default 0x1600
152 help
153 Increase this value if preram cbmem console is getting truncated
154
155config CBFS_MCACHE_SIZE
156 hex
157 default 0x2000 if VBOOT_STARTS_BEFORE_BOOTBLOCK
158
159config C_ENV_BOOTBLOCK_SIZE
160 hex
161 default 0x10000
162 help
163 Sets the size of the bootblock stage that should be loaded in DRAM.
164 This variable controls the DRAM allocation size in linker script
165 for bootblock stage.
166
167config ROMSTAGE_ADDR
168 hex
169 default 0x2040000
170 help
171 Sets the address in DRAM where romstage should be loaded.
172
173config ROMSTAGE_SIZE
174 hex
175 default 0x80000
176 help
177 Sets the size of DRAM allocation for romstage in linker script.
178
179config FSP_M_ADDR
180 hex
181 default 0x20C0000
182 help
183 Sets the address in DRAM where FSP-M should be loaded. cbfstool
184 performs relocation of FSP-M to this address.
185
186config FSP_M_SIZE
187 hex
188 default 0xC0000
189 help
190 Sets the size of DRAM allocation for FSP-M in linker script.
191
192config FSP_TEMP_RAM_SIZE
193 hex
194 default 0x40000
195 help
196 The amount of coreboot-allocated heap and stack usage by the FSP.
197
198config VERSTAGE_ADDR
199 hex
200 depends on VBOOT_SEPARATE_VERSTAGE
201 default 0x2180000
202 help
203 Sets the address in DRAM where verstage should be loaded if running
204 as a separate stage on x86.
205
206config VERSTAGE_SIZE
207 hex
208 depends on VBOOT_SEPARATE_VERSTAGE
209 default 0x80000
210 help
211 Sets the size of DRAM allocation for verstage in linker script if
212 running as a separate stage on x86.
213
214config ASYNC_FILE_LOADING
215 bool "Loads files from SPI asynchronously"
216 select COOP_MULTITASKING
217 select SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
218 select CBFS_PRELOAD
219 help
220 When enabled, the platform will use the LPC SPI DMA controller to
221 asynchronously load contents from the SPI ROM. This will improve
222 boot time because the CPUs can be performing useful work while the
223 SPI contents are being preloaded.
224
225config CBFS_CACHE_SIZE
226 hex
227 default 0x40000 if CBFS_PRELOAD
228
229config RO_REGION_ONLY
230 string
231 depends on VBOOT_SLOTS_RW_AB || VBOOT_SLOTS_RW_A
232 default "apu/amdfw"
233
234config ECAM_MMCONF_BASE_ADDRESS
235 default 0xF8000000
236
237config ECAM_MMCONF_BUS_NUMBER
238 default 64
239
240config MAX_CPUS
241 int
242 default 8 if SOC_AMD_GLINDA
243 default 16
244 help
245 Maximum number of threads the platform can have.
246
247config CONSOLE_UART_BASE_ADDRESS
248 depends on CONSOLE_SERIAL && AMD_SOC_CONSOLE_UART
249 hex
250 default 0xfedc9000 if UART_FOR_CONSOLE = 0
251 default 0xfedca000 if UART_FOR_CONSOLE = 1
252 default 0xfedce000 if UART_FOR_CONSOLE = 2
253 default 0xfedcf000 if UART_FOR_CONSOLE = 3
254 default 0xfedd1000 if UART_FOR_CONSOLE = 4
255
256config SMM_TSEG_SIZE
257 hex
258 default 0x800000 if HAVE_SMI_HANDLER
259 default 0x0
260
261config SMM_RESERVED_SIZE
262 hex
263 default 0x180000
264
265config SMM_MODULE_STACK_SIZE
266 hex
267 default 0x800
268
269config ACPI_BERT
270 bool "Build ACPI BERT Table"
271 default y
272 depends on HAVE_ACPI_TABLES
273 help
274 Report Machine Check errors identified in POST to the OS in an
275 ACPI Boot Error Record Table.
276
277config ACPI_BERT_SIZE
278 hex
279 default 0x4000 if ACPI_BERT
280 default 0x0
281 help
282 Specify the amount of DRAM reserved for gathering the data used to
283 generate the ACPI table.
284
285config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
286 int
287 default 150
288
289config DISABLE_SPI_FLASH_ROM_SHARING
290 def_bool n
291 help
292 Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
293 which indicates a board level ROM transaction request. This
294 removes arbitration with board and assumes the chipset controls
295 the SPI flash bus entirely.
296
297config DISABLE_KEYBOARD_RESET_PIN
298 bool
299 help
Martin Roth9ceac742023-02-08 14:26:02 -0700300 Instruct the SoC to not to reset based on the state of GPIO_21, KBDRST_L.
Martin Rothf95a11e2022-10-21 16:43:08 -0600301
Martin Rothf95a11e2022-10-21 16:43:08 -0600302menu "PSP Configuration Options"
303
Martin Rothf95a11e2022-10-21 16:43:08 -0600304config AMDFW_CONFIG_FILE
305 string "AMD PSP Firmware config file"
306 default "src/soc/amd/glinda/fw.cfg"
307 help
308 Specify the path/location of AMD PSP Firmware config file.
309
310config PSP_DISABLE_POSTCODES
311 bool "Disable PSP post codes"
312 help
313 Disables the output of port80 post codes from PSP.
314
315config PSP_POSTCODES_ON_ESPI
316 bool "Use eSPI bus for PSP post codes"
317 default y
318 depends on !PSP_DISABLE_POSTCODES
319 help
320 Select to send PSP port80 post codes on eSPI bus.
321 If not selected, PSP port80 codes will be sent on LPC bus.
322
323config PSP_LOAD_MP2_FW
324 bool
325 default n
326 help
327 Include the MP2 firmwares and configuration into the PSP build.
328
329 If unsure, answer 'n'
330
331config PSP_UNLOCK_SECURE_DEBUG
332 bool "Unlock secure debug"
333 default y
334 help
335 Select this item to enable secure debug options in PSP.
336
337config HAVE_PSP_WHITELIST_FILE
338 bool "Include a debug whitelist file in PSP build"
339 default n
340 help
341 Support secured unlock prior to reset using a whitelisted
342 serial number. This feature requires a signed whitelist image
343 and bootloader from AMD.
344
345 If unsure, answer 'n'
346
347config PSP_WHITELIST_FILE
348 string "Debug whitelist file path"
349 depends on HAVE_PSP_WHITELIST_FILE
350 default "site-local/3rdparty/amd_blobs/glinda/PSP/wtl-mrg.sbin"
351
Felix Held4ab1db82023-09-28 19:54:55 +0200352config PERFORM_SPL_FUSING
353 bool "Send SPL fuse command to PSP"
Martin Rothf95a11e2022-10-21 16:43:08 -0600354 default n
355 help
Felix Held4ab1db82023-09-28 19:54:55 +0200356 Send the Security Patch Level (SPL) fusing command to the PSP in
357 order to update the minimum SPL version to be written to the SoC's
358 fuse bits. This will prevent using any embedded firmware components
359 with lower SPL version.
Martin Rothf95a11e2022-10-21 16:43:08 -0600360
361 If unsure, answer 'n'
362
363config SPL_TABLE_FILE
Felix Held4ab1db82023-09-28 19:54:55 +0200364 string "SPL table file override"
365 help
366 Provide a mainboard-specific Security Patch Level (SPL) table file
367 override. The SPL file is required to support PSP FW anti-rollback
368 and needs to be created by AMD. The default SPL file specified in the
369 SoC's fw.cfg is in the corresponding folder of the amd_blobs submodule
370 and applies to all boards that use the SoC without verstage on PSP.
371 In the verstage on PSP case, a different SPL file is specific as an
372 override via this Kconfig option.
Martin Rothf95a11e2022-10-21 16:43:08 -0600373
374config HAVE_SPL_RW_AB_FILE
375 bool "Have a separate mainboard-specific SPL file in RW A/B partitions"
376 default n
Martin Rothf95a11e2022-10-21 16:43:08 -0600377 depends on VBOOT_SLOTS_RW_AB
378 help
379 Have separate mainboard-specific Security Patch Level (SPL) table
Felix Held4ab1db82023-09-28 19:54:55 +0200380 file for the RW A/B FMAP partitions.
Martin Rothf95a11e2022-10-21 16:43:08 -0600381
382config SPL_RW_AB_TABLE_FILE
Felix Held4ab1db82023-09-28 19:54:55 +0200383 string "Separate SPL table file override for RW A/B partitions"
Martin Rothf95a11e2022-10-21 16:43:08 -0600384
385config PSP_SOFTFUSE_BITS
386 string "PSP Soft Fuse bits to enable"
387 default "34 28 6"
388 help
389 Space separated list of Soft Fuse bits to enable.
390 Bit 0: Enable secure debug (Set by PSP_UNLOCK_SECURE_DEBUG)
391 Bit 7: Disable PSP postcodes on Renoir and newer chips only
392 (Set by PSP_DISABLE_PORT80)
393 Bit 15: PSP debug output destination:
394 0=SoC MMIO UART, 1=IO port 0x3F8
395 Bit 29: Disable MP2 firmware loading (Set by PSP_LOAD_MP2_FW)
396
397 See #55758 (NDA) for additional bit definitions.
398
399config PSP_VERSTAGE_FILE
400 string "Specify the PSP_verstage file path"
401 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
402 default "\$(obj)/psp_verstage.bin"
403 help
404 Add psp_verstage file to the build & PSP Directory Table
405
406config PSP_VERSTAGE_SIGNING_TOKEN
407 string "Specify the PSP_verstage Signature Token file path"
408 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
409 default ""
410 help
411 Add psp_verstage signature token to the build & PSP Directory Table
412
413endmenu
414
415config VBOOT
416 select VBOOT_VBNV_CMOS
417 select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
418
419config VBOOT_STARTS_BEFORE_BOOTBLOCK
420 def_bool n
421 depends on VBOOT
422 select ARCH_VERSTAGE_ARMV7
423 help
424 Runs verstage on the PSP. Only available on
425 certain ChromeOS branded parts from AMD.
426
427config VBOOT_HASH_BLOCK_SIZE
428 hex
429 default 0x9000
430 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
431 help
432 Because the bulk of the time in psp_verstage to hash the RO cbfs is
433 spent in the overhead of doing svc calls, increasing the hash block
434 size significantly cuts the verstage hashing time as seen below.
435
436 4k takes 180ms
437 16k takes 44ms
438 32k takes 33.7ms
439 36k takes 32.5ms
440 There's actually still room for an even bigger stack, but we've
441 reached a point of diminishing returns.
442
443config CMOS_RECOVERY_BYTE
444 hex
445 default 0x51
446 depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
447 help
448 If the workbuf is not passed from the PSP to coreboot, set the
449 recovery flag and reboot. The PSP will read this byte, mark the
450 recovery request in VBNV, and reset the system into recovery mode.
451
452 This is the byte before the default first byte used by VBNV
453 (0x26 + 0x0E - 1)
454
455if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
456
457config RWA_REGION_ONLY
458 string
459 default "apu/amdfw_a"
460 help
461 Add a space-delimited list of filenames that should only be in the
462 RW-A section.
463
464config RWB_REGION_ONLY
465 string
466 default "apu/amdfw_b"
467 help
468 Add a space-delimited list of filenames that should only be in the
469 RW-B section.
470
471endif # VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
472
Felix Held431c0b42023-08-10 20:40:29 +0200473endif # SOC_AMD_GLINDA