Martin Roth has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/43757 )
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
src/lib: Allow the board_reset() function to be overridden
psp_verstage is currently hanging on reset due to the dcache_clean_all() function in board_reset. Allowing the board_reset() call to be overridden allows us to fix that cleanly.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I563592326a6f5fed77b369c07be8e23a918c180e --- M src/lib/Kconfig M src/lib/reset.c 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/43757/1
diff --git a/src/lib/Kconfig b/src/lib/Kconfig index a6fb1f1..5270fee 100644 --- a/src/lib/Kconfig +++ b/src/lib/Kconfig @@ -1,3 +1,8 @@ +config CUSTOM_BOARD_RESET + bool + help + Selected by chips that need a different board_reset() function. + config MISSING_BOARD_RESET bool help diff --git a/src/lib/reset.c b/src/lib/reset.c index 891b9f5..ed050d7 100644 --- a/src/lib/reset.c +++ b/src/lib/reset.c @@ -5,6 +5,7 @@ #include <halt.h> #include <reset.h>
+#if !CONFIG(CUSTOM_BOARD_RESET) __noreturn void board_reset(void) { printk(BIOS_INFO, "%s() called!\n", __func__); @@ -12,6 +13,7 @@ do_board_reset(); halt(); } +#endif
#if CONFIG(MISSING_BOARD_RESET) void do_board_reset(void)
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43757 )
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/Kconfig File src/lib/Kconfig:
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/Kconfig@4 PS1, Line 4: need a different provide their own
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/reset.c File src/lib/reset.c:
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/reset.c@8 PS1, Line 8: CONFIG(CUSTOM_BOARD_RESET) Can you exclude the compilation unit instead? Otherwise when CUSTOM_BOARD_RESET is set this file is empty.
Martin Roth has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43757 )
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
Patch Set 1:
(2 comments)
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/Kconfig File src/lib/Kconfig:
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/Kconfig@4 PS1, Line 4: need a different
provide their own
Done
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/reset.c File src/lib/reset.c:
https://review.coreboot.org/c/coreboot/+/43757/1/src/lib/reset.c@8 PS1, Line 8: CONFIG(CUSTOM_BOARD_RESET)
Can you exclude the compilation unit instead? Otherwise when CUSTOM_BOARD_RESET is set this file is […]
Sure, I guess. I'm only hesitant because if another function gets added to this file, it still won't get built in. I don't see the issue with building in a file with no code in it.
Since that's a "what if", and we can say "well, what if something gets added into the board_reset function" as well, I'm not going to worry about it right now.
Hello build bot (Jenkins), Raul Rangel, Eric Peers, Rob Barnes, Felix Held,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/43757
to look at the new patch set (#2).
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
src/lib: Allow the board_reset() function to be overridden
psp_verstage is currently hanging on reset due to the dcache_clean_all() function in board_reset. Allowing the board_reset() call to be overridden allows us to fix that cleanly.
Signed-off-by: Martin Roth martin@coreboot.org Change-Id: I563592326a6f5fed77b369c07be8e23a918c180e --- M src/lib/Kconfig M src/lib/Makefile.inc 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/43757/2
Raul Rangel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/43757 )
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
Patch Set 2: Code-Review+2
(1 comment)
https://review.coreboot.org/c/coreboot/+/43757/2/src/lib/Kconfig File src/lib/Kconfig:
https://review.coreboot.org/c/coreboot/+/43757/2/src/lib/Kconfig@6 PS2, Line 6: MISSING_BOARD_RESET You could add a depends !CUSTOM_BOARD_RESET
Martin Roth has abandoned this change. ( https://review.coreboot.org/c/coreboot/+/43757 )
Change subject: src/lib: Allow the board_reset() function to be overridden ......................................................................
Abandoned
No longer needed.