blob: 3f97644567304fa961382be361a9256f4357a946 [file] [log] [blame]
Patrick Georgi11f00792020-03-04 15:10:45 +01001## SPDX-License-Identifier: GPL-2.0-only
Stefan Reinauer425b61e2015-03-15 04:29:35 +01002
Stefan Reinauera48ca842015-04-04 01:58:28 +02003config ARCH_X86
4 bool
Stefan Reinauera48ca842015-04-04 01:58:28 +02005 select PCI
Kyösti Mälkkiec151f02018-06-03 22:48:51 +03006 select RELOCATABLE_MODULES
Harshit Sharma65bec1c2020-08-05 22:25:27 -07007 select HAVE_ASAN_IN_RAMSTAGE
Elyes Haouasb6efe172024-03-03 17:41:34 +01008 select ARCH_SUPPORTS_CLANG
Stefan Reinauera48ca842015-04-04 01:58:28 +02009
Angel Pons8e035e32021-06-22 12:58:20 +020010if ARCH_X86
11
Stefan Reinauer68671202015-03-15 04:34:03 +010012# stage selectors for x86
13
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070014config ARCH_BOOTBLOCK_X86_32
Gabe Black5fbfc912013-07-07 13:52:37 -070015 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070016
Stefan Reinauer77b16552015-01-14 19:51:47 +010017config ARCH_VERSTAGE_X86_32
18 bool
Stefan Reinauer77b16552015-01-14 19:51:47 +010019
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070020config ARCH_ROMSTAGE_X86_32
21 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070022
Patrick Georgi29eeece2018-10-31 14:24:47 +010023config ARCH_POSTCAR_X86_32
24 bool
25 default ARCH_ROMSTAGE_X86_32 && POSTCAR_STAGE
26
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070027config ARCH_RAMSTAGE_X86_32
28 bool
Gabe Black5fbfc912013-07-07 13:52:37 -070029
Angel Ponsa32df262020-09-25 10:20:11 +020030config ARCH_ALL_STAGES_X86_32
31 bool
Arthur Heymans6e857402022-11-12 16:16:02 +010032 default !ARCH_ALL_STAGES_X86_64
Angel Ponsa32df262020-09-25 10:20:11 +020033 select ARCH_BOOTBLOCK_X86_32
Arthur Heymans6e857402022-11-12 16:16:02 +010034 select ARCH_VERSTAGE_X86_32 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
Angel Ponsa32df262020-09-25 10:20:11 +020035 select ARCH_ROMSTAGE_X86_32
36 select ARCH_RAMSTAGE_X86_32
37
Stefan Reinauer68671202015-03-15 04:34:03 +010038# stage selectors for x64
39
40config ARCH_BOOTBLOCK_X86_64
41 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020042 select SSE2
Stefan Reinauer68671202015-03-15 04:34:03 +010043
44config ARCH_VERSTAGE_X86_64
45 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020046 select SSE2
Stefan Reinauer68671202015-03-15 04:34:03 +010047
48config ARCH_ROMSTAGE_X86_64
49 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020050 select SSE2
Stefan Reinauer68671202015-03-15 04:34:03 +010051
Patrick Georgi29eeece2018-10-31 14:24:47 +010052config ARCH_POSTCAR_X86_64
53 bool
54 default ARCH_ROMSTAGE_X86_64 && POSTCAR_STAGE
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020055 select SSE2
Patrick Georgi29eeece2018-10-31 14:24:47 +010056
Stefan Reinauer68671202015-03-15 04:34:03 +010057config ARCH_RAMSTAGE_X86_64
58 bool
Patrick Rudolphe249b1a2020-08-27 21:07:57 +020059 select SSE2
Arthur Heymansb86e96a2019-02-10 17:00:56 +010060
Angel Pons2db779072020-09-25 10:14:45 +020061config ARCH_ALL_STAGES_X86_64
62 bool
63 select ARCH_BOOTBLOCK_X86_64
Arthur Heymans6e857402022-11-12 16:16:02 +010064 select ARCH_VERSTAGE_X86_64 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
Angel Pons2db779072020-09-25 10:14:45 +020065 select ARCH_ROMSTAGE_X86_64
66 select ARCH_RAMSTAGE_X86_64
67
Angel Pons16fe5e12021-06-22 15:41:59 +020068config HAVE_EXP_X86_64_SUPPORT
69 bool
70 help
71 Enable experimental support to build and run coreboot in 64-bit mode.
72 When selecting this option for a new platform, it is highly advisable
73 to provide a config file for Jenkins to build-test the 64-bit option.
74
75config USE_EXP_X86_64_SUPPORT
76 bool "[EXPERIMENTAL] Run coreboot in long (64-bit) mode"
77 depends on HAVE_EXP_X86_64_SUPPORT
78 select ARCH_ALL_STAGES_X86_64
79 help
80 When set, most of coreboot runs in long (64-bit) mode instead of the
81 usual protected flat (32-bit) mode. 64-bit CPUs and OSes can be used
82 irrespective of whether coreboot runs in 32-bit or 64-bit mode. This
83 is an experimental option: do not enable unless one wants to test it
84 and has the means to recover a system when coreboot fails to boot.
85
Arthur Heymansee83be42024-02-02 18:49:53 +010086config PAGE_TABLES_IN_CBFS
87 bool
88 default n
89
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020090config ARCH_X86_64_PGTBL_LOC
91 hex "x86_64 page table location in CBFS"
Arthur Heymansee83be42024-02-02 18:49:53 +010092 depends on ARCH_BOOTBLOCK_X86_64 && PAGE_TABLES_IN_CBFS
Patrick Rudolph19a60a42019-11-30 09:40:52 +010093 default 0xfffe9000
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020094 help
95 The position where to place pagetables. Needs to be known at
96 compile time. Must not overlap other files in CBFS.
97
Felix Held3748fca2023-09-12 14:48:38 +020098config RESERVED_PHYSICAL_ADDRESS_BITS_SUPPORT
99 bool
100 help
101 On some systems, the upper physical address bits are reserved and
102 used as a tag which is typically related to a memory encryption
103 feature. When selecting this option, the SoC code needs to implement
104 get_reserved_phys_addr_bits so that the common code knows how many of
105 the most significant physical address bits are reserved and can't be
106 used as address bits.
107
Uwe Hermann168b11b2009-10-07 16:15:40 +0000108# This is an SMP option. It relates to starting up APs.
109# It is usually set in mainboard/*/Kconfig.
110# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +0200111config AP_IN_SIPI_WAIT
112 bool
113 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -0700114 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +0000115
Martin Roth8418fd42019-04-22 16:26:23 -0600116config RESET_VECTOR_IN_RAM
117 bool
118 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200119 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -0600120 help
Felix Heldca928c62020-04-04 01:47:37 +0200121 Select this option if the x86 processor's reset vector is in
122 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600123
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300124# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
125# can boot AP CPUs to enable their shared caches.
126config SIPI_VECTOR_IN_ROM
127 bool
128 default n
129 depends on ARCH_X86
130
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700131# Traditionally BIOS region on SPI flash boot media was memory mapped right below
132# 4G and it was the last region in the IFD. This way translation between CPU
133# address space to flash address was trivial. However some IFDs on newer SoCs
Raul E Rangele92a9822021-06-24 16:54:27 -0600134# have BIOS region sandwiched between descriptor and other regions. Turning on
135# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the
136# soc code to provide custom mmap_boot.c.
137config X86_CUSTOM_BOOTMEDIA
138 bool
139
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700140config X86_TOP4G_BOOTMEDIA_MAP
141 bool
Raul E Rangele92a9822021-06-24 16:54:27 -0600142 depends on !X86_CUSTOM_BOOTMEDIA
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700143 default y
144
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530145config PRERAM_CBMEM_CONSOLE_SIZE
146 hex
147 default 0xc00
148 help
149 Increase this value if preram cbmem console is getting truncated
150
Julius Wernerbaf27db2019-10-02 17:28:56 -0700151config CBFS_MCACHE_SIZE
152 hex
153 depends on !NO_CBFS_MCACHE
Julius Werner40acfe72021-05-12 15:59:58 -0700154 default 0x4000
Julius Wernerbaf27db2019-10-02 17:28:56 -0700155 help
Julius Werner40acfe72021-05-12 15:59:58 -0700156 Increase this value if you see CBFS mcache overflow warnings. Do NOT
157 change this value for vboot RW updates!
Julius Wernerbaf27db2019-10-02 17:28:56 -0700158
Jeremy Compostella052fb7c2023-08-18 14:25:22 -0700159config PRERAM_CBFS_CACHE_SIZE
160 hex
161 default 0x4000
162 help
163 Define the size of the Pre-RAM stages CBFS cache. A size of
164 zero disables the CBFS cache feature in pre-memory stages.
165
Jeremy Compostella226f51c2023-10-12 09:40:12 -0700166config POSTRAM_CBFS_CACHE_IN_BSS
167 bool
168 default y if !SOC_AMD_COMMON_BLOCK_NONCAR
169 help
170 Allocate the post-memory CBFS cache scratchpad in the .bss
171 section. CBFS cache will rely on a simple static C buffer
172 while traditionally CBFS cache memory region is reserved in
173 the device memory layout.
174
175config RAMSTAGE_CBFS_CACHE_SIZE
176 hex
177 default 0x4000
178 depends on POSTRAM_CBFS_CACHE_IN_BSS
179 help
180 Define the size of the ramstage CBFS cache. A size of zero
181 disables the CBFS cache feature in ramstage.
182
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000183config PC80_SYSTEM
184 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700185 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000186
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700187config BOOTBLOCK_DEBUG_SPINLOOP
188 bool
189 default n
190 help
191 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
192 for a JTAG debugger to break into the execution sequence.
193
Patrick Georgia865b172011-01-14 07:40:24 +0000194config HAVE_CMOS_DEFAULT
195 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700196 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000197
198config CMOS_DEFAULT_FILE
199 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200200 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000201 depends on HAVE_CMOS_DEFAULT
202
Felix Held4e037272022-02-23 16:35:58 +0100203config HPET_MIN_TICKS
204 hex
205
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600206config C_ENV_BOOTBLOCK_SIZE
207 hex
Kyösti Mälkkie76ce872020-05-25 08:52:07 +0300208 default 0x40000 if !FIXED_BOOTBLOCK_SIZE
209 help
210 This is only the default maximum of bootblock size for linking
211 purposes. Platforms may provide different limit and need to
212 specify this when FIXED_BOOTBLOCK_SIZE is selected.
Andrey Petrovccd300b2016-02-28 22:04:51 -0800213
Kyösti Mälkki49dbbe92019-12-21 10:17:56 +0200214config FIXED_BOOTBLOCK_SIZE
215 bool
216
Andrey Petrovccd300b2016-02-28 22:04:51 -0800217# Default address romstage is to be linked at
218config ROMSTAGE_ADDR
219 hex
220 default 0x2000000
221
222# Default address verstage is to be linked at
223config VERSTAGE_ADDR
224 hex
225 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500226
227# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200228# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500229config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300230 def_bool y
231 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200232 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700233
234config VERSTAGE_DEBUG_SPINLOOP
235 bool
236 default n
237 help
238 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
239 for a JTAG debugger to break into the execution sequence.
240
241config ROMSTAGE_DEBUG_SPINLOOP
242 bool
243 default n
244 help
245 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
246 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700247
248choice
249 prompt "Bootblock behaviour"
250 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200251 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700252
253config BOOTBLOCK_SIMPLE
254 bool "Always load fallback"
255
256config BOOTBLOCK_NORMAL
257 bool "Switch to normal if CMOS says so"
Arthur Heymans9bbfafb2024-02-18 14:02:35 +0100258 select CONFIGURABLE_CBFS_PREFIX
259 select SEPARATE_ROMSTAGE
Martin Roth408fda72016-12-15 16:04:55 -0700260
261endchoice
262
Martin Roth408fda72016-12-15 16:04:55 -0700263config SKIP_MAX_REBOOT_CNT_CLEAR
264 bool "Do not clear reboot count after successful boot"
265 depends on BOOTBLOCK_NORMAL
266 help
267 Do not clear the reboot count immediately after successful boot.
268 Set to allow the payload to control normal/fallback image recovery.
269 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100270 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600271
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700272config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100273 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600274 depends on HAVE_ACPI_TABLES
275 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700276 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700277
278config COLLECT_TIMESTAMPS_NO_TSC
279 bool
280 default n
281 depends on COLLECT_TIMESTAMPS
282 help
283 Use a non-TSC platform-dependent source for timestamps.
284
285config COLLECT_TIMESTAMPS_TSC
286 bool
287 default y if !COLLECT_TIMESTAMPS_NO_TSC
288 default n
289 depends on COLLECT_TIMESTAMPS
290 help
291 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600292
293config PAGING_IN_CACHE_AS_RAM
294 bool
295 default n
296 depends on ARCH_X86
297 help
298 Chipsets scan select this option to preallocate area in cache-as-ram
299 for storing paging data structures. PAE paging is currently the
300 only thing being supported.
301
302config NUM_CAR_PAGE_TABLE_PAGES
303 int
304 default 5
305 depends on PAGING_IN_CACHE_AS_RAM
306 help
307 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600308
309# Provide the interrupt handlers to every stage. Not all
310# stages may take advantage.
311config IDT_IN_EVERY_STAGE
312 bool
313 default n
314 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200315
316config HAVE_CF9_RESET
317 bool
318
319config HAVE_CF9_RESET_PREPARE
320 bool
321 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300322
Felix Held6759ad32023-12-14 20:49:59 +0100323config HAVE_CONFIGURABLE_APMC_SMI_PORT
324 bool
325 help
326 SoCs that have a configurable APMC SMI command port, should select
327 this option and implement pm_acpi_smi_cmd_port() that returns the IO
328 port.
329
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300330config PIRQ_ROUTE
331 bool
332 default n
333
334config MAX_PIRQ_LINKS
335 int
336 default 4
337 depends on PIRQ_ROUTE
338 help
339 This variable specifies the number of PIRQ interrupt links which are
340 routable. On most chipsets, this is 4, INTA through INTD. Some
341 chipsets offer more than four links, commonly up to INTH. They may
342 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
343 table specifies links greater than 4, pirq_route_irqs will not
344 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100345
Furquan Shaikh46514c22020-06-11 11:59:07 -0700346config MEMLAYOUT_LD_FILE
347 string
348 default "src/arch/x86/memlayout.ld"
349
Robert Zieba3f01cd12022-04-14 10:36:15 -0600350config DEBUG_HW_BREAKPOINTS
351 bool
352 default y
353 help
354 Enable support for hardware data and instruction breakpoints through
355 the x86 debug registers
356
357config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
358 bool
359 default y
360 depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE
361
362config DEBUG_NULL_DEREF_BREAKPOINTS
363 bool
364 default y
365 depends on DEBUG_HW_BREAKPOINTS
366 help
367 Enable support for catching null dereferences and instruction execution
368
369config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES
370 bool
371 default y
372 depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
373
374config DEBUG_NULL_DEREF_HALT
375 bool
376 default n
377 depends on DEBUG_NULL_DEREF_BREAKPOINTS
378 help
379 When enabled null dereferences and instruction fetches will halt execution.
380 Otherwise an error will be printed.
381
Bill XIEf0215b42021-03-20 21:06:11 +0800382# Some EC need an "EC firmware pointer" (a data structure hinting the address
383# of its firmware blobs) being put at a fixed position. Its space
384# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a
385# stage. Different EC may have different format and/or value for it. The actual
386# address of EC firmware pointer should be provided in the Kconfig of the EC
387# requiring it, and its value could be filled by linking a read-only global
388# data object to the section above.
389
390config ECFW_PTR_ADDR
391 hex
392 help
393 Address of reserved space for EC firmware pointer, which should not
394 overlap other data such as reset vector or FIT pointer if present.
395
396config ECFW_PTR_SIZE
397 int
398 help
399 Size of reserved space for EC firmware pointer
400
Eric Laic1ef4f32023-06-12 14:27:54 +0800401config DUMP_SMBIOS_TYPE17
Eric Lai8bbe8502023-06-26 07:56:39 +0800402 bool "Dump part of SMBIOS type17 dimm information"
Eric Laic1ef4f32023-06-12 14:27:54 +0800403 depends on GENERATE_SMBIOS_TABLES
404
Jeremy Compostellaba757a72023-12-20 09:07:04 -0800405config SOC_PHYSICAL_ADDRESS_WIDTH
406 int
407 default 0
408 help
409 On some System-on-Chip the physical address size available
410 at the SoC level may be different than at the CPU
411 level. This configuration can be use to set the physical
412 address width (in bits) of the SoC.
413
414 If not set, both CPU and SoC physical address width are
415 assume to be the same.
416
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100417endif