gd->mon_len is calculated in the same way as SH and RISC-V.

Signed-off-by: Yao Zi <[email protected]>
---

New patch since v4, to ensure U-Boot correctly reserves its own space
for relocation, even without SYS_MONITOR_BASE enabled through
MTD_NOR_FLASH.
---
 common/board_f.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/common/board_f.c b/common/board_f.c
index ead7b6dd743e..bb29b056f3c8 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -277,7 +277,7 @@ static int setup_mon_len(void)
        gd->mon_len = (ulong)_end - (ulong)_init;
 #elif defined(CONFIG_NIOS2) || defined(CONFIG_XTENSA)
        gd->mon_len = CONFIG_SYS_MONITOR_LEN;
-#elif defined(CONFIG_SH) || defined(CONFIG_RISCV)
+#elif defined(CONFIG_SH) || defined(CONFIG_RISCV) || defined(CONFIG_LOONGARCH)
        gd->mon_len = (ulong)(__bss_end) - (ulong)(_start);
 #elif defined(CONFIG_SYS_MONITOR_BASE)
        /* TODO: use (ulong)__bss_end - (ulong)__text_start; ? */
-- 
2.55.0

Reply via email to