blob: 610321f9a07740ba672b81dfd61dfd4b8f449ed2 [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
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020086config ARCH_X86_64_PGTBL_LOC
87 hex "x86_64 page table location in CBFS"
88 depends on ARCH_BOOTBLOCK_X86_64
Patrick Rudolph19a60a42019-11-30 09:40:52 +010089 default 0xfffe9000
Patrick Rudolphb1ef7252019-09-28 17:44:01 +020090 help
91 The position where to place pagetables. Needs to be known at
92 compile time. Must not overlap other files in CBFS.
93
Felix Held3748fca2023-09-12 14:48:38 +020094config RESERVED_PHYSICAL_ADDRESS_BITS_SUPPORT
95 bool
96 help
97 On some systems, the upper physical address bits are reserved and
98 used as a tag which is typically related to a memory encryption
99 feature. When selecting this option, the SoC code needs to implement
100 get_reserved_phys_addr_bits so that the common code knows how many of
101 the most significant physical address bits are reserved and can't be
102 used as address bits.
103
Uwe Hermann168b11b2009-10-07 16:15:40 +0000104# This is an SMP option. It relates to starting up APs.
105# It is usually set in mainboard/*/Kconfig.
106# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +0200107config AP_IN_SIPI_WAIT
108 bool
109 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -0700110 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +0000111
Martin Roth8418fd42019-04-22 16:26:23 -0600112config RESET_VECTOR_IN_RAM
113 bool
114 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200115 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -0600116 help
Felix Heldca928c62020-04-04 01:47:37 +0200117 Select this option if the x86 processor's reset vector is in
118 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600119
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300120# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
121# can boot AP CPUs to enable their shared caches.
122config SIPI_VECTOR_IN_ROM
123 bool
124 default n
125 depends on ARCH_X86
126
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700127# Traditionally BIOS region on SPI flash boot media was memory mapped right below
128# 4G and it was the last region in the IFD. This way translation between CPU
129# address space to flash address was trivial. However some IFDs on newer SoCs
Raul E Rangele92a9822021-06-24 16:54:27 -0600130# have BIOS region sandwiched between descriptor and other regions. Turning on
131# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the
132# soc code to provide custom mmap_boot.c.
133config X86_CUSTOM_BOOTMEDIA
134 bool
135
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700136config X86_TOP4G_BOOTMEDIA_MAP
137 bool
Raul E Rangele92a9822021-06-24 16:54:27 -0600138 depends on !X86_CUSTOM_BOOTMEDIA
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700139 default y
140
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530141config PRERAM_CBMEM_CONSOLE_SIZE
142 hex
143 default 0xc00
144 help
145 Increase this value if preram cbmem console is getting truncated
146
Julius Wernerbaf27db2019-10-02 17:28:56 -0700147config CBFS_MCACHE_SIZE
148 hex
149 depends on !NO_CBFS_MCACHE
Julius Werner40acfe72021-05-12 15:59:58 -0700150 default 0x4000
Julius Wernerbaf27db2019-10-02 17:28:56 -0700151 help
Julius Werner40acfe72021-05-12 15:59:58 -0700152 Increase this value if you see CBFS mcache overflow warnings. Do NOT
153 change this value for vboot RW updates!
Julius Wernerbaf27db2019-10-02 17:28:56 -0700154
Jeremy Compostella052fb7c2023-08-18 14:25:22 -0700155config PRERAM_CBFS_CACHE_SIZE
156 hex
157 default 0x4000
158 help
159 Define the size of the Pre-RAM stages CBFS cache. A size of
160 zero disables the CBFS cache feature in pre-memory stages.
161
Jeremy Compostella226f51c2023-10-12 09:40:12 -0700162config POSTRAM_CBFS_CACHE_IN_BSS
163 bool
164 default y if !SOC_AMD_COMMON_BLOCK_NONCAR
165 help
166 Allocate the post-memory CBFS cache scratchpad in the .bss
167 section. CBFS cache will rely on a simple static C buffer
168 while traditionally CBFS cache memory region is reserved in
169 the device memory layout.
170
171config RAMSTAGE_CBFS_CACHE_SIZE
172 hex
173 default 0x4000
174 depends on POSTRAM_CBFS_CACHE_IN_BSS
175 help
176 Define the size of the ramstage CBFS cache. A size of zero
177 disables the CBFS cache feature in ramstage.
178
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000179config PC80_SYSTEM
180 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700181 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000182
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700183config BOOTBLOCK_DEBUG_SPINLOOP
184 bool
185 default n
186 help
187 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
188 for a JTAG debugger to break into the execution sequence.
189
Patrick Georgia865b172011-01-14 07:40:24 +0000190config HAVE_CMOS_DEFAULT
191 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700192 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000193
194config CMOS_DEFAULT_FILE
195 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200196 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000197 depends on HAVE_CMOS_DEFAULT
198
Felix Held4e037272022-02-23 16:35:58 +0100199config HPET_MIN_TICKS
200 hex
201
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600202config C_ENV_BOOTBLOCK_SIZE
203 hex
Kyösti Mälkkie76ce872020-05-25 08:52:07 +0300204 default 0x40000 if !FIXED_BOOTBLOCK_SIZE
205 help
206 This is only the default maximum of bootblock size for linking
207 purposes. Platforms may provide different limit and need to
208 specify this when FIXED_BOOTBLOCK_SIZE is selected.
Andrey Petrovccd300b2016-02-28 22:04:51 -0800209
Kyösti Mälkki49dbbe92019-12-21 10:17:56 +0200210config FIXED_BOOTBLOCK_SIZE
211 bool
212
Andrey Petrovccd300b2016-02-28 22:04:51 -0800213# Default address romstage is to be linked at
214config ROMSTAGE_ADDR
215 hex
216 default 0x2000000
217
218# Default address verstage is to be linked at
219config VERSTAGE_ADDR
220 hex
221 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500222
223# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200224# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500225config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300226 def_bool y
227 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200228 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700229
230config VERSTAGE_DEBUG_SPINLOOP
231 bool
232 default n
233 help
234 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
235 for a JTAG debugger to break into the execution sequence.
236
237config ROMSTAGE_DEBUG_SPINLOOP
238 bool
239 default n
240 help
241 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
242 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700243
244choice
245 prompt "Bootblock behaviour"
246 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200247 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700248
249config BOOTBLOCK_SIMPLE
250 bool "Always load fallback"
251
252config BOOTBLOCK_NORMAL
253 bool "Switch to normal if CMOS says so"
Arthur Heymans9bbfafb2024-02-18 14:02:35 +0100254 select CONFIGURABLE_CBFS_PREFIX
255 select SEPARATE_ROMSTAGE
Martin Roth408fda72016-12-15 16:04:55 -0700256
257endchoice
258
Martin Roth408fda72016-12-15 16:04:55 -0700259config SKIP_MAX_REBOOT_CNT_CLEAR
260 bool "Do not clear reboot count after successful boot"
261 depends on BOOTBLOCK_NORMAL
262 help
263 Do not clear the reboot count immediately after successful boot.
264 Set to allow the payload to control normal/fallback image recovery.
265 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100266 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600267
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700268config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100269 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600270 depends on HAVE_ACPI_TABLES
271 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700272 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700273
274config COLLECT_TIMESTAMPS_NO_TSC
275 bool
276 default n
277 depends on COLLECT_TIMESTAMPS
278 help
279 Use a non-TSC platform-dependent source for timestamps.
280
281config COLLECT_TIMESTAMPS_TSC
282 bool
283 default y if !COLLECT_TIMESTAMPS_NO_TSC
284 default n
285 depends on COLLECT_TIMESTAMPS
286 help
287 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600288
289config PAGING_IN_CACHE_AS_RAM
290 bool
291 default n
292 depends on ARCH_X86
293 help
294 Chipsets scan select this option to preallocate area in cache-as-ram
295 for storing paging data structures. PAE paging is currently the
296 only thing being supported.
297
298config NUM_CAR_PAGE_TABLE_PAGES
299 int
300 default 5
301 depends on PAGING_IN_CACHE_AS_RAM
302 help
303 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600304
305# Provide the interrupt handlers to every stage. Not all
306# stages may take advantage.
307config IDT_IN_EVERY_STAGE
308 bool
309 default n
310 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200311
312config HAVE_CF9_RESET
313 bool
314
315config HAVE_CF9_RESET_PREPARE
316 bool
317 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300318
Felix Held6759ad32023-12-14 20:49:59 +0100319config HAVE_CONFIGURABLE_APMC_SMI_PORT
320 bool
321 help
322 SoCs that have a configurable APMC SMI command port, should select
323 this option and implement pm_acpi_smi_cmd_port() that returns the IO
324 port.
325
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300326config PIRQ_ROUTE
327 bool
328 default n
329
330config MAX_PIRQ_LINKS
331 int
332 default 4
333 depends on PIRQ_ROUTE
334 help
335 This variable specifies the number of PIRQ interrupt links which are
336 routable. On most chipsets, this is 4, INTA through INTD. Some
337 chipsets offer more than four links, commonly up to INTH. They may
338 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
339 table specifies links greater than 4, pirq_route_irqs will not
340 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100341
Furquan Shaikh46514c22020-06-11 11:59:07 -0700342config MEMLAYOUT_LD_FILE
343 string
344 default "src/arch/x86/memlayout.ld"
345
Robert Zieba3f01cd12022-04-14 10:36:15 -0600346config DEBUG_HW_BREAKPOINTS
347 bool
348 default y
349 help
350 Enable support for hardware data and instruction breakpoints through
351 the x86 debug registers
352
353config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
354 bool
355 default y
356 depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE
357
358config DEBUG_NULL_DEREF_BREAKPOINTS
359 bool
360 default y
361 depends on DEBUG_HW_BREAKPOINTS
362 help
363 Enable support for catching null dereferences and instruction execution
364
365config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES
366 bool
367 default y
368 depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
369
370config DEBUG_NULL_DEREF_HALT
371 bool
372 default n
373 depends on DEBUG_NULL_DEREF_BREAKPOINTS
374 help
375 When enabled null dereferences and instruction fetches will halt execution.
376 Otherwise an error will be printed.
377
Bill XIEf0215b42021-03-20 21:06:11 +0800378# Some EC need an "EC firmware pointer" (a data structure hinting the address
379# of its firmware blobs) being put at a fixed position. Its space
380# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a
381# stage. Different EC may have different format and/or value for it. The actual
382# address of EC firmware pointer should be provided in the Kconfig of the EC
383# requiring it, and its value could be filled by linking a read-only global
384# data object to the section above.
385
386config ECFW_PTR_ADDR
387 hex
388 help
389 Address of reserved space for EC firmware pointer, which should not
390 overlap other data such as reset vector or FIT pointer if present.
391
392config ECFW_PTR_SIZE
393 int
394 help
395 Size of reserved space for EC firmware pointer
396
Eric Laic1ef4f32023-06-12 14:27:54 +0800397config DUMP_SMBIOS_TYPE17
Eric Lai8bbe8502023-06-26 07:56:39 +0800398 bool "Dump part of SMBIOS type17 dimm information"
Eric Laic1ef4f32023-06-12 14:27:54 +0800399 depends on GENERATE_SMBIOS_TABLES
400
Jeremy Compostellaba757a72023-12-20 09:07:04 -0800401config SOC_PHYSICAL_ADDRESS_WIDTH
402 int
403 default 0
404 help
405 On some System-on-Chip the physical address size available
406 at the SoC level may be different than at the CPU
407 level. This configuration can be use to set the physical
408 address width (in bits) of the SoC.
409
410 If not set, both CPU and SoC physical address width are
411 assume to be the same.
412
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100413endif