drivers/fsp/fsp2_0: Rework FSP Notify Phase API configs
[coreboot.git] / src / soc / amd / cezanne / Kconfig
blob81cf9748c622707cd6f1dc9e73a083d1b6967c3e
1 # SPDX-License-Identifier: GPL-2.0-only
3 config SOC_AMD_CEZANNE
4         bool
5         help
6           AMD Cezanne support
8 if SOC_AMD_CEZANNE
10 config SOC_SPECIFIC_OPTIONS
11         def_bool y
12         select ACPI_SOC_NVS
13         select ARCH_BOOTBLOCK_X86_32
14         select ARCH_VERSTAGE_X86_32 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
15         select ARCH_ROMSTAGE_X86_32
16         select ARCH_RAMSTAGE_X86_32
17         select ARCH_X86
18         select BOOT_DEVICE_SUPPORTS_WRITES if BOOT_DEVICE_SPI_FLASH
19         select DRIVERS_USB_ACPI
20         select DRIVERS_I2C_DESIGNWARE
21         select DRIVERS_USB_PCI_XHCI
22         select FSP_COMPRESS_FSP_M_LZMA if !ASYNC_FILE_LOADING
23         select FSP_COMPRESS_FSP_M_LZ4 if ASYNC_FILE_LOADING
24         select FSP_COMPRESS_FSP_S_LZ4
25         select GENERIC_GPIO_LIB
26         select HAVE_ACPI_TABLES
27         select HAVE_CF9_RESET
28         select HAVE_EM100_SUPPORT
29         select HAVE_FSP_GOP
30         select HAVE_SMI_HANDLER
31         select IDT_IN_EVERY_STAGE
32         select PARALLEL_MP_AP_WORK
33         select PLATFORM_USES_FSP2_0
34         select PROVIDES_ROM_SHARING
35         select PSP_VERSTAGE_CCP_DMA if VBOOT_STARTS_BEFORE_BOOTBLOCK
36         select RESET_VECTOR_IN_RAM
37         select RTC
38         select SOC_AMD_COMMON
39         select SOC_AMD_COMMON_BLOCK_ACP_GEN1
40         select SOC_AMD_COMMON_BLOCK_ACPI
41         select SOC_AMD_COMMON_BLOCK_ACPIMMIO
42         select SOC_AMD_COMMON_BLOCK_ACPI_ALIB
43         select SOC_AMD_COMMON_BLOCK_ACPI_GPIO
44         select SOC_AMD_COMMON_BLOCK_ACPI_IVRS
45         select SOC_AMD_COMMON_BLOCK_AOAC
46         select SOC_AMD_COMMON_BLOCK_APOB
47         select SOC_AMD_COMMON_BLOCK_BANKED_GPIOS
48         select SOC_AMD_COMMON_BLOCK_DATA_FABRIC
49         select SOC_AMD_COMMON_BLOCK_GRAPHICS
50         select SOC_AMD_COMMON_BLOCK_HAS_ESPI
51         select SOC_AMD_COMMON_BLOCK_I2C
52         select SOC_AMD_COMMON_BLOCK_I2C_PAD_CTRL
53         select SOC_AMD_COMMON_BLOCK_IOMMU
54         select SOC_AMD_COMMON_BLOCK_LPC
55         select SOC_AMD_COMMON_BLOCK_MCAX
56         select SOC_AMD_COMMON_BLOCK_NONCAR
57         select SOC_AMD_COMMON_BLOCK_PCI
58         select SOC_AMD_COMMON_BLOCK_PCI_MMCONF
59         select SOC_AMD_COMMON_BLOCK_PCIE_GPP_DRIVER
60         select SOC_AMD_COMMON_BLOCK_PM
61         select SOC_AMD_COMMON_BLOCK_PM_CHIPSET_STATE_SAVE
62         select SOC_AMD_COMMON_BLOCK_PSP_GEN2
63         select SOC_AMD_COMMON_BLOCK_SMBUS
64         select SOC_AMD_COMMON_BLOCK_SMI
65         select SOC_AMD_COMMON_BLOCK_SMM
66         select SOC_AMD_COMMON_BLOCK_SMU
67         select SOC_AMD_COMMON_BLOCK_SPI
68         select SOC_AMD_COMMON_BLOCK_TSC_FAM17H_19H
69         select SOC_AMD_COMMON_BLOCK_UART
70         select SOC_AMD_COMMON_BLOCK_UCODE
71         select SOC_AMD_COMMON_FSP_DMI_TABLES
72         select SOC_AMD_COMMON_FSP_PCI
73         select SSE2
74         select UDK_2017_BINDING
75         select USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
76         select USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
77         select USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
78         select VBOOT_DEFINE_WIDEVINE_COUNTERS if VBOOT_STARTS_BEFORE_BOOTBLOCK
79         select X86_AMD_FIXED_MTRRS
80         select X86_INIT_NEED_1_SIPI
82 config ARCH_ALL_STAGES_X86
83         default n
85 config SOC_AMD_COMMON_BLOCK_UCODE_SIZE
86         default 5568
88 config CHIPSET_DEVICETREE
89         string
90         default "soc/amd/cezanne/chipset.cb"
92 config EARLY_RESERVED_DRAM_BASE
93         hex
94         default 0x2000000
95         help
96           This variable defines the base address of the DRAM which is reserved
97           for usage by coreboot in early stages (i.e. before ramstage is up).
98           This memory gets reserved in BIOS tables to ensure that the OS does
99           not use it, thus preventing corruption of OS memory in case of S3
100           resume.
102 config EARLYRAM_BSP_STACK_SIZE
103         hex
104         default 0x1000
106 config PSP_APOB_DRAM_ADDRESS
107         hex
108         default 0x2001000
109         help
110           Location in DRAM where the PSP will copy the AGESA PSP Output
111           Block.
113 config PSP_SHAREDMEM_BASE
114         hex
115         default 0x2011000 if VBOOT
116         default 0x0
117         help
118           This variable defines the base address in DRAM memory where PSP copies
119           the vboot workbuf. This is used in the linker script to have a static
120           allocation for the buffer as well as for adding relevant entries in
121           the BIOS directory table for the PSP.
123 config PSP_SHAREDMEM_SIZE
124         hex
125         default 0x8000 if VBOOT
126         default 0x0
127         help
128           Sets the maximum size for the PSP to pass the vboot workbuf and
129           any logs or timestamps back to coreboot.  This will be copied
130           into main memory by the PSP and will be available when the x86 is
131           started.  The workbuf's base depends on the address of the reset
132           vector.
134 config PRE_X86_CBMEM_CONSOLE_SIZE
135         hex
136         default 0x1600
137         help
138           Size of the CBMEM console used in PSP verstage.
140 config PRERAM_CBMEM_CONSOLE_SIZE
141         hex
142         default 0x2000
143         help
144           Increase this value if preram cbmem console is getting truncated
146 config CBFS_MCACHE_SIZE
147         hex
148         default 0x2000 if VBOOT_STARTS_BEFORE_BOOTBLOCK
150 config C_ENV_BOOTBLOCK_SIZE
151         hex
152         default 0x10000
153         help
154           Sets the size of the bootblock stage that should be loaded in DRAM.
155           This variable controls the DRAM allocation size in linker script
156           for bootblock stage.
158 config ROMSTAGE_ADDR
159         hex
160         default 0x2040000
161         help
162           Sets the address in DRAM where romstage should be loaded.
164 config ROMSTAGE_SIZE
165         hex
166         default 0x80000
167         help
168           Sets the size of DRAM allocation for romstage in linker script.
170 config FSP_M_ADDR
171         hex
172         default 0x20C0000
173         help
174           Sets the address in DRAM where FSP-M should be loaded. cbfstool
175           performs relocation of FSP-M to this address.
177 config FSP_M_SIZE
178         hex
179         default 0xC0000
180         help
181           Sets the size of DRAM allocation for FSP-M in linker script.
183 config FSP_TEMP_RAM_SIZE
184         hex
185         default 0x40000
186         help
187           The amount of coreboot-allocated heap and stack usage by the FSP.
189 config VERSTAGE_ADDR
190         hex
191         depends on VBOOT_SEPARATE_VERSTAGE
192         default 0x2180000
193         help
194           Sets the address in DRAM where verstage should be loaded if running
195           as a separate stage on x86.
197 config VERSTAGE_SIZE
198         hex
199         depends on VBOOT_SEPARATE_VERSTAGE
200         default 0x80000
201         help
202           Sets the size of DRAM allocation for verstage in linker script if
203           running as a separate stage on x86.
205 config ASYNC_FILE_LOADING
206         bool "Loads files from SPI asynchronously"
207         select COOP_MULTITASKING
208         select SOC_AMD_COMMON_BLOCK_LPC_SPI_DMA
209         select CBFS_PRELOAD
210         help
211           When enabled, the platform will use the LPC SPI DMA controller to
212           asynchronously load contents from the SPI ROM. This will improve
213           boot time because the CPUs can be performing useful work while the
214           SPI contents are being preloaded.
216 config CBFS_CACHE_SIZE
217         hex
218         default 0x40000 if CBFS_PRELOAD
220 config RAMBASE
221         hex
222         default 0x10000000
224 config RO_REGION_ONLY
225         string
226         depends on VBOOT_SLOTS_RW_AB || VBOOT_SLOTS_RW_A
227         default "apu/amdfw"
229 config ECAM_MMCONF_BASE_ADDRESS
230         default 0xF8000000
232 config ECAM_MMCONF_BUS_NUMBER
233         default 64
235 config MAX_CPUS
236         int
237         default 16
238         help
239           Maximum number of threads the platform can have.
241 config CONSOLE_UART_BASE_ADDRESS
242         depends on CONSOLE_SERIAL && AMD_SOC_CONSOLE_UART
243         hex
244         default 0xfedc9000 if UART_FOR_CONSOLE = 0
245         default 0xfedca000 if UART_FOR_CONSOLE = 1
247 config SMM_TSEG_SIZE
248         hex
249         default 0x800000 if HAVE_SMI_HANDLER
250         default 0x0
252 config SMM_RESERVED_SIZE
253         hex
254         default 0x180000
256 config SMM_MODULE_STACK_SIZE
257         hex
258         default 0x800
260 config ACPI_BERT
261         bool "Build ACPI BERT Table"
262         default y
263         depends on HAVE_ACPI_TABLES
264         help
265           Report Machine Check errors identified in POST to the OS in an
266           ACPI Boot Error Record Table.
268 config ACPI_BERT_SIZE
269         hex
270         default 0x4000 if ACPI_BERT
271         default 0x0
272         help
273           Specify the amount of DRAM reserved for gathering the data used to
274           generate the ACPI table.
276 config DRIVERS_I2C_DESIGNWARE_CLOCK_MHZ
277         int
278         default 150
280 config DISABLE_SPI_FLASH_ROM_SHARING
281         def_bool n
282         help
283           Instruct the chipset to not honor the EGPIO67_SPI_ROM_REQ pin
284           which indicates a board level ROM transaction request. This
285           removes arbitration with board and assumes the chipset controls
286           the SPI flash bus entirely.
288 config DISABLE_KEYBOARD_RESET_PIN
289         bool
290         help
291           Instruct the SoC to not use the state of GPIO_129 as keyboard reset
292           signal. When this pin is used as GPIO and the keyboard reset
293           functionality isn't disabled, configuring it as an output and driving
294           it as 0 will cause a reset.
296 config ACPI_SSDT_PSD_INDEPENDENT
297         bool "Allow core p-state independent transitions"
298         default y
299         help
300           AMD recommends the ACPI _PSD object to be configured to cause
301           cores to transition between p-states independently. A vendor may
302           choose to generate _PSD object to allow cores to transition together.
304 menu "PSP Configuration Options"
306 config AMD_FWM_POSITION_INDEX
307         int "Firmware Directory Table location (0 to 5)"
308         range 0 5
309         default 0 if BOARD_ROMSIZE_KB_512
310         default 1 if BOARD_ROMSIZE_KB_1024
311         default 2 if BOARD_ROMSIZE_KB_2048
312         default 3 if BOARD_ROMSIZE_KB_4096
313         default 4 if BOARD_ROMSIZE_KB_8192
314         default 5 if BOARD_ROMSIZE_KB_16384
315         help
316           Typically this is calculated by the ROM size, but there may
317           be situations where you want to put the firmware directory
318           table in a different location.
319             0: 512 KB - 0xFFFA0000
320             1: 1 MB   - 0xFFF20000
321             2: 2 MB   - 0xFFE20000
322             3: 4 MB   - 0xFFC20000
323             4: 8 MB   - 0xFF820000
324             5: 16 MB  - 0xFF020000
326 comment "AMD Firmware Directory Table set to location for 512KB ROM"
327         depends on AMD_FWM_POSITION_INDEX = 0
328 comment "AMD Firmware Directory Table set to location for 1MB ROM"
329         depends on AMD_FWM_POSITION_INDEX = 1
330 comment "AMD Firmware Directory Table set to location for 2MB ROM"
331         depends on AMD_FWM_POSITION_INDEX = 2
332 comment "AMD Firmware Directory Table set to location for 4MB ROM"
333         depends on AMD_FWM_POSITION_INDEX = 3
334 comment "AMD Firmware Directory Table set to location for 8MB ROM"
335         depends on AMD_FWM_POSITION_INDEX = 4
336 comment "AMD Firmware Directory Table set to location for 16MB ROM"
337         depends on AMD_FWM_POSITION_INDEX = 5
339 config AMDFW_CONFIG_FILE
340         string
341         default "src/soc/amd/cezanne/fw.cfg"
343 config PSP_DISABLE_POSTCODES
344         bool "Disable PSP post codes"
345         help
346           Disables the output of port80 post codes from PSP.
348 config PSP_INIT_ESPI
349         bool "Initialize eSPI in PSP Stage 2 Boot Loader"
350         help
351           Select to initialize the eSPI controller in the PSP Stage 2 Boot
352           Loader.
354 config PSP_LOAD_MP2_FW
355         bool
356         default n
357         help
358           Include the MP2 firmwares and configuration into the PSP build.
360           If unsure, answer 'n'
362 config PSP_UNLOCK_SECURE_DEBUG
363         bool "Unlock secure debug"
364         default y
365         help
366           Select this item to enable secure debug options in PSP.
368 config HAVE_PSP_WHITELIST_FILE
369         bool "Include a debug whitelist file in PSP build"
370         default n
371         help
372           Support secured unlock prior to reset using a whitelisted
373           serial number. This feature requires a signed whitelist image
374           and bootloader from AMD.
376           If unsure, answer 'n'
378 config PSP_WHITELIST_FILE
379         string "Debug whitelist file path"
380         depends on HAVE_PSP_WHITELIST_FILE
381         default "3rdparty/amd_blobs/cezanne/PSP/wtl-czn.sbin"
383 config HAVE_SPL_FILE
384         bool "Have a mainboard specific SPL table file"
385         default n
386         help
387           Have a mainboard specific SPL table file, which is created by AMD
388           and put to 3rdparty/blobs.
390           If unsure, answer 'n'
392 config SPL_TABLE_FILE
393         string "SPL table file"
394         depends on HAVE_SPL_FILE
395         default "3rdparty/amd_blobs/cezanne/PSP/TypeId0x55_SplTableBl_CZN.sbin"
397 config PSP_SOFTFUSE_BITS
398         string "PSP Soft Fuse bits to enable"
399         default "28 6"
400         help
401           Space separated list of Soft Fuse bits to enable.
402           Bit 0:  Enable secure debug (Set by PSP_UNLOCK_SECURE_DEBUG)
403           Bit 7:  Disable PSP postcodes on Renoir and newer chips only
404                   (Set by PSP_DISABLE_PORT80)
405           Bit 15: PSP post code destination: 0=LPC 1=eSPI
406                   (Set by PSP_INITIALIZE_ESPI)
407           Bit 29: Disable MP2 firmware loading (Set by PSP_LOAD_MP2_FW)
409           See #55758 (NDA) for additional bit definitions.
411 config PSP_VERSTAGE_FILE
412         string "Specify the PSP_verstage file path"
413         depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
414         default "\$(obj)/psp_verstage.bin"
415         help
416           Add psp_verstage file to the build & PSP Directory Table
418 config PSP_VERSTAGE_SIGNING_TOKEN
419         string "Specify the PSP_verstage Signature Token file path"
420         depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
421         default ""
422         help
423           Add psp_verstage signature token to the build & PSP Directory Table
425 endmenu
427 config VBOOT
428         select VBOOT_VBNV_CMOS
429         select VBOOT_VBNV_CMOS_BACKUP_TO_FLASH
431 config VBOOT_STARTS_BEFORE_BOOTBLOCK
432         def_bool n
433         depends on VBOOT
434         select ARCH_VERSTAGE_ARMV7
435         help
436           Runs verstage on the PSP.  Only available on
437           certain Chrome OS branded parts from AMD.
439 config VBOOT_HASH_BLOCK_SIZE
440         hex
441         default 0x9000
442         depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
443         help
444           Because the bulk of the time in psp_verstage to hash the RO cbfs is
445           spent in the overhead of doing svc calls, increasing the hash block
446           size significantly cuts the verstage hashing time as seen below.
448           4k takes 180ms
449           16k takes 44ms
450           32k takes 33.7ms
451           36k takes 32.5ms
452           There's actually still room for an even bigger stack, but we've
453           reached a point of diminishing returns.
455 config CMOS_RECOVERY_BYTE
456         hex
457         default 0x51
458         depends on VBOOT_STARTS_BEFORE_BOOTBLOCK
459         help
460           If the workbuf is not passed from the PSP to coreboot, set the
461           recovery flag and reboot.  The PSP will read this byte, mark the
462           recovery request in VBNV, and reset the system into recovery mode.
464           This is the byte before the default first byte used by VBNV
465           (0x26 + 0x0E - 1)
467 if VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
469 config RWA_REGION_ONLY
470         string
471         default "apu/amdfw_a"
472         help
473           Add a space-delimited list of filenames that should only be in the
474           RW-A section.
476 config RWB_REGION_ONLY
477         string
478         default "apu/amdfw_b"
479         help
480           Add a space-delimited list of filenames that should only be in the
481           RW-B section.
483 endif # VBOOT_SLOTS_RW_AB && VBOOT_STARTS_BEFORE_BOOTBLOCK
485 endif # SOC_AMD_CEZANNE