Kyösti Mälkki has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/34982 )
Change subject: samusung/exynos: Use ENV_BEFORE_RAMSTAGE ......................................................................
samusung/exynos: Use ENV_BEFORE_RAMSTAGE
Change-Id: I9dbf0fc14516f766fd164c7308906456f2865e89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/samsung/exynos5250/alternate_cbfs.c M src/soc/samsung/exynos5420/alternate_cbfs.c 2 files changed, 16 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/34982/1
diff --git a/src/soc/samsung/exynos5250/alternate_cbfs.c b/src/soc/samsung/exynos5250/alternate_cbfs.c index e431672..90b1a7d 100644 --- a/src/soc/samsung/exynos5250/alternate_cbfs.c +++ b/src/soc/samsung/exynos5250/alternate_cbfs.c @@ -35,12 +35,14 @@ * should contain all available stages/payloads/etc. It is loaded when this * 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. + * rest of the firmware's lifetime and all subsequent stages can just directly + * reference it there. */ static int usb_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_BEFORE_RAMSTAGE) + return 0; + static int first_run = 1; int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -61,7 +63,6 @@ printk(BIOS_DEBUG, "USB A-A transfer successful, CBFS image should now" " be at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
@@ -75,7 +76,9 @@ */ static int sdmmc_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_BEFORE_RAMSTAGE) + return 0; + /* * 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 @@ -100,7 +103,6 @@ printk(BIOS_DEBUG, "SDMMC read successful, CBFS image should now be" " at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.c b/src/soc/samsung/exynos5420/alternate_cbfs.c index ba3f9a3..90d7756 100644 --- a/src/soc/samsung/exynos5420/alternate_cbfs.c +++ b/src/soc/samsung/exynos5420/alternate_cbfs.c @@ -36,12 +36,14 @@ * should contain all available stages/payloads/etc. It is loaded when this * 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. + * rest of the firmware's lifetime and all subsequent stages can just directly + * reference it there. */ static int usb_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_BEFORE_RAMSTAGE) + return 0; + static int first_run = 1; int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -65,7 +67,6 @@ printk(BIOS_DEBUG, "USB A-A transfer successful, CBFS image should now" " be at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
@@ -79,7 +80,9 @@ */ static int sdmmc_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_BEFORE_RAMSTAGE) + return 0; + /* * 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 @@ -107,7 +110,6 @@ printk(BIOS_DEBUG, "SDMMC read successful, CBFS image should now be" " at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34982
to look at the new patch set (#3).
Change subject: samsung/exynos: Use ENV_BEFORE_RAMSTAGE ......................................................................
samsung/exynos: Use ENV_BEFORE_RAMSTAGE
Change-Id: I9dbf0fc14516f766fd164c7308906456f2865e89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/soc/samsung/exynos5250/alternate_cbfs.c M src/soc/samsung/exynos5420/alternate_cbfs.c 2 files changed, 16 insertions(+), 12 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/34982/3
Hello build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34982
to look at the new patch set (#4).
Change subject: arch/non-x86: Use ENV_BEFORE_RAMSTAGE ......................................................................
arch/non-x86: Use ENV_BEFORE_RAMSTAGE
Change-Id: I9dbf0fc14516f766fd164c7308906456f2865e89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/riscv/include/arch/memlayout.h M src/soc/samsung/exynos5250/alternate_cbfs.c M src/soc/samsung/exynos5420/alternate_cbfs.c 3 files changed, 17 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/34982/4
Julius Werner has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/34982 )
Change subject: arch/non-x86: Use ENV_ROMSTAGE_OR_BEFORE ......................................................................
Patch Set 10: Code-Review+2
Hello ron minnich, Julius Werner, build bot (Jenkins), Philipp Hug,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/34982
to look at the new patch set (#13).
Change subject: arch/non-x86: Use ENV_ROMSTAGE_OR_BEFORE ......................................................................
arch/non-x86: Use ENV_ROMSTAGE_OR_BEFORE
Change-Id: I9dbf0fc14516f766fd164c7308906456f2865e89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com --- M src/arch/riscv/include/arch/memlayout.h M src/soc/samsung/exynos5250/alternate_cbfs.c M src/soc/samsung/exynos5420/alternate_cbfs.c 3 files changed, 17 insertions(+), 13 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/82/34982/13
Kyösti Mälkki has submitted this change and it was merged. ( https://review.coreboot.org/c/coreboot/+/34982 )
Change subject: arch/non-x86: Use ENV_ROMSTAGE_OR_BEFORE ......................................................................
arch/non-x86: Use ENV_ROMSTAGE_OR_BEFORE
Change-Id: I9dbf0fc14516f766fd164c7308906456f2865e89 Signed-off-by: Kyösti Mälkki kyosti.malkki@gmail.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/34982 Reviewed-by: Julius Werner jwerner@chromium.org Tested-by: build bot (Jenkins) no-reply@coreboot.org --- M src/arch/riscv/include/arch/memlayout.h M src/soc/samsung/exynos5250/alternate_cbfs.c M src/soc/samsung/exynos5420/alternate_cbfs.c 3 files changed, 17 insertions(+), 13 deletions(-)
Approvals: build bot (Jenkins): Verified Julius Werner: Looks good to me, approved
diff --git a/src/arch/riscv/include/arch/memlayout.h b/src/arch/riscv/include/arch/memlayout.h index 7baab76..ac707d0 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_ROMSTAGE_OR_BEFORE #define CAR_STACK(addr, size) \ REGION(car_stack, addr, size, 4K) \ ALIAS_REGION(car_stack, stack) diff --git a/src/soc/samsung/exynos5250/alternate_cbfs.c b/src/soc/samsung/exynos5250/alternate_cbfs.c index e431672..c319019 100644 --- a/src/soc/samsung/exynos5250/alternate_cbfs.c +++ b/src/soc/samsung/exynos5250/alternate_cbfs.c @@ -35,12 +35,14 @@ * should contain all available stages/payloads/etc. It is loaded when this * 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. + * rest of the firmware's lifetime and all subsequent stages can just directly + * reference it there. */ static int usb_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_ROMSTAGE_OR_BEFORE) + return 0; + static int first_run = 1; int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -61,7 +63,6 @@ printk(BIOS_DEBUG, "USB A-A transfer successful, CBFS image should now" " be at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
@@ -75,7 +76,9 @@ */ static int sdmmc_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_ROMSTAGE_OR_BEFORE) + return 0; + /* * 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 @@ -100,7 +103,6 @@ printk(BIOS_DEBUG, "SDMMC read successful, CBFS image should now be" " at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
diff --git a/src/soc/samsung/exynos5420/alternate_cbfs.c b/src/soc/samsung/exynos5420/alternate_cbfs.c index ba3f9a3..fabc9cf 100644 --- a/src/soc/samsung/exynos5420/alternate_cbfs.c +++ b/src/soc/samsung/exynos5420/alternate_cbfs.c @@ -36,12 +36,14 @@ * should contain all available stages/payloads/etc. It is loaded when this * 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. + * rest of the firmware's lifetime and all subsequent stages can just directly + * reference it there. */ static int usb_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_ROMSTAGE_OR_BEFORE) + return 0; + static int first_run = 1; int (*irom_load_usb)(void) = *irom_load_image_from_usb_ptr;
@@ -65,7 +67,6 @@ printk(BIOS_DEBUG, "USB A-A transfer successful, CBFS image should now" " be at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }
@@ -79,7 +80,9 @@ */ static int sdmmc_cbfs_open(void) { -#ifdef __PRE_RAM__ + if (!ENV_ROMSTAGE_OR_BEFORE) + return 0; + /* * 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 @@ -107,7 +110,6 @@ printk(BIOS_DEBUG, "SDMMC read successful, CBFS image should now be" " at %p\n", _cbfs_cache); first_run = 0; -#endif return 0; }