fix(ivy/shim): print welcome message after enabling the MMU
The shim prints a welcome message on boot. It uses the mp_printf()
function, which internally uses a spinlock. The shim currently
prints the welcome message *before* enabling the MMU, which causes
a hang while acquiring the spinlock.
This patch prints the welcome message *after* enabling the MMU to
fix the problem.
Signed-off-by: Varun Wadekar <vwadekar@nvidia.com>
Change-Id: I8bd1ba2c4035fddf6f6a4c3d6844d69e7a11be7d
diff --git a/spm/ivy/shim/shim_main.c b/spm/ivy/shim/shim_main.c
index f03a52f..1d6c723 100644
--- a/spm/ivy/shim/shim_main.c
+++ b/spm/ivy/shim/shim_main.c
@@ -1,5 +1,6 @@
/*
* Copyright (c) 2021, Arm Limited. All rights reserved.
+ * Copyright (c) 2021, NVIDIA Corporation. All rights reserved.
*
* SPDX-License-Identifier: BSD-3-Clause
*/
@@ -93,12 +94,12 @@
/* Initialise console */
set_putc_impl(HVC_CALL_AS_STDOUT);
- INFO("Booting S-EL1 Shim\n");
-
/* Configure and enable Stage-1 MMU, enable D-Cache */
shim_plat_configure_mmu();
enable_mmu_el1(0);
+ INFO("Booting S-EL1 Shim\n");
+
shim_print_memory_layout();
return 0;