Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34921 )
Change subject: arch/non-x86: Replace uses of __PRE_RAM__ ......................................................................
arch/non-x86: Replace uses of __PRE_RAM__
Since there is no __SMM__ to worry about, !defined(__PRE_RAM__) becomes just ENV_RAMSTAGE.
Change-Id: Id8918f40572497b068509b5d5a490de0435ad50b Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/arm/include/armv7/arch/cpu.h M src/arch/arm64/include/armv8/arch/cpu.h M src/arch/mips/include/arch/cpu.h M src/arch/ppc64/include/arch/cpu.h M src/arch/riscv/include/arch/cpu.h M src/arch/riscv/include/arch/memlayout.h M src/cpu/ti/am335x/uart.c M src/drivers/uart/pl011.c M src/drivers/uart/sifive.c M src/mainboard/emulation/qemu-power8/uart.c M src/soc/imgtec/pistachio/uart.c M src/soc/mediatek/common/uart.c M src/soc/nvidia/tegra/dc.h M src/soc/nvidia/tegra124/uart.c M src/soc/nvidia/tegra210/uart.c M src/soc/qualcomm/ipq40xx/uart.c M src/soc/qualcomm/ipq806x/uart.c M src/soc/qualcomm/qcs405/uart.c M src/soc/samsung/exynos5250/uart.c M src/soc/samsung/exynos5420/alternate_cbfs.c M src/soc/samsung/exynos5420/uart.c 21 files changed, 24 insertions(+), 24 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/34921/1
diff --git a/src/arch/arm/include/armv7/arch/cpu.h b/src/arch/arm/include/armv7/arch/cpu.h index 22b3fb4..52bfe11 100644 --- a/src/arch/arm/include/armv7/arch/cpu.h +++ b/src/arch/arm/include/armv7/arch/cpu.h @@ -20,7 +20,7 @@
#define asmlinkage
-#if !defined(__PRE_RAM__) +#if ENV_RAMSTAGE #include <device/device.h>
struct cpu_driver { diff --git a/src/arch/arm64/include/armv8/arch/cpu.h b/src/arch/arm64/include/armv8/arch/cpu.h index 6e096cc..e1b5647 100644 --- a/src/arch/arm64/include/armv8/arch/cpu.h +++ b/src/arch/arm64/include/armv8/arch/cpu.h @@ -21,7 +21,7 @@ static inline unsigned int smp_processor_id(void) { return 0; }
-#if !defined(__PRE_RAM__) +#if ENV_RAMSTAGE struct cpu_driver { }; #endif
diff --git a/src/arch/mips/include/arch/cpu.h b/src/arch/mips/include/arch/cpu.h index 8e35908..8290c1a 100644 --- a/src/arch/mips/include/arch/cpu.h +++ b/src/arch/mips/include/arch/cpu.h @@ -18,7 +18,7 @@
#define asmlinkage
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE
#include <device/device.h>
@@ -34,7 +34,7 @@ unsigned long index; };
-#endif /* !__PRE_RAM__ */ +#endif /* ENV_RAMSTAGE */
/*************************************************************************** * The following section was copied from arch/mips/include/asm/mipsregs.h in diff --git a/src/arch/ppc64/include/arch/cpu.h b/src/arch/ppc64/include/arch/cpu.h index 1e13528..c80f65e 100644 --- a/src/arch/ppc64/include/arch/cpu.h +++ b/src/arch/ppc64/include/arch/cpu.h @@ -18,7 +18,7 @@
#define asmlinkage
-#if !defined(__PRE_RAM__) +#if ENV_RAMSTAGE #include <device/device.h>
struct cpu_driver { diff --git a/src/arch/riscv/include/arch/cpu.h b/src/arch/riscv/include/arch/cpu.h index 547cb76..529daa0 100644 --- a/src/arch/riscv/include/arch/cpu.h +++ b/src/arch/riscv/include/arch/cpu.h @@ -20,7 +20,7 @@
#define asmlinkage
-#if !defined(__PRE_RAM__) +#if ENV_RAMSTAGE #include <device/device.h>
struct cpu_driver { diff --git a/src/arch/riscv/include/arch/memlayout.h b/src/arch/riscv/include/arch/memlayout.h index 7baab76..d1e9673 100644 --- a/src/arch/riscv/include/arch/memlayout.h +++ b/src/arch/riscv/include/arch/memlayout.h @@ -20,7 +20,7 @@
#define STACK(addr, size) REGION(stack, addr, size, 4096)
-#if defined(__PRE_RAM__) +#if !ENV_RAMSTAGE #define CAR_STACK(addr, size) \ REGION(car_stack, addr, size, 4K) \ ALIAS_REGION(car_stack, stack) diff --git a/src/cpu/ti/am335x/uart.c b/src/cpu/ti/am335x/uart.c index 4e9d012..f42b946 100644 --- a/src/cpu/ti/am335x/uart.c +++ b/src/cpu/ti/am335x/uart.c @@ -182,7 +182,7 @@ { }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/drivers/uart/pl011.c b/src/drivers/uart/pl011.c index 4e3af52..1764f15 100644 --- a/src/drivers/uart/pl011.c +++ b/src/drivers/uart/pl011.c @@ -49,7 +49,7 @@ return read8(®s->dr); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/drivers/uart/sifive.c b/src/drivers/uart/sifive.c index 1b0f75e..9ca669a 100644 --- a/src/drivers/uart/sifive.c +++ b/src/drivers/uart/sifive.c @@ -113,7 +113,7 @@ return 1; }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { /* TODO */ diff --git a/src/mainboard/emulation/qemu-power8/uart.c b/src/mainboard/emulation/qemu-power8/uart.c index 9548b7c..76c8afc 100644 --- a/src/mainboard/emulation/qemu-power8/uart.c +++ b/src/mainboard/emulation/qemu-power8/uart.c @@ -41,7 +41,7 @@ { }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/imgtec/pistachio/uart.c b/src/soc/imgtec/pistachio/uart.c index a39f2ec..9d15237 100644 --- a/src/soc/imgtec/pistachio/uart.c +++ b/src/soc/imgtec/pistachio/uart.c @@ -143,7 +143,7 @@ uart8250_mem_tx_flush(CONFIG_CONSOLE_SERIAL_UART_ADDRESS); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/mediatek/common/uart.c b/src/soc/mediatek/common/uart.c index 8905c55..c1b4616 100644 --- a/src/soc/mediatek/common/uart.c +++ b/src/soc/mediatek/common/uart.c @@ -172,7 +172,7 @@ mtk_uart_tx_flush(); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/nvidia/tegra/dc.h b/src/soc/nvidia/tegra/dc.h index a9061f8..da296da 100644 --- a/src/soc/nvidia/tegra/dc.h +++ b/src/soc/nvidia/tegra/dc.h @@ -515,7 +515,7 @@ unsigned long READL(void *p); void WRITEL(unsigned long value, void *p);
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void display_startup(struct device *dev); #endif void dp_init(void *_config); diff --git a/src/soc/nvidia/tegra124/uart.c b/src/soc/nvidia/tegra124/uart.c index c9514ac..923fdd7 100644 --- a/src/soc/nvidia/tegra124/uart.c +++ b/src/soc/nvidia/tegra124/uart.c @@ -128,7 +128,7 @@ tegra124_uart_tx_flush(uart_ptr); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/nvidia/tegra210/uart.c b/src/soc/nvidia/tegra210/uart.c index a91818c..3d8e53e 100644 --- a/src/soc/nvidia/tegra210/uart.c +++ b/src/soc/nvidia/tegra210/uart.c @@ -115,7 +115,7 @@ return tegra210_uart_rx_byte(); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/qualcomm/ipq40xx/uart.c b/src/soc/qualcomm/ipq40xx/uart.c index eb3731b..6d3b72a 100644 --- a/src/soc/qualcomm/ipq40xx/uart.c +++ b/src/soc/qualcomm/ipq40xx/uart.c @@ -283,7 +283,7 @@ return byte; }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE /* TODO: Implement function */ void uart_fill_lb(void *data) { diff --git a/src/soc/qualcomm/ipq806x/uart.c b/src/soc/qualcomm/ipq806x/uart.c index 66c3103..7b70283 100644 --- a/src/soc/qualcomm/ipq806x/uart.c +++ b/src/soc/qualcomm/ipq806x/uart.c @@ -398,7 +398,7 @@ return byte; }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE /* TODO: Implement fuction */ void uart_fill_lb(void *data) { diff --git a/src/soc/qualcomm/qcs405/uart.c b/src/soc/qualcomm/qcs405/uart.c index 4a43312..d7e3bcd 100644 --- a/src/soc/qualcomm/qcs405/uart.c +++ b/src/soc/qualcomm/qcs405/uart.c @@ -287,7 +287,7 @@ } #endif
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/samsung/exynos5250/uart.c b/src/soc/samsung/exynos5250/uart.c index 1b8e785..f2b4d82 100644 --- a/src/soc/samsung/exynos5250/uart.c +++ b/src/soc/samsung/exynos5250/uart.c @@ -185,7 +185,7 @@ exynos5_uart_tx_flush(uart); }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial; diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.c b/src/soc/samsung/exynos5420/alternate_cbfs.c index ba3f9a3..38e7cf9 100644 --- a/src/soc/samsung/exynos5420/alternate_cbfs.c +++ b/src/soc/samsung/exynos5420/alternate_cbfs.c @@ -37,11 +37,11 @@ * function is called a second time at the end of the romstage, and copied to * the romstage/ramstage CBFS cache in DRAM. It will reside there for the * rest of the firmware's lifetime and all subsequent stages (which will not - * have __PRE_RAM__ defined) can just directly reference it there. + * have !ENV_RAMSTAGE defined) can just directly reference it there. */ static int usb_cbfs_open(void) { -#ifdef __PRE_RAM__ +#ifdef !ENV_RAMSTAGE static int first_run = 1; int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -79,7 +79,7 @@ */ static int sdmmc_cbfs_open(void) { -#ifdef __PRE_RAM__ +#ifdef !ENV_RAMSTAGE /* * In the bootblock, we just copy the small part that fits in the buffer * and hope that it's enough (since the romstage is currently always the diff --git a/src/soc/samsung/exynos5420/uart.c b/src/soc/samsung/exynos5420/uart.c index b2a0edd..9c78075 100644 --- a/src/soc/samsung/exynos5420/uart.c +++ b/src/soc/samsung/exynos5420/uart.c @@ -176,7 +176,7 @@ /* Exynos5250 implements this too. */ }
-#ifndef __PRE_RAM__ +#if ENV_RAMSTAGE void uart_fill_lb(void *data) { struct lb_serial serial;