blob: f7b92506f54ed5d2876b35959a442d4ea4862bb4 [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
Stefan Reinauera48ca842015-04-04 01:58:28 +02008
Angel Pons8e035e32021-06-22 12:58:20 +02009if ARCH_X86
10
Stefan Reinauer68671202015-03-15 04:34:03 +010011# stage selectors for x86
12
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070013config ARCH_BOOTBLOCK_X86_32
Gabe Black5fbfc912013-07-07 13:52:37 -070014 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070015
Stefan Reinauer77b16552015-01-14 19:51:47 +010016config ARCH_VERSTAGE_X86_32
17 bool
Stefan Reinauer77b16552015-01-14 19:51:47 +010018
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070019config ARCH_ROMSTAGE_X86_32
20 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070021
Patrick Georgi29eeece2018-10-31 14:24:47 +010022config ARCH_POSTCAR_X86_32
23 bool
24 default ARCH_ROMSTAGE_X86_32 && POSTCAR_STAGE
25
Furquan Shaikh99ac98f2014-04-23 10:18:48 -070026config ARCH_RAMSTAGE_X86_32
27 bool
Gabe Black5fbfc912013-07-07 13:52:37 -070028
Angel Ponsa32df262020-09-25 10:20:11 +020029config ARCH_ALL_STAGES_X86_32
30 bool
Arthur Heymans6e857402022-11-12 16:16:02 +010031 default !ARCH_ALL_STAGES_X86_64
Angel Ponsa32df262020-09-25 10:20:11 +020032 select ARCH_BOOTBLOCK_X86_32
Arthur Heymans6e857402022-11-12 16:16:02 +010033 select ARCH_VERSTAGE_X86_32 if !VBOOT_STARTS_BEFORE_BOOTBLOCK
Angel Ponsa32df262020-09-25 10:20:11 +020034 select ARCH_ROMSTAGE_X86_32
35 select ARCH_RAMSTAGE_X86_32
Arthur Heymans4403c562022-11-17 12:13:35 +010036 select ARCH_SUPPORTS_CLANG
Angel Ponsa32df262020-09-25 10:20:11 +020037
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
Martin Roth0cd9ff82016-02-01 17:33:37 -070094config USE_MARCH_586
95 def_bool n
96 help
97 Allow a platform or processor to select to be compiled using
98 the '-march=i586' option instead of the typical '-march=i686'
99
Uwe Hermann168b11b2009-10-07 16:15:40 +0000100# This is an SMP option. It relates to starting up APs.
101# It is usually set in mainboard/*/Kconfig.
102# TODO: Improve description.
Sven Schnelle51676b12012-07-29 19:18:03 +0200103config AP_IN_SIPI_WAIT
104 bool
105 default n
Stefan Reinauer2a6f3902012-10-15 13:38:09 -0700106 depends on ARCH_X86 && SMP
Ronald G. Minnich6ed39d92009-08-29 02:59:35 +0000107
Martin Roth8418fd42019-04-22 16:26:23 -0600108config RESET_VECTOR_IN_RAM
109 bool
110 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200111 select NO_XIP_EARLY_STAGES
Martin Roth8418fd42019-04-22 16:26:23 -0600112 help
Felix Heldca928c62020-04-04 01:47:37 +0200113 Select this option if the x86 processor's reset vector is in
114 preinitialized DRAM instead of the traditional 0xfffffff0 location.
Martin Roth8418fd42019-04-22 16:26:23 -0600115
Kyösti Mälkkif8c7c232012-04-06 04:03:50 +0300116# Aligns 16bit entry code in bootblock so that hyper-threading CPUs
117# can boot AP CPUs to enable their shared caches.
118config SIPI_VECTOR_IN_ROM
119 bool
120 default n
121 depends on ARCH_X86
122
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700123# Traditionally BIOS region on SPI flash boot media was memory mapped right below
124# 4G and it was the last region in the IFD. This way translation between CPU
125# address space to flash address was trivial. However some IFDs on newer SoCs
Raul E Rangele92a9822021-06-24 16:54:27 -0600126# have BIOS region sandwiched between descriptor and other regions. Turning on
127# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the
128# soc code to provide custom mmap_boot.c.
129config X86_CUSTOM_BOOTMEDIA
130 bool
131
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700132config X86_TOP4G_BOOTMEDIA_MAP
133 bool
Raul E Rangele92a9822021-06-24 16:54:27 -0600134 depends on !X86_CUSTOM_BOOTMEDIA
Alexandru Gagniuc6a622312015-10-27 10:27:30 -0700135 default y
136
Ronald G. Minnichb5e777c2013-07-22 20:17:18 +0200137# This is something you almost certainly don't want to mess with.
138# How many SIPIs do we send when starting up APs and cores?
139# The answer in 2000 or so was '2'. Nowadays, on many systems,
140# it is 1. Set a safe default here, and you can override it
141# on reasonable platforms.
142config NUM_IPI_STARTS
143 int
144 default 2
145
Naresh G Solanki04bb4802016-12-13 21:16:46 +0530146config PRERAM_CBMEM_CONSOLE_SIZE
147 hex
148 default 0xc00
149 help
150 Increase this value if preram cbmem console is getting truncated
151
Julius Wernerbaf27db2019-10-02 17:28:56 -0700152config CBFS_MCACHE_SIZE
153 hex
154 depends on !NO_CBFS_MCACHE
Julius Werner40acfe72021-05-12 15:59:58 -0700155 default 0x4000
Julius Wernerbaf27db2019-10-02 17:28:56 -0700156 help
Julius Werner40acfe72021-05-12 15:59:58 -0700157 Increase this value if you see CBFS mcache overflow warnings. Do NOT
158 change this value for vboot RW updates!
Julius Wernerbaf27db2019-10-02 17:28:56 -0700159
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000160config PC80_SYSTEM
161 bool
Furquan Shaikh99ac98f2014-04-23 10:18:48 -0700162 default y if ARCH_X86
Stefan Reinauer8aedcbc2010-12-16 23:37:17 +0000163
Lee Leahyfdc8c8b2016-06-07 08:45:17 -0700164config BOOTBLOCK_DEBUG_SPINLOOP
165 bool
166 default n
167 help
168 Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait
169 for a JTAG debugger to break into the execution sequence.
170
Patrick Georgia865b172011-01-14 07:40:24 +0000171config HAVE_CMOS_DEFAULT
172 def_bool n
Martin Rothf76303e2016-11-16 15:45:22 -0700173 depends on HAVE_OPTION_TABLE
Patrick Georgia865b172011-01-14 07:40:24 +0000174
175config CMOS_DEFAULT_FILE
176 string
Patrick Georgib8fba862020-06-17 21:06:53 +0200177 default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
Patrick Georgia865b172011-01-14 07:40:24 +0000178 depends on HAVE_CMOS_DEFAULT
179
Felix Held4e037272022-02-23 16:35:58 +0100180config HPET_MIN_TICKS
181 hex
182
Aaron Durbin65ac3d82016-02-11 14:36:19 -0600183config C_ENV_BOOTBLOCK_SIZE
184 hex
Kyösti Mälkkie76ce872020-05-25 08:52:07 +0300185 default 0x40000 if !FIXED_BOOTBLOCK_SIZE
186 help
187 This is only the default maximum of bootblock size for linking
188 purposes. Platforms may provide different limit and need to
189 specify this when FIXED_BOOTBLOCK_SIZE is selected.
Andrey Petrovccd300b2016-02-28 22:04:51 -0800190
Kyösti Mälkki49dbbe92019-12-21 10:17:56 +0200191config FIXED_BOOTBLOCK_SIZE
192 bool
193
Andrey Petrovccd300b2016-02-28 22:04:51 -0800194# Default address romstage is to be linked at
195config ROMSTAGE_ADDR
196 hex
197 default 0x2000000
198
199# Default address verstage is to be linked at
200config VERSTAGE_ADDR
201 hex
202 default 0x2000000
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500203
204# Use the post CAR infrastructure for tearing down cache-as-ram
Elyes HAOUAS777ea892016-07-29 07:40:41 +0200205# from a program loaded in RAM and subsequently loading ramstage.
Aaron Durbin7f8afe02016-03-18 12:21:23 -0500206config POSTCAR_STAGE
Kyösti Mälkki0f5e01a2019-08-09 07:11:07 +0300207 def_bool y
208 depends on ARCH_X86
Felix Heldca928c62020-04-04 01:47:37 +0200209 depends on !RESET_VECTOR_IN_RAM
Lee Leahyd131ea32016-06-08 13:40:08 -0700210
211config VERSTAGE_DEBUG_SPINLOOP
212 bool
213 default n
214 help
215 Add a spin (JMP .) in assembly_entry.S during early verstage to wait
216 for a JTAG debugger to break into the execution sequence.
217
218config ROMSTAGE_DEBUG_SPINLOOP
219 bool
220 default n
221 help
222 Add a spin (JMP .) in assembly_entry.S during early romstage to wait
223 for a JTAG debugger to break into the execution sequence.
Martin Roth408fda72016-12-15 16:04:55 -0700224
225choice
226 prompt "Bootblock behaviour"
227 default BOOTBLOCK_SIMPLE
Kyösti Mälkkib8d575c2019-12-16 16:00:49 +0200228 depends on !VBOOT
Martin Roth408fda72016-12-15 16:04:55 -0700229
230config BOOTBLOCK_SIMPLE
231 bool "Always load fallback"
232
233config BOOTBLOCK_NORMAL
Arthur Heymans6f751542019-06-08 11:28:52 +0200234 select CONFIGURABLE_CBFS_PREFIX
Martin Roth408fda72016-12-15 16:04:55 -0700235 bool "Switch to normal if CMOS says so"
236
237endchoice
238
Martin Roth408fda72016-12-15 16:04:55 -0700239config SKIP_MAX_REBOOT_CNT_CLEAR
240 bool "Do not clear reboot count after successful boot"
241 depends on BOOTBLOCK_NORMAL
242 help
243 Do not clear the reboot count immediately after successful boot.
244 Set to allow the payload to control normal/fallback image recovery.
245 Note that it is the responsibility of the payload to reset the
Paul Menzelb9499022019-01-08 16:21:31 +0100246 normal boot bit to 1 after each successful boot.
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600247
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700248config ACPI_BERT
Nico Huber9df72e02018-11-24 18:25:50 +0100249 bool
Marc Jones7a2d4ea2017-08-25 18:54:23 -0600250 depends on HAVE_ACPI_TABLES
251 help
Furquan Shaikhbf4b7b02020-04-30 18:08:16 -0700252 Build an ACPI Boot Error Record Table.
Aaron Durbinf49ddb62018-01-24 17:35:58 -0700253
254config COLLECT_TIMESTAMPS_NO_TSC
255 bool
256 default n
257 depends on COLLECT_TIMESTAMPS
258 help
259 Use a non-TSC platform-dependent source for timestamps.
260
261config COLLECT_TIMESTAMPS_TSC
262 bool
263 default y if !COLLECT_TIMESTAMPS_NO_TSC
264 default n
265 depends on COLLECT_TIMESTAMPS
266 help
267 Use the TSC as the timestamp source.
Aaron Durbin0f35af8f2018-04-18 01:00:27 -0600268
269config PAGING_IN_CACHE_AS_RAM
270 bool
271 default n
272 depends on ARCH_X86
273 help
274 Chipsets scan select this option to preallocate area in cache-as-ram
275 for storing paging data structures. PAE paging is currently the
276 only thing being supported.
277
278config NUM_CAR_PAGE_TABLE_PAGES
279 int
280 default 5
281 depends on PAGING_IN_CACHE_AS_RAM
282 help
283 The number of 4KiB pages that should be pre-allocated for page tables.
Aaron Durbin4b032e42018-04-20 01:39:30 -0600284
285# Provide the interrupt handlers to every stage. Not all
286# stages may take advantage.
287config IDT_IN_EVERY_STAGE
288 bool
289 default n
290 depends on ARCH_X86
Nico Huber33fcaf92018-10-10 22:44:20 +0200291
292config HAVE_CF9_RESET
293 bool
294
295config HAVE_CF9_RESET_PREPARE
296 bool
297 depends on HAVE_CF9_RESET
Kyösti Mälkkib72b5d92019-07-04 21:08:17 +0300298
299config PIRQ_ROUTE
300 bool
301 default n
302
303config MAX_PIRQ_LINKS
304 int
305 default 4
306 depends on PIRQ_ROUTE
307 help
308 This variable specifies the number of PIRQ interrupt links which are
309 routable. On most chipsets, this is 4, INTA through INTD. Some
310 chipsets offer more than four links, commonly up to INTH. They may
311 also have a separate link for ATA or IOAPIC interrupts. When the PIRQ
312 table specifies links greater than 4, pirq_route_irqs will not
313 function properly, unless this variable is correctly set.
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100314
Duncan Laurief02bf352020-03-17 18:32:54 -0700315config MAX_ACPI_TABLE_SIZE_KB
316 int
317 default 144
318 help
319 Set the maximum size of all ACPI tables in KiB.
320
Furquan Shaikh46514c22020-06-11 11:59:07 -0700321config MEMLAYOUT_LD_FILE
322 string
323 default "src/arch/x86/memlayout.ld"
324
Robert Zieba3f01cd12022-04-14 10:36:15 -0600325config DEBUG_HW_BREAKPOINTS
326 bool
327 default y
328 help
329 Enable support for hardware data and instruction breakpoints through
330 the x86 debug registers
331
332config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
333 bool
334 default y
335 depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE
336
337config DEBUG_NULL_DEREF_BREAKPOINTS
338 bool
339 default y
340 depends on DEBUG_HW_BREAKPOINTS
341 help
342 Enable support for catching null dereferences and instruction execution
343
344config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES
345 bool
346 default y
347 depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES
348
349config DEBUG_NULL_DEREF_HALT
350 bool
351 default n
352 depends on DEBUG_NULL_DEREF_BREAKPOINTS
353 help
354 When enabled null dereferences and instruction fetches will halt execution.
355 Otherwise an error will be printed.
356
Bill XIEf0215b42021-03-20 21:06:11 +0800357# Some EC need an "EC firmware pointer" (a data structure hinting the address
358# of its firmware blobs) being put at a fixed position. Its space
359# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a
360# stage. Different EC may have different format and/or value for it. The actual
361# address of EC firmware pointer should be provided in the Kconfig of the EC
362# requiring it, and its value could be filled by linking a read-only global
363# data object to the section above.
364
365config ECFW_PTR_ADDR
366 hex
367 help
368 Address of reserved space for EC firmware pointer, which should not
369 overlap other data such as reset vector or FIT pointer if present.
370
371config ECFW_PTR_SIZE
372 int
373 help
374 Size of reserved space for EC firmware pointer
375
Arthur Heymansb86e96a2019-02-10 17:00:56 +0100376endif