Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36276 )
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/cbmem.c 4 files changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/1
diff --git a/src/arch/ppc64/Kconfig b/src/arch/ppc64/Kconfig index 0699e91..da9c155 100644 --- a/src/arch/ppc64/Kconfig +++ b/src/arch/ppc64/Kconfig @@ -1,5 +1,6 @@ config ARCH_PPC64 bool + select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_BOOTBLOCK_PPC64 bool diff --git a/src/arch/ppc64/include/arch/stages.h b/src/arch/ppc64/include/arch/stages.h index a4939b1..54a8092 100644 --- a/src/arch/ppc64/include/arch/stages.h +++ b/src/arch/ppc64/include/arch/stages.h @@ -16,6 +16,6 @@
#include <main_decl.h>
-void stage_entry(void) __attribute__((section(".text.stage_entry"))); +void stage_entry(void *arg) __attribute__((section(".text.stage_entry")));
#endif diff --git a/src/arch/ppc64/stages.c b/src/arch/ppc64/stages.c index 3cc9371..c7a3900 100644 --- a/src/arch/ppc64/stages.c +++ b/src/arch/ppc64/stages.c @@ -22,9 +22,14 @@ * linker script. */
+#include <cbmem.h> #include <arch/stages.h>
-void stage_entry(void) +uintptr_t _cbmem_top_ptr; + +void stage_entry(void *arg) { + if (ENV_RAMSTAGE) + _cbmem_top_ptr = (uintptr_t)arg; main(); } diff --git a/src/mainboard/emulation/qemu-power8/cbmem.c b/src/mainboard/emulation/qemu-power8/cbmem.c index 3df6b80..94b4c7c 100644 --- a/src/mainboard/emulation/qemu-power8/cbmem.c +++ b/src/mainboard/emulation/qemu-power8/cbmem.c @@ -15,7 +15,7 @@
#include <cbmem.h>
-void *cbmem_top(void) +void *cbmem_top_romstage(void) { /* Top of cbmem is at lowest usable DRAM address below 4GiB. */ /* For now, last 1M of 4G */
Hello ron minnich, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36276
to look at the new patch set (#15).
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/cbmem.c 4 files changed, 9 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/15
Hello ron minnich, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36276
to look at the new patch set (#17).
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/17
Hello ron minnich, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36276
to look at the new patch set (#18).
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/18
Hello ron minnich, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36276
to look at the new patch set (#19).
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/19
Hello ron minnich, build bot (Jenkins), Patrick Georgi, Martin Roth,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/36276
to look at the new patch set (#20).
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/76/36276/20
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36276 )
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
Patch Set 20: Code-Review+2
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36276 )
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
Patch Set 20: Code-Review+2
Marty E. Plummer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/36276 )
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
Patch Set 24: Code-Review+1
Looks fine to me. I'm a fair ways off from this 'breaking' something for me.
Patrick Georgi has submitted this change. ( https://review.coreboot.org/c/coreboot/+/36276 )
Change subject: arch/ppc64: Pass cbmem_top to ramstage via calling argument ......................................................................
arch/ppc64: Pass cbmem_top to ramstage via calling argument
This avoids the need for a platform specific implementation of cbmem_top.
HOW TO TEST? There is no serial console for the qemu target...
Change-Id: I68aa09a46786eba37c009c5f08642445805b08eb Signed-off-by: Arthur Heymans arthur@aheymans.xyz Reviewed-on: https://review.coreboot.org/c/coreboot/+/36276 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Marty E. Plummer hanetzer@startmail.com Reviewed-by: Nico Huber nico.h@gmx.de Reviewed-by: Angel Pons th3fanbus@gmail.com --- M src/arch/ppc64/Kconfig M src/arch/ppc64/include/arch/stages.h M src/arch/ppc64/stages.c M src/mainboard/emulation/qemu-power8/Makefile.inc 4 files changed, 6 insertions(+), 3 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved Marty E. Plummer: Looks good to me, but someone else must approve Angel Pons: Looks good to me, approved
diff --git a/src/arch/ppc64/Kconfig b/src/arch/ppc64/Kconfig index 0699e91..da9c155 100644 --- a/src/arch/ppc64/Kconfig +++ b/src/arch/ppc64/Kconfig @@ -1,5 +1,6 @@ config ARCH_PPC64 bool + select RAMSTAGE_CBMEM_TOP_ARG
config ARCH_BOOTBLOCK_PPC64 bool diff --git a/src/arch/ppc64/include/arch/stages.h b/src/arch/ppc64/include/arch/stages.h index a4939b1..37e9f85 100644 --- a/src/arch/ppc64/include/arch/stages.h +++ b/src/arch/ppc64/include/arch/stages.h @@ -16,6 +16,6 @@
#include <main_decl.h>
-void stage_entry(void) __attribute__((section(".text.stage_entry"))); +void stage_entry(uintptr_t stage_arg) __attribute__((section(".text.stage_entry")));
#endif diff --git a/src/arch/ppc64/stages.c b/src/arch/ppc64/stages.c index 3cc9371..aacf45f 100644 --- a/src/arch/ppc64/stages.c +++ b/src/arch/ppc64/stages.c @@ -22,9 +22,12 @@ * linker script. */
+#include <cbmem.h> #include <arch/stages.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/mainboard/emulation/qemu-power8/Makefile.inc b/src/mainboard/emulation/qemu-power8/Makefile.inc index 5c6c56e..307cb19 100644 --- a/src/mainboard/emulation/qemu-power8/Makefile.inc +++ b/src/mainboard/emulation/qemu-power8/Makefile.inc @@ -15,7 +15,6 @@ bootblock-y += bootblock.c bootblock-y += uart.c romstage-y += cbmem.c -ramstage-y += cbmem.c romstage-y += romstage.c ramstage-y += timer.c romstage-y += uart.c