Kconfig: Drop the C_ENVIRONMENT_BOOTBLOCK symbol
The romcc bootblock will be deprecated soon and most platforms use C_ENVIRONMENT_BOOTBLOCK already. This patch drops the CONFIG_C_ENVIRONMENT_BOOTBLOCK symbol and adds CONFIG_ROMCC_BOOTBLOCK where needed. Change-Id: I773a76aade623303b7cd95ebe9b0411e5a7ecbaf Signed-off-by: Arthur Heymans <arthur@aheymans.xyz> Reviewed-on: https://review.coreboot.org/c/coreboot/+/37154 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com> Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This commit is contained in:
committed by
Patrick Georgi
parent
689256797e
commit
c05b1a66b3
@@ -4,7 +4,6 @@ config ARCH_ARM
|
||||
config ARCH_BOOTBLOCK_ARM
|
||||
bool
|
||||
select ARCH_ARM
|
||||
select C_ENVIRONMENT_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_ARM
|
||||
bool
|
||||
|
@@ -4,7 +4,6 @@ config ARCH_ARM64
|
||||
config ARCH_BOOTBLOCK_ARM64
|
||||
bool
|
||||
select ARCH_ARM64
|
||||
select C_ENVIRONMENT_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_ARM64
|
||||
bool
|
||||
|
@@ -5,7 +5,6 @@ config ARCH_BOOTBLOCK_PPC64
|
||||
bool
|
||||
select ARCH_PPC64
|
||||
select BOOTBLOCK_CUSTOM
|
||||
select C_ENVIRONMENT_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_PPC64
|
||||
bool
|
||||
|
@@ -77,7 +77,6 @@ config ARCH_RISCV_PMP
|
||||
config ARCH_BOOTBLOCK_RISCV
|
||||
bool
|
||||
default n
|
||||
select C_ENVIRONMENT_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_RISCV
|
||||
bool
|
||||
|
@@ -23,7 +23,7 @@ config ARCH_BOOTBLOCK_X86_32
|
||||
bool
|
||||
default n
|
||||
select ARCH_X86
|
||||
select BOOTBLOCK_CUSTOM if !C_ENVIRONMENT_BOOTBLOCK
|
||||
select BOOTBLOCK_CUSTOM if ROMCC_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_X86_32
|
||||
bool
|
||||
@@ -47,7 +47,7 @@ config ARCH_BOOTBLOCK_X86_64
|
||||
bool
|
||||
default n
|
||||
select ARCH_X86
|
||||
select BOOTBLOCK_CUSTOM if !C_ENVIRONMENT_BOOTBLOCK
|
||||
select BOOTBLOCK_CUSTOM if ROMCC_BOOTBLOCK
|
||||
|
||||
config ARCH_VERSTAGE_X86_64
|
||||
bool
|
||||
@@ -199,7 +199,7 @@ config ID_SECTION_OFFSET
|
||||
hex
|
||||
default 0x80
|
||||
|
||||
# 64KiB default bootblock size when employing C_ENVIRONMENT_BOOTBLOCK.
|
||||
# 64KiB default bootblock size
|
||||
config C_ENV_BOOTBLOCK_SIZE
|
||||
hex
|
||||
default 0x10000
|
||||
@@ -239,7 +239,7 @@ config ROMSTAGE_DEBUG_SPINLOOP
|
||||
choice
|
||||
prompt "Bootblock behaviour"
|
||||
default BOOTBLOCK_SIMPLE
|
||||
depends on !C_ENVIRONMENT_BOOTBLOCK
|
||||
depends on ROMCC_BOOTBLOCK
|
||||
|
||||
config BOOTBLOCK_SIMPLE
|
||||
bool "Always load fallback"
|
||||
|
@@ -116,7 +116,7 @@ bootblock-$(CONFIG_X86_TOP4G_BOOTMEDIA_MAP) += mmap_boot.c
|
||||
bootblock-y += id.S
|
||||
$(call src-to-obj,bootblock,$(dir)/id.S): $(obj)/build.h
|
||||
|
||||
ifeq ($(CONFIG_C_ENVIRONMENT_BOOTBLOCK),y)
|
||||
ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
|
||||
|
||||
bootblock-y += bootblock_crt0.S
|
||||
|
||||
@@ -128,7 +128,7 @@ endif
|
||||
|
||||
bootblock-$(CONFIG_ARCH_BOOTBLOCK_X86_32) += walkcbfs.S
|
||||
|
||||
else # !C_ENVIRONMENT_BOOTBLOCK
|
||||
else # ROMCC_BOOTBLOCK
|
||||
|
||||
# x86-specific linker flags
|
||||
ifeq ($(CONFIG_ARCH_BOOTBLOCK_X86_32),y)
|
||||
@@ -178,7 +178,7 @@ $(objcbfs)/bootblock.debug: $$(bootblock-objs)
|
||||
$(filter-out %.ld,$(bootblock-objs)) \
|
||||
-T $(call src-to-obj,bootblock,src/arch/x86/bootblock.ld)
|
||||
|
||||
endif # C_ENVIRONMENT_BOOTBLOCK
|
||||
endif # ROMCC_BOOTBLOCK
|
||||
|
||||
|
||||
endif # CONFIG_ARCH_BOOTBLOCK_X86_32 / CONFIG_ARCH_BOOTBLOCK_X86_64
|
||||
@@ -223,7 +223,9 @@ ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
|
||||
romstage-$(CONFIG_HAVE_ACPI_RESUME) += acpi_s3.c
|
||||
# gdt_init.S is included by entry32.inc when romstage is the first C
|
||||
# environment.
|
||||
romstage-$(CONFIG_C_ENVIRONMENT_BOOTBLOCK) += gdt_init.S
|
||||
ifneq ($(CONFIG_ROMCC_BOOTBLOCK),y)
|
||||
romstage-y += gdt_init.S
|
||||
endif
|
||||
romstage-y += cbmem.c
|
||||
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += exception.c
|
||||
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += idt.S
|
||||
|
@@ -13,14 +13,13 @@
|
||||
|
||||
#include <rules.h>
|
||||
|
||||
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
|
||||
#if !CONFIG(ROMCC_BOOTBLOCK)
|
||||
|
||||
/*
|
||||
* This path is for stages that are post bootblock when employing
|
||||
* CONFIG_C_ENVIRONMENT_BOOTBLOCK. The gdt is reloaded to accommodate
|
||||
* platforms that are executing out of CAR. In order to continue with
|
||||
* C code execution one needs to set stack pointer and clear CAR_GLOBAL
|
||||
* variables that are stage specific.
|
||||
* This path is for stages that are post bootblock. The gdt is reloaded
|
||||
* to accommodate platforms that are executing out of CAR. In order to
|
||||
* continue with C code execution one needs to set stack pointer and
|
||||
* clear .bss variables that are stage specific.
|
||||
*/
|
||||
.section ".text._start", "ax", @progbits
|
||||
.global _start
|
||||
|
@@ -11,8 +11,7 @@
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* This is the modern bootblock. It is used by platforms which select
|
||||
* C_ENVIRONMENT_BOOTBLOCK, and it prepares the system for C environment runtime
|
||||
* This is the modern bootblock. It prepares the system for C environment runtime
|
||||
* setup. The actual setup is done by hardware-specific code.
|
||||
*
|
||||
* It provides a bootflow similar to other architectures, and thus is considered
|
||||
|
@@ -20,7 +20,7 @@
|
||||
* - timestamp.inc: store TSC in MMX registers
|
||||
* - generated/bootblock.inc: ROMCC part of the bootblock
|
||||
*
|
||||
* This is used on platforms which do not select C_ENVIRONMENT_BOOTBLOCK, and it
|
||||
* This is used on platforms which select ROMCC_BOOTBLOCK, and it
|
||||
* tries to do the absolute minimum before walking CBFS and jumping to romstage.
|
||||
*
|
||||
* This file assembles the bootblock program by the order of the includes. Thus,
|
||||
|
@@ -36,7 +36,7 @@
|
||||
/* Stack for CAR stages. Since it persists across all stages that
|
||||
* use CAR it can be reused. The chipset/SoC is expected to provide
|
||||
* the stack size. */
|
||||
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
|
||||
#if !CONFIG(ROMCC_BOOTBLOCK)
|
||||
_car_stack = .;
|
||||
. += CONFIG_DCACHE_BSP_STACK_SIZE;
|
||||
_ecar_stack = .;
|
||||
@@ -90,7 +90,7 @@
|
||||
_ebss = .;
|
||||
_car_unallocated_start = .;
|
||||
|
||||
#if !CONFIG(C_ENVIRONMENT_BOOTBLOCK)
|
||||
#if CONFIG(ROMCC_BOOTBLOCK)
|
||||
_car_stack = .;
|
||||
_ecar_stack = _car_region_end;
|
||||
#endif
|
||||
@@ -121,6 +121,6 @@ _bogus = ASSERT((CONFIG_DCACHE_RAM_SIZE == 0) || (SIZEOF(.car.data) <= CONFIG_DC
|
||||
#if CONFIG(PAGING_IN_CACHE_AS_RAM)
|
||||
_bogus2 = ASSERT(_pagetables == ALIGN(_pagetables, 4096), "_pagetables aren't 4KiB aligned");
|
||||
#endif
|
||||
#if CONFIG(C_ENVIRONMENT_BOOTBLOCK)
|
||||
#if !CONFIG(ROMCC_BOOTBLOCK)
|
||||
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
|
||||
#endif
|
||||
|
@@ -288,9 +288,8 @@ static inline void get_fms(struct cpuinfo_x86 *c, uint32_t tfms)
|
||||
#define asmlinkage __attribute__((regparm(0)))
|
||||
|
||||
/*
|
||||
* When using CONFIG_C_ENVIRONMENT_BOOTBLOCK the car_stage_entry()
|
||||
* is the symbol jumped to for each stage after bootblock using
|
||||
* cache-as-ram.
|
||||
* When not using a romcc bootblock the car_stage_entry() is the symbol
|
||||
* jumped to for each stage after bootblock using cache-as-ram.
|
||||
*/
|
||||
asmlinkage void car_stage_entry(void);
|
||||
|
||||
|
@@ -49,8 +49,7 @@ SECTIONS
|
||||
|
||||
#include EARLY_MEMLAYOUT
|
||||
#elif ENV_BOOTBLOCK
|
||||
/* This is for C_ENVIRONMENT_BOOTBLOCK. arch/x86/bootblock.ld contains
|
||||
* the logic for the romcc linking. */
|
||||
/* arch/x86/bootblock.ld contains the logic for the ROMCC_BOOTBLOCK linking. */
|
||||
BOOTBLOCK(0xffffffff - CONFIG_C_ENV_BOOTBLOCK_SIZE + 1,
|
||||
CONFIG_C_ENV_BOOTBLOCK_SIZE)
|
||||
|
||||
|
Reference in New Issue
Block a user