Thread (5 messages) 5 messages, 3 authors, 2017-01-24

Re: [PATCH] powerpc/pasemi/nemo: Fix low memory values for boot.

flat view

From: Michael Ellerman <mpe@ellerman.id.au>
Date: 2017-01-23 06:15:34

Darren Stevens [off-list ref] writes:
Commit 5c0484e25ec0 ('powerpc: Endian safe trampoline') added a
macro 'FIXUP_ENDIAN' to head_64.S. The CFE on Nemo has a bug 
that shows up when this is included, the system hangs right after
printing the initial memory map, before the CPU's are started.

Clearing the long long at addr 8 has been shown to fix this, so
add an initalisation to head_64.S so the system will boot.
I'd really prefer it if someone could tell me why we need to clear it.
But I assume no one knows?
quoted hunk ↗ jump to hunk
diff --git a/arch/powerpc/kernel/head_64.S b/arch/powerpc/kernel/head_64.S
index 1dc5eae..032b317 100644
--- a/arch/powerpc/kernel/head_64.S
+++ b/arch/powerpc/kernel/head_64.S
@@ -79,6 +79,13 @@ _GLOBAL(__start)
    /* NOP this out unconditionally */
 BEGIN_FTR_SECTION
    FIXUP_ENDIAN
+#ifdef CONFIG_PPC_PASEMI_NEMO
+   /*
+    * Zero address 8 so Nemo will boot
+    */
+   li  r0,0
+   std 0,8(0)
+#endif
    b   __start_initialization_multiplatform
 END_FTR_SECTION(0, 1)
 
I don't want to pollute this code with NEMO workarounds if we can avoid
it.

You said the hang happens after printing the initial memory map, I'm not
quite sure where you mean, but it sounds like that will be late enough
that we can do the clear in pasemi platform code?

cheers
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help