summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean Anderson <seanga2@gmail.com>2020-09-05 09:22:11 -0400
committerAndes <uboot@andestech.com>2020-10-26 09:27:19 +0800
commit32cef69da0cbd8d07dcd5b5bec66d2dc94e22be9 (patch)
tree55b8674a030245b9e03d0cb3e2c2d69f123feb63
parent8bb7496ef9188493b548ceb03b741b8f6465c339 (diff)
downloadu-boot-32cef69da0cbd8d07dcd5b5bec66d2dc94e22be9.tar.gz
riscv: Only enable OF_BOARD_FIXUP for S-Mode
It is unsafe to enable OF_BOARD_FIXUP only based on OF_SEPARATE. OF_SEPARATE may indicate that the user wishes U-Boot to use a different device tree than one obtained via OF_PRIOR_STAGE. However, OF_SEPARATE may also indicate that the device tree which would be obtained via OF_PRIOR_STAGE is invalid, nonexistant, or otherwise unusable. In this latter case, enabling OF_BOARD_FIXUP will result in corruption of the device tree. To remedy this, only enable OF_BOARD_FIXUP if U-Boot is configured for S-Mode. Fixes: 1c17e55594a394ced7de88d91be294eaf8c564c1 Signed-off-by: Sean Anderson <seanga2@gmail.com> Reviewed-by: Leo Liang <ycliang@andestech.com>
-rw-r--r--arch/riscv/Kconfig2
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/riscv/Kconfig b/arch/riscv/Kconfig
index aaa3b833a5..756047636d 100644
--- a/arch/riscv/Kconfig
+++ b/arch/riscv/Kconfig
@@ -272,6 +272,6 @@ config STACK_SIZE_SHIFT
default 14
config OF_BOARD_FIXUP
- default y if OF_SEPARATE
+ default y if OF_SEPARATE && RISCV_SMODE
endmenu