Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36421 )
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc M src/soc/imgtec/pistachio/cbmem.c 5 files changed, 7 insertions(+), 4 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36421/1
diff --git a/src/arch/mips/Kconfig b/src/arch/mips/Kconfig index 9df514b..321bfc9 100644 --- a/src/arch/mips/Kconfig +++ b/src/arch/mips/Kconfig @@ -22,6 +22,7 @@ default n select BOOTBLOCK_CUSTOM select C_ENVIRONMENT_BOOTBLOCK + select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_VERSTAGE_MIPS bool diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h index 63306bd..b7795ea 100644 --- a/src/arch/mips/include/arch/stages.h +++ b/src/arch/mips/include/arch/stages.h @@ -16,6 +16,6 @@
#include <main_decl.h>
-void stage_entry(void); +void stage_entry(void *stage_arg);
#endif /* __MIPS_ARCH_STAGES_H */ diff --git a/src/arch/mips/stages.c b/src/arch/mips/stages.c index 0971e98..c5b8bea 100644 --- a/src/arch/mips/stages.c +++ b/src/arch/mips/stages.c @@ -14,7 +14,10 @@ #include <arch/stages.h> #include <arch/cache.h>
-void stage_entry(void) +uintptr_t _cbmem_top_ptr; + +void stage_entry(void *stage_arg) { + _cbmem_top_ptr = (uintptr_t)stage_arg; main(); } diff --git a/src/soc/imgtec/pistachio/Makefile.inc b/src/soc/imgtec/pistachio/Makefile.inc index 6e8d539..9392d30 100644 --- a/src/soc/imgtec/pistachio/Makefile.inc +++ b/src/soc/imgtec/pistachio/Makefile.inc @@ -28,7 +28,6 @@
bootblock-y += monotonic_timer.c
-ramstage-y += cbmem.c ramstage-y += monotonic_timer.c ramstage-y += soc.c ramstage-y += reset.c diff --git a/src/soc/imgtec/pistachio/cbmem.c b/src/soc/imgtec/pistachio/cbmem.c index 112df7c..5725844 100644 --- a/src/soc/imgtec/pistachio/cbmem.c +++ b/src/soc/imgtec/pistachio/cbmem.c @@ -18,7 +18,7 @@ #include <stdlib.h> #include <symbols.h>
-void *cbmem_top(void) +void *cbmem_top_romstage(void) { return _dram + (CONFIG_DRAM_SIZE_MB << 20); }
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36421
to look at the new patch set (#3).
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc 4 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36421/3
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36421
to look at the new patch set (#4).
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc 4 files changed, 5 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36421/4
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36421
to look at the new patch set (#7).
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36421/7
Hello build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36421
to look at the new patch set (#8).
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc 4 files changed, 7 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36421/8
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36421 )
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
Patch Set 8: Code-Review+2
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36421 )
Change subject: arch/mips: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/mips: Pass cbmem_top to ramstage via calling argument
This allows to use a common cbmem_top implementation.
Change-Id: I85efe3899607854c36d0ec594868f690eb724a7f Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/36421 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M src/arch/mips/Kconfig M src/arch/mips/include/arch/stages.h M src/arch/mips/stages.c M src/soc/imgtec/pistachio/Makefile.inc 4 files changed, 7 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/src/arch/mips/Kconfig b/src/arch/mips/Kconfig index 9df514b..321bfc9 100644 --- a/src/arch/mips/Kconfig +++ b/src/arch/mips/Kconfig @@ -22,6 +22,7 @@ default n select BOOTBLOCK_CUSTOM select C_ENVIRONMENT_BOOTBLOCK + select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_VERSTAGE_MIPS bool diff --git a/src/arch/mips/include/arch/stages.h b/src/arch/mips/include/arch/stages.h index 63306bd..3da02da 100644 --- a/src/arch/mips/include/arch/stages.h +++ b/src/arch/mips/include/arch/stages.h @@ -14,8 +14,9 @@ #ifndef __MIPS_ARCH_STAGES_H #define __MIPS_ARCH_STAGES_H
+#include <stdint.h> #include <main_decl.h>
-void stage_entry(void); +void stage_entry(uintptr_t stage_arg);
#endif /* __MIPS_ARCH_STAGES_H */ diff --git a/src/arch/mips/stages.c b/src/arch/mips/stages.c index 0971e98..bf31153 100644 --- a/src/arch/mips/stages.c +++ b/src/arch/mips/stages.c @@ -11,10 +11,13 @@ * GNU General Public License for more details. */
+#include <cbmem.h> #include <arch/stages.h> #include <arch/cache.h>
-void stage_entry(void) +void stage_entry(uintptr_t stage_arg) { + if (!ENV_ROMSTAGE_OR_BEFORE) + _cbmem_top_ptr = stage_arg; main(); } diff --git a/src/soc/imgtec/pistachio/Makefile.inc b/src/soc/imgtec/pistachio/Makefile.inc index 6e8d539..9392d30 100644 --- a/src/soc/imgtec/pistachio/Makefile.inc +++ b/src/soc/imgtec/pistachio/Makefile.inc @@ -28,7 +28,6 @@
bootblock-y += monotonic_timer.c
-ramstage-y += cbmem.c ramstage-y += monotonic_timer.c ramstage-y += soc.c ramstage-y += reset.c