diff options
-rw-r--r-- | src/arch/arm/include/arch/early_variables.h | 27 | ||||
-rw-r--r-- | src/arch/arm/romstage.ld | 31 | ||||
-rw-r--r-- | src/console/Kconfig | 1 | ||||
-rw-r--r-- | src/cpu/x86/Makefile.inc | 2 |
4 files changed, 4 insertions, 57 deletions
diff --git a/src/arch/arm/include/arch/early_variables.h b/src/arch/arm/include/arch/early_variables.h index cec0a46239..041d0ae7ad 100644 --- a/src/arch/arm/include/arch/early_variables.h +++ b/src/arch/arm/include/arch/early_variables.h @@ -20,40 +20,13 @@ #ifndef ARCH_EARLY_VARIABLES_H #define ARCH_EARLY_VARIABLES_H -#ifdef __PRE_RAM__ -#define CAR_GLOBAL __attribute__((section(".car.global_data"))) -#define CAR_CBMEM __attribute__((section(".car.cbmem_console"))) -#else #define CAR_GLOBAL #define CAR_CBMEM -#endif - -#if defined(__PRE_RAM__) -#define CAR_MIGRATE_ATTR __attribute__ ((used,section (".car.migrate"))) - -/* Call migrate_fn_() when CAR globals are migrated. */ -#define CAR_MIGRATE(migrate_fn_) \ - static void (* const migrate_fn_ ## _ptr)(void) CAR_MIGRATE_ATTR = \ - migrate_fn_; - -/* Get the correct pointer for the CAR global variable. */ -void *car_get_var_ptr(void *var); -/* Get and set a primitive type global variable. */ -#define car_get_var(var) \ - *(typeof(var) *)car_get_var_ptr(&(var)) -#define car_set_var(var, val) \ - do { car_get_var(var) = (val); } while(0) - -/* Migrate the CAR variables to memory. */ -void car_migrate_variables(void); - -#else #define CAR_MIGRATE(migrate_fn_) static inline void *car_get_var_ptr(void *var) { return var; } #define car_get_var(var) (var) #define car_set_var(var, val) do { (var) = (val); } while (0) static inline void car_migrate_variables(void) { } -#endif #endif diff --git a/src/arch/arm/romstage.ld b/src/arch/arm/romstage.ld index 65b133ad2c..750525bade 100644 --- a/src/arch/arm/romstage.ld +++ b/src/arch/arm/romstage.ld @@ -35,7 +35,6 @@ PHDRS SECTIONS { - /* TODO make this a configurable option (per chipset). */ . = CONFIG_ROMSTAGE_BASE; .romtext . : { @@ -50,11 +49,7 @@ SECTIONS *(.rodata); *(.machine_param); *(.data); - . = ALIGN(16); - _car_migrate_start = .; - *(.car.migrate); - _car_migrate_end = .; - . = ALIGN(16); + . = ALIGN(8); _erom = .; } @@ -72,32 +67,8 @@ SECTIONS _ebss = .; - .car.data . : { - . = ALIGN(8); - _car_data_start = .; - *(.car.global_data); - . = ALIGN(8); - /* The cbmem_console section comes last to take advantage of - * a zero-sized array to hold the memconsole contents that - * grows to a bound of CONFIG_CONSOLE_CAR_BUFFER_SIZE. However, - * collisions within the cache-as-ram region cannot be - * statically checked because the cache-as-ram region usage is - * cpu/chipset dependent. */ - *(.car.cbmem_console); - _car_data_end = .; - } - _end = .; - /* TODO: check if we are running out of SRAM. Below check is not good - * enough though because SRAM has different size on different CPUs - * and not all SRAM is available to the romstage. On Exynos, some is - * used for BL1, the bootblock and the stack. - * - * _bogus = ASSERT((_end - _start + EXPECTED_CBMEM_CONSOLE_SIZE <= \ - * 0x54000), "SRAM area is too full"); - */ - /* Discard the sections we don't need/want */ /DISCARD/ : { *(.comment) diff --git a/src/console/Kconfig b/src/console/Kconfig index f5528ed384..472ac5c8d2 100644 --- a/src/console/Kconfig +++ b/src/console/Kconfig @@ -168,6 +168,7 @@ config CONSOLE_NE2K_IO_PORT boundary, qemu needs broader align) config CONSOLE_CBMEM + depends on ARCH_X86 bool "Send console output to a CBMEM buffer" default n help diff --git a/src/cpu/x86/Makefile.inc b/src/cpu/x86/Makefile.inc index a05c72327f..418b5d7b66 100644 --- a/src/cpu/x86/Makefile.inc +++ b/src/cpu/x86/Makefile.inc @@ -1,5 +1,7 @@ +ifeq ($(CONFIG_ARCH_ROMSTAGE_X86_32),y) romstage-$(CONFIG_EARLY_CBMEM_INIT) += car.c romstage-$(CONFIG_BROKEN_CAR_MIGRATE) += car.c +endif subdirs-$(CONFIG_PARALLEL_MP) += name ramstage-$(CONFIG_PARALLEL_MP) += mp_init.c |