| 1 |
## SPDX-License-Identifier: GPL-2.0-only |
| 2 |
|
| 3 |
config ARCH_X86 |
| 4 |
bool |
| 5 |
select PCI |
| 6 |
select RELOCATABLE_MODULES |
| 7 |
select HAVE_ASAN_IN_RAMSTAGE |
| 8 |
|
| 9 |
if ARCH_X86 |
| 10 |
|
| 11 |
# stage selectors for x86 |
| 12 |
|
| 13 |
config ARCH_BOOTBLOCK_X86_32 |
| 14 |
bool |
| 15 |
|
| 16 |
config ARCH_VERSTAGE_X86_32 |
| 17 |
bool |
| 18 |
|
| 19 |
config ARCH_ROMSTAGE_X86_32 |
| 20 |
bool |
| 21 |
|
| 22 |
config ARCH_POSTCAR_X86_32 |
| 23 |
bool |
| 24 |
default ARCH_ROMSTAGE_X86_32 && POSTCAR_STAGE |
| 25 |
|
| 26 |
config ARCH_RAMSTAGE_X86_32 |
| 27 |
bool |
| 28 |
|
| 29 |
config ARCH_ALL_STAGES_X86_32 |
| 30 |
bool |
| 31 |
default !ARCH_ALL_STAGES_X86_64 |
| 32 |
select ARCH_BOOTBLOCK_X86_32 |
| 33 |
select ARCH_VERSTAGE_X86_32 if !VBOOT_STARTS_BEFORE_BOOTBLOCK |
| 34 |
select ARCH_ROMSTAGE_X86_32 |
| 35 |
select ARCH_RAMSTAGE_X86_32 |
| 36 |
|
| 37 |
# stage selectors for x64 |
| 38 |
|
| 39 |
config ARCH_BOOTBLOCK_X86_64 |
| 40 |
bool |
| 41 |
select SSE2 |
| 42 |
|
| 43 |
config ARCH_VERSTAGE_X86_64 |
| 44 |
bool |
| 45 |
select SSE2 |
| 46 |
|
| 47 |
config ARCH_ROMSTAGE_X86_64 |
| 48 |
bool |
| 49 |
select SSE2 |
| 50 |
|
| 51 |
config ARCH_POSTCAR_X86_64 |
| 52 |
bool |
| 53 |
default ARCH_ROMSTAGE_X86_64 && POSTCAR_STAGE |
| 54 |
select SSE2 |
| 55 |
|
| 56 |
config ARCH_RAMSTAGE_X86_64 |
| 57 |
bool |
| 58 |
select SSE2 |
| 59 |
|
| 60 |
config ARCH_ALL_STAGES_X86_64 |
| 61 |
bool |
| 62 |
select ARCH_BOOTBLOCK_X86_64 |
| 63 |
select ARCH_VERSTAGE_X86_64 if !VBOOT_STARTS_BEFORE_BOOTBLOCK |
| 64 |
select ARCH_ROMSTAGE_X86_64 |
| 65 |
select ARCH_RAMSTAGE_X86_64 |
| 66 |
|
| 67 |
config HAVE_X86_64_SUPPORT |
| 68 |
bool |
| 69 |
help |
| 70 |
Enable support to build and run coreboot in 64-bit mode. |
| 71 |
When enabling this option for a new platform, it is recommended to |
| 72 |
provide a config file for Jenkins to build-test the 64-bit option. |
| 73 |
|
| 74 |
config USE_X86_64_SUPPORT |
| 75 |
bool "Run coreboot in long (64-bit) mode" |
| 76 |
depends on HAVE_X86_64_SUPPORT |
| 77 |
select ARCH_ALL_STAGES_X86_64 |
| 78 |
help |
| 79 |
When set, most of coreboot runs in long (64-bit) mode instead of the |
| 80 |
usual protected flat (32-bit) mode. 64-bit CPUs and OSes can be used |
| 81 |
irrespective of whether coreboot runs in 32-bit or 64-bit mode. |
| 82 |
|
| 83 |
config PAGE_TABLES_IN_CBFS |
| 84 |
bool |
| 85 |
default n |
| 86 |
|
| 87 |
config ARCH_X86_64_PGTBL_LOC |
| 88 |
hex "x86_64 page table location in CBFS" |
| 89 |
depends on ARCH_BOOTBLOCK_X86_64 && PAGE_TABLES_IN_CBFS |
| 90 |
default 0xfffe9000 |
| 91 |
help |
| 92 |
The position where to place pagetables. Needs to be known at |
| 93 |
compile time. Must not overlap other files in CBFS. |
| 94 |
|
| 95 |
config RESERVED_PHYSICAL_ADDRESS_BITS_SUPPORT |
| 96 |
bool |
| 97 |
help |
| 98 |
On some systems, the upper physical address bits are reserved and |
| 99 |
used as a tag which is typically related to a memory encryption |
| 100 |
feature. When selecting this option, the SoC code needs to implement |
| 101 |
get_reserved_phys_addr_bits so that the common code knows how many of |
| 102 |
the most significant physical address bits are reserved and can't be |
| 103 |
used as address bits. |
| 104 |
|
| 105 |
# This is an SMP option. It relates to starting up APs. |
| 106 |
# It is usually set in mainboard/*/Kconfig. |
| 107 |
# TODO: Improve description. |
| 108 |
config AP_IN_SIPI_WAIT |
| 109 |
bool |
| 110 |
default n |
| 111 |
depends on ARCH_X86 && SMP |
| 112 |
|
| 113 |
config RESET_VECTOR_IN_RAM |
| 114 |
bool |
| 115 |
depends on ARCH_X86 |
| 116 |
select NO_XIP_EARLY_STAGES |
| 117 |
help |
| 118 |
Select this option if the x86 processor's reset vector is in |
| 119 |
preinitialized DRAM instead of the traditional 0xfffffff0 location. |
| 120 |
|
| 121 |
# Aligns 16bit entry code in bootblock so that hyper-threading CPUs |
| 122 |
# can boot AP CPUs to enable their shared caches. |
| 123 |
config SIPI_VECTOR_IN_ROM |
| 124 |
bool |
| 125 |
default n |
| 126 |
depends on ARCH_X86 |
| 127 |
|
| 128 |
# Traditionally BIOS region on SPI flash boot media was memory mapped right below |
| 129 |
# 4G and it was the last region in the IFD. This way translation between CPU |
| 130 |
# address space to flash address was trivial. However some IFDs on newer SoCs |
| 131 |
# have BIOS region sandwiched between descriptor and other regions. Turning on |
| 132 |
# X86_CUSTOM_BOOTMEDIA disables X86_TOP4G_BOOTMEDIA_MAP which allows the |
| 133 |
# soc code to provide custom mmap_boot.c. |
| 134 |
config X86_CUSTOM_BOOTMEDIA |
| 135 |
bool |
| 136 |
|
| 137 |
config X86_TOP4G_BOOTMEDIA_MAP |
| 138 |
bool |
| 139 |
depends on !X86_CUSTOM_BOOTMEDIA |
| 140 |
default y |
| 141 |
|
| 142 |
config PRERAM_CBMEM_CONSOLE_SIZE |
| 143 |
hex |
| 144 |
default 0xc00 |
| 145 |
help |
| 146 |
Increase this value if preram cbmem console is getting truncated |
| 147 |
|
| 148 |
config CBFS_MCACHE_SIZE |
| 149 |
hex |
| 150 |
depends on !NO_CBFS_MCACHE |
| 151 |
default 0x4000 |
| 152 |
help |
| 153 |
Increase this value if you see CBFS mcache overflow warnings. Do NOT |
| 154 |
change this value for vboot RW updates! |
| 155 |
|
| 156 |
config PRERAM_CBFS_CACHE_SIZE |
| 157 |
hex |
| 158 |
default 0x4000 |
| 159 |
help |
| 160 |
Define the size of the Pre-RAM stages CBFS cache. A size of |
| 161 |
zero disables the CBFS cache feature in pre-memory stages. |
| 162 |
|
| 163 |
config POSTRAM_CBFS_CACHE_IN_BSS |
| 164 |
bool |
| 165 |
default y if !SOC_AMD_COMMON_BLOCK_NONCAR |
| 166 |
help |
| 167 |
Allocate the post-memory CBFS cache scratchpad in the .bss |
| 168 |
section. CBFS cache will rely on a simple static C buffer |
| 169 |
while traditionally CBFS cache memory region is reserved in |
| 170 |
the device memory layout. |
| 171 |
|
| 172 |
config RAMSTAGE_CBFS_CACHE_SIZE |
| 173 |
hex |
| 174 |
default 0x4000 |
| 175 |
depends on POSTRAM_CBFS_CACHE_IN_BSS |
| 176 |
help |
| 177 |
Define the size of the ramstage CBFS cache. A size of zero |
| 178 |
disables the CBFS cache feature in ramstage. |
| 179 |
|
| 180 |
config PC80_SYSTEM |
| 181 |
bool |
| 182 |
default y if ARCH_X86 |
| 183 |
|
| 184 |
config BOOTBLOCK_DEBUG_SPINLOOP |
| 185 |
bool |
| 186 |
default n |
| 187 |
help |
| 188 |
Add a spin (JMP .) in bootblock_crt0.S during early bootblock to wait |
| 189 |
for a JTAG debugger to break into the execution sequence. |
| 190 |
|
| 191 |
config HAVE_CMOS_DEFAULT |
| 192 |
def_bool n |
| 193 |
depends on HAVE_OPTION_TABLE |
| 194 |
|
| 195 |
config CMOS_DEFAULT_FILE |
| 196 |
string |
| 197 |
default "src/mainboard/\$(MAINBOARDDIR)/cmos.default" |
| 198 |
depends on HAVE_CMOS_DEFAULT |
| 199 |
|
| 200 |
config HPET_MIN_TICKS |
| 201 |
hex |
| 202 |
|
| 203 |
config C_ENV_BOOTBLOCK_SIZE |
| 204 |
hex |
| 205 |
default 0x40000 if !FIXED_BOOTBLOCK_SIZE |
| 206 |
help |
| 207 |
This is only the default maximum of bootblock size for linking |
| 208 |
purposes. Platforms may provide different limit and need to |
| 209 |
specify this when FIXED_BOOTBLOCK_SIZE is selected. |
| 210 |
|
| 211 |
config FIXED_BOOTBLOCK_SIZE |
| 212 |
bool |
| 213 |
|
| 214 |
# Default address romstage is to be linked at |
| 215 |
config ROMSTAGE_ADDR |
| 216 |
hex |
| 217 |
default 0x2000000 |
| 218 |
|
| 219 |
# Default address verstage is to be linked at |
| 220 |
config VERSTAGE_ADDR |
| 221 |
hex |
| 222 |
default 0x2000000 |
| 223 |
|
| 224 |
# Use the post CAR infrastructure for tearing down cache-as-ram |
| 225 |
# from a program loaded in RAM and subsequently loading ramstage. |
| 226 |
config POSTCAR_STAGE |
| 227 |
def_bool y |
| 228 |
depends on ARCH_X86 |
| 229 |
depends on !RESET_VECTOR_IN_RAM |
| 230 |
|
| 231 |
config VERSTAGE_DEBUG_SPINLOOP |
| 232 |
bool |
| 233 |
default n |
| 234 |
help |
| 235 |
Add a spin (JMP .) in assembly_entry.S during early verstage to wait |
| 236 |
for a JTAG debugger to break into the execution sequence. |
| 237 |
|
| 238 |
config ROMSTAGE_DEBUG_SPINLOOP |
| 239 |
bool |
| 240 |
default n |
| 241 |
help |
| 242 |
Add a spin (JMP .) in assembly_entry.S during early romstage to wait |
| 243 |
for a JTAG debugger to break into the execution sequence. |
| 244 |
|
| 245 |
choice |
| 246 |
prompt "Bootblock behaviour" |
| 247 |
default BOOTBLOCK_SIMPLE |
| 248 |
depends on !VBOOT |
| 249 |
|
| 250 |
config BOOTBLOCK_SIMPLE |
| 251 |
bool "Always load fallback" |
| 252 |
|
| 253 |
config BOOTBLOCK_NORMAL |
| 254 |
bool "Switch to normal if CMOS says so" |
| 255 |
select CONFIGURABLE_CBFS_PREFIX |
| 256 |
select SEPARATE_ROMSTAGE |
| 257 |
|
| 258 |
endchoice |
| 259 |
|
| 260 |
config SKIP_MAX_REBOOT_CNT_CLEAR |
| 261 |
bool "Do not clear reboot count after successful boot" |
| 262 |
depends on BOOTBLOCK_NORMAL |
| 263 |
help |
| 264 |
Do not clear the reboot count immediately after successful boot. |
| 265 |
Set to allow the payload to control normal/fallback image recovery. |
| 266 |
Note that it is the responsibility of the payload to reset the |
| 267 |
normal boot bit to 1 after each successful boot. |
| 268 |
|
| 269 |
config ACPI_BERT |
| 270 |
bool |
| 271 |
depends on HAVE_ACPI_TABLES |
| 272 |
help |
| 273 |
Build an ACPI Boot Error Record Table. |
| 274 |
|
| 275 |
config COLLECT_TIMESTAMPS_NO_TSC |
| 276 |
bool |
| 277 |
default n |
| 278 |
depends on COLLECT_TIMESTAMPS |
| 279 |
help |
| 280 |
Use a non-TSC platform-dependent source for timestamps. |
| 281 |
|
| 282 |
config COLLECT_TIMESTAMPS_TSC |
| 283 |
bool |
| 284 |
default y if !COLLECT_TIMESTAMPS_NO_TSC |
| 285 |
default n |
| 286 |
depends on COLLECT_TIMESTAMPS |
| 287 |
help |
| 288 |
Use the TSC as the timestamp source. |
| 289 |
|
| 290 |
config PAGING_IN_CACHE_AS_RAM |
| 291 |
bool |
| 292 |
default n |
| 293 |
depends on ARCH_X86 |
| 294 |
help |
| 295 |
Chipsets scan select this option to preallocate area in cache-as-ram |
| 296 |
for storing paging data structures. PAE paging is currently the |
| 297 |
only thing being supported. |
| 298 |
|
| 299 |
config NUM_CAR_PAGE_TABLE_PAGES |
| 300 |
int |
| 301 |
default 5 |
| 302 |
depends on PAGING_IN_CACHE_AS_RAM |
| 303 |
help |
| 304 |
The number of 4KiB pages that should be pre-allocated for page tables. |
| 305 |
|
| 306 |
# Provide the interrupt handlers to every stage. Not all |
| 307 |
# stages may take advantage. |
| 308 |
config IDT_IN_EVERY_STAGE |
| 309 |
bool |
| 310 |
default n |
| 311 |
depends on ARCH_X86 |
| 312 |
|
| 313 |
config HAVE_CF9_RESET |
| 314 |
bool |
| 315 |
|
| 316 |
config HAVE_CF9_RESET_PREPARE |
| 317 |
bool |
| 318 |
depends on HAVE_CF9_RESET |
| 319 |
|
| 320 |
config HAVE_CONFIGURABLE_APMC_SMI_PORT |
| 321 |
bool |
| 322 |
help |
| 323 |
SoCs that have a configurable APMC SMI command port, should select |
| 324 |
this option and implement pm_acpi_smi_cmd_port() that returns the IO |
| 325 |
port. |
| 326 |
|
| 327 |
config PIRQ_ROUTE |
| 328 |
bool |
| 329 |
default n |
| 330 |
|
| 331 |
config MAX_PIRQ_LINKS |
| 332 |
int |
| 333 |
default 4 |
| 334 |
depends on PIRQ_ROUTE |
| 335 |
help |
| 336 |
This variable specifies the number of PIRQ interrupt links which are |
| 337 |
routable. On most chipsets, this is 4, INTA through INTD. Some |
| 338 |
chipsets offer more than four links, commonly up to INTH. They may |
| 339 |
also have a separate link for ATA or IOAPIC interrupts. When the PIRQ |
| 340 |
table specifies links greater than 4, pirq_route_irqs will not |
| 341 |
function properly, unless this variable is correctly set. |
| 342 |
|
| 343 |
config MEMLAYOUT_LD_FILE |
| 344 |
string |
| 345 |
default "src/arch/x86/memlayout.ld" |
| 346 |
|
| 347 |
config DEBUG_HW_BREAKPOINTS |
| 348 |
bool |
| 349 |
default y |
| 350 |
help |
| 351 |
Enable support for hardware data and instruction breakpoints through |
| 352 |
the x86 debug registers |
| 353 |
|
| 354 |
config DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES |
| 355 |
bool |
| 356 |
default y |
| 357 |
depends on DEBUG_HW_BREAKPOINTS && IDT_IN_EVERY_STAGE |
| 358 |
|
| 359 |
config DEBUG_NULL_DEREF_BREAKPOINTS |
| 360 |
bool |
| 361 |
default y |
| 362 |
depends on DEBUG_HW_BREAKPOINTS |
| 363 |
help |
| 364 |
Enable support for catching null dereferences and instruction execution |
| 365 |
|
| 366 |
config DEBUG_NULL_DEREF_BREAKPOINTS_IN_ALL_STAGES |
| 367 |
bool |
| 368 |
default y |
| 369 |
depends on DEBUG_NULL_DEREF_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES |
| 370 |
|
| 371 |
config DEBUG_STACK_OVERFLOW_BREAKPOINTS |
| 372 |
bool |
| 373 |
default y |
| 374 |
depends on DEBUG_HW_BREAKPOINTS |
| 375 |
help |
| 376 |
Enable support for catching stack overflows |
| 377 |
|
| 378 |
config DEBUG_STACK_OVERFLOW_BREAKPOINTS_IN_ALL_STAGES |
| 379 |
bool |
| 380 |
default n |
| 381 |
depends on DEBUG_STACK_OVERFLOW_BREAKPOINTS && DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES |
| 382 |
help |
| 383 |
Disabled as false-positive stack corruptions where observed on some platforms. |
| 384 |
TODO: Investigate those reported errors before defaulting to yes. |
| 385 |
|
| 386 |
# Some EC need an "EC firmware pointer" (a data structure hinting the address |
| 387 |
# of its firmware blobs) being put at a fixed position. Its space |
| 388 |
# (__section__(".ecfw_ptr")) should be reserved if it lies in the range of a |
| 389 |
# stage. Different EC may have different format and/or value for it. The actual |
| 390 |
# address of EC firmware pointer should be provided in the Kconfig of the EC |
| 391 |
# requiring it, and its value could be filled by linking a read-only global |
| 392 |
# data object to the section above. |
| 393 |
|
| 394 |
config ECFW_PTR_ADDR |
| 395 |
hex |
| 396 |
help |
| 397 |
Address of reserved space for EC firmware pointer, which should not |
| 398 |
overlap other data such as reset vector or FIT pointer if present. |
| 399 |
|
| 400 |
config ECFW_PTR_SIZE |
| 401 |
int |
| 402 |
help |
| 403 |
Size of reserved space for EC firmware pointer |
| 404 |
|
| 405 |
config DUMP_SMBIOS_TYPE17 |
| 406 |
bool "Dump part of SMBIOS type17 dimm information" |
| 407 |
depends on GENERATE_SMBIOS_TABLES |
| 408 |
|
| 409 |
config SOC_PHYSICAL_ADDRESS_WIDTH |
| 410 |
int |
| 411 |
default 0 |
| 412 |
help |
| 413 |
On some System-on-Chip the physical address size available |
| 414 |
at the SoC level may be different than at the CPU |
| 415 |
level. This configuration can be use to set the physical |
| 416 |
address width (in bits) of the SoC. |
| 417 |
|
| 418 |
If not set, both CPU and SoC physical address width are |
| 419 |
assume to be the same. |
| 420 |
|
| 421 |
config X86_BOOTBLOCK_EXTRA_PROGRAM_SZ |
| 422 |
int |
| 423 |
default 1024 if CHROMEOS |
| 424 |
default 0 |
| 425 |
help |
| 426 |
Add extra space to prevent overlap between .text and .init sections. |
| 427 |
This is necessary for older linkers (pre-binutils 2.4x) like those used |
| 428 |
on ChromeOS platforms. |
| 429 |
|
| 430 |
The default value is 1024 bytes (1 KiB) for ChromeOS and 0 for other platforms. |
| 431 |
|
| 432 |
config DEFAULT_EBDA_LOWMEM |
| 433 |
hex |
| 434 |
default 0x100000 |
| 435 |
help |
| 436 |
The default value of EBDA low memory is (1024 << 10). |
| 437 |
|
| 438 |
config DEFAULT_EBDA_SEGMENT |
| 439 |
hex |
| 440 |
default 0xF600 |
| 441 |
help |
| 442 |
The default value of EBDA segment is 0xF600. |
| 443 |
|
| 444 |
config DEFAULT_EBDA_SIZE |
| 445 |
hex |
| 446 |
default 0x400 |
| 447 |
help |
| 448 |
The default value of EBDA size is 0x400. |
| 449 |
|
| 450 |
config SHADOW_ROM_TABLE_TO_EBDA |
| 451 |
bool |
| 452 |
default n |
| 453 |
help |
| 454 |
For platforms without writable PAM-F segment support. Put ROM table |
| 455 |
pointers (e.g. ACPI/SMBIOS low pointers) into EBDA. |
| 456 |
|
| 457 |
config SOC_FILL_CPU_CACHE_INFO |
| 458 |
bool |
| 459 |
default n |
| 460 |
help |
| 461 |
SoC selects this if it implements soc_fill_cpu_cache_info. |
| 462 |
endif |