summaryrefslogtreecommitdiff
path: root/src/arch
diff options
context:
space:
mode:
Diffstat (limited to 'src/arch')
-rw-r--r--src/arch/arm64/romstage.c2
-rw-r--r--src/arch/x86/Makefile.inc6
-rw-r--r--src/arch/x86/assembly_entry.S2
-rw-r--r--src/arch/x86/car.ld4
-rw-r--r--src/arch/x86/memcpy.c2
-rw-r--r--src/arch/x86/memlayout.ld2
-rw-r--r--src/arch/x86/memmove_32.c2
-rw-r--r--src/arch/x86/memset.c2
8 files changed, 12 insertions, 10 deletions
diff --git a/src/arch/arm64/romstage.c b/src/arch/arm64/romstage.c
index 654ba5a289..0c37711d3f 100644
--- a/src/arch/arm64/romstage.c
+++ b/src/arch/arm64/romstage.c
@@ -11,6 +11,7 @@
__weak void platform_romstage_main(void) { /* no-op, for bring-up */ }
__weak void platform_romstage_postram(void) { /* no-op */ }
+#if CONFIG(SEPARATE_ROMSTAGE)
void main(void)
{
timestamp_add_now(TS_ROMSTAGE_START);
@@ -20,6 +21,7 @@ void main(void)
exception_init();
romstage_main();
}
+#endif
void __noreturn romstage_main(void)
{
diff --git a/src/arch/x86/Makefile.inc b/src/arch/x86/Makefile.inc
index 384eacd00d..75b9d3db77 100644
--- a/src/arch/x86/Makefile.inc
+++ b/src/arch/x86/Makefile.inc
@@ -161,12 +161,12 @@ endif # CONFIG_ARCH_VERSTAGE_X86_32 / CONFIG_ARCH_VERSTAGE_X86_64
ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32)$(CONFIG_ARCH_ROMSTAGE_X86_64),y)
-romstage-y += assembly_entry.S
-romstage-y += romstage.c
+romstage-$(CONFIG_SEPARATE_ROMSTAGE) += assembly_entry.S
+romstage-$(CONFIG_SEPARATE_ROMSTAGE) += romstage.c
romstage-y += boot.c
romstage-$(CONFIG_DEBUG_HW_BREAKPOINTS_IN_ALL_STAGES) += breakpoint.c
romstage-y += post.c
-romstage-y += gdt_init.S
+romstage-$(CONFIG_SEPARATE_ROMSTAGE) += gdt_init.S
romstage-y += cpu_common.c
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += exception.c
romstage-$(CONFIG_IDT_IN_EVERY_STAGE) += idt.S
diff --git a/src/arch/x86/assembly_entry.S b/src/arch/x86/assembly_entry.S
index 9a9a0465dc..7f19e21502 100644
--- a/src/arch/x86/assembly_entry.S
+++ b/src/arch/x86/assembly_entry.S
@@ -53,7 +53,7 @@ _start:
#endif
#if ((ENV_SEPARATE_VERSTAGE && CONFIG(VERSTAGE_DEBUG_SPINLOOP)) \
- || (ENV_ROMSTAGE && CONFIG(ROMSTAGE_DEBUG_SPINLOOP)))
+ || (ENV_SEPARATE_ROMSTAGE && CONFIG(ROMSTAGE_DEBUG_SPINLOOP)))
/* Wait for a JTAG debugger to break in and set EBX non-zero */
xor %ebx, %ebx
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 2ad1ca2cd8..eb75981bc1 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -75,7 +75,7 @@
RECORD_SIZE(bss)
#endif
-#if ENV_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)
+#if ENV_SEPARATE_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)
_shadow_size = (_ebss - _car_region_start) >> 3;
REGION(asan_shadow, ., _shadow_size, ARCH_POINTER_ALIGN_SIZE)
#endif
@@ -144,7 +144,7 @@ _bogus = ASSERT((CONFIG_DCACHE_RAM_SIZE == 0) || (SIZEOF(.car.data) <= CONFIG_DC
_bogus2 = ASSERT(_pagetables == ALIGN(_pagetables, 4096), "_pagetables aren't 4KiB aligned");
#endif
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
-#if CONFIG(NO_XIP_EARLY_STAGES) && (ENV_ROMSTAGE || ENV_SEPARATE_VERSTAGE)
+#if CONFIG(NO_XIP_EARLY_STAGES) && (ENV_SEPARATE_ROMSTAGE || ENV_SEPARATE_VERSTAGE)
_bogus4 = ASSERT(_eprogram <= _car_region_end, "Stage end too high !");
_bogus5 = ASSERT(_program >= _car_unallocated_start, "Stage start too low!");
#endif
diff --git a/src/arch/x86/memcpy.c b/src/arch/x86/memcpy.c
index d96a93cd93..9da2a7512e 100644
--- a/src/arch/x86/memcpy.c
+++ b/src/arch/x86/memcpy.c
@@ -8,7 +8,7 @@ void *memcpy(void *dest, const void *src, size_t n)
{
unsigned long d0, d1, d2;
-#if (ENV_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
+#if (ENV_SEPARATE_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
(ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE))
check_memory_region((unsigned long)src, n, false, _RET_IP_);
check_memory_region((unsigned long)dest, n, true, _RET_IP_);
diff --git a/src/arch/x86/memlayout.ld b/src/arch/x86/memlayout.ld
index f448bf89de..c199118d2d 100644
--- a/src/arch/x86/memlayout.ld
+++ b/src/arch/x86/memlayout.ld
@@ -26,7 +26,7 @@ SECTIONS
/* Relocated at runtime in cbmem so the address does not matter. */
RAMSTAGE(64M, 8M)
-#elif ENV_ROMSTAGE
+#elif ENV_SEPARATE_ROMSTAGE
/* The 1M size is not allocated. It's just for basic size checking.
* Link at 32MiB address and rely on cbfstool to relocate to XIP. */
ROMSTAGE(CONFIG_ROMSTAGE_ADDR, 1M)
diff --git a/src/arch/x86/memmove_32.c b/src/arch/x86/memmove_32.c
index 3ec50b26ae..387a77ed4a 100644
--- a/src/arch/x86/memmove_32.c
+++ b/src/arch/x86/memmove_32.c
@@ -12,7 +12,7 @@ void *memmove(void *dest, const void *src, size_t n)
int d0, d1, d2, d3, d4, d5;
char *ret = dest;
-#if (ENV_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
+#if (ENV_SEPARATE_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
(ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE))
check_memory_region((unsigned long)src, n, false, _RET_IP_);
check_memory_region((unsigned long)dest, n, true, _RET_IP_);
diff --git a/src/arch/x86/memset.c b/src/arch/x86/memset.c
index 8a0165ba29..142dda33d8 100644
--- a/src/arch/x86/memset.c
+++ b/src/arch/x86/memset.c
@@ -14,7 +14,7 @@ void *memset(void *dstpp, int c, size_t len)
int d0;
unsigned long int dstp = (unsigned long int)dstpp;
-#if (ENV_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
+#if (ENV_SEPARATE_ROMSTAGE && CONFIG(ASAN_IN_ROMSTAGE)) || \
(ENV_RAMSTAGE && CONFIG(ASAN_IN_RAMSTAGE))
check_memory_region((unsigned long)dstpp, len, true, _RET_IP_);
#endif