summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/arch/ppc64/stages.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/arch/ppc64/stages.c b/src/arch/ppc64/stages.c
index 01b9efaba8..c6d35ed452 100644
--- a/src/arch/ppc64/stages.c
+++ b/src/arch/ppc64/stages.c
@@ -25,10 +25,15 @@ void stage_entry(uintptr_t stage_arg)
_cbmem_top_ptr = stage_arg;
#if ENV_RAMSTAGE
+#define __stringify_in_c(...) #__VA_ARGS__
+#define stringify_in_c(...) __stringify_in_c(__VA_ARGS__) " "
+#define PPC_RAW_SLBIA(IH) (0x7c0003e4 | (((IH) & 0x7) << 21))
+#define PPC_SLBIA(IH) stringify_in_c(.long PPC_RAW_SLBIA(IH))
+
hrmor = read_spr(SPR_HRMOR);
asm volatile("sync; isync" ::: "memory");
write_spr(SPR_HRMOR, 0);
- asm volatile("or 1,1,%0; slbia 7; sync; isync" :: "r"(hrmor) : "memory");
+ asm volatile("or 1,1,%0;" PPC_SLBIA(7)"; sync; isync" :: "r"(hrmor) : "memory");
#endif
main();