Debian Codegraph @

src/soc/amd/glinda/Kconfig

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