Merge pull request #695 from soby-mathew/sm/AArch32_fixes
Fixes for AArch32 port of TF
diff --git a/common/bl_common.c b/common/bl_common.c
index 6dcd4c1..bae02d4 100644
--- a/common/bl_common.c
+++ b/common/bl_common.c
@@ -419,9 +419,11 @@
PRINT_IMAGE_ARG(1);
PRINT_IMAGE_ARG(2);
PRINT_IMAGE_ARG(3);
+#ifndef AARCH32
PRINT_IMAGE_ARG(4);
PRINT_IMAGE_ARG(5);
PRINT_IMAGE_ARG(6);
PRINT_IMAGE_ARG(7);
+#endif
#undef PRINT_IMAGE_ARG
}
diff --git a/lib/el3_runtime/aarch32/context_mgmt.c b/lib/el3_runtime/aarch32/context_mgmt.c
index 6915ded..bc5f9c4 100644
--- a/lib/el3_runtime/aarch32/context_mgmt.c
+++ b/lib/el3_runtime/aarch32/context_mgmt.c
@@ -86,6 +86,8 @@
/* Clear any residual register values from the context */
memset(ctx, 0, sizeof(*ctx));
+ reg_ctx = get_regs_ctx(ctx);
+
/*
* Base the context SCR on the current value, adjust for entry point
* specific requirements
@@ -121,8 +123,6 @@
if (GET_M32(ep->spsr) == MODE32_hyp)
scr |= SCR_HCE_BIT;
- reg_ctx = get_regs_ctx(ctx);
-
write_ctx_reg(reg_ctx, CTX_SCR, scr);
write_ctx_reg(reg_ctx, CTX_LR, ep->pc);
write_ctx_reg(reg_ctx, CTX_SPSR, ep->spsr);