parisc: Provide MEM_PDC_ENTRY as PDC entry point on SMP rendezvous
Hand over the architected MEM_PDC_ENTRY address (0x4800) instead of the
native address of pdc_entry() when providing the PDC entry point in the
SMP rendezvous function.
This fixes the 64-bit SMP boot, since it avoids the ldil instruction
which trashes he upper 32-bits.
Secondly, the linux kernel checks the provided value against the
PAGE0->mem_pdc value and complains if the differ.
Signed-off-by: Helge Deller <deller@gmx.de>
diff --git a/src/parisc/head.S b/src/parisc/head.S
index 3eb7e9c..3cfe9fd 100644
--- a/src/parisc/head.S
+++ b/src/parisc/head.S
@@ -176,13 +176,14 @@
rsm PSW_I, %r0 /* disable local irqs */
mtctl %r0, CR_EIEM
- /* on 64bit: Address of PDCE_PROC for each non-monarch processor in GR26. */
- load32 BOOTADDR(pdc_entry), %r26
+ /* provide PDCE_PROC entry in arg0 (required on 64-bit) */
+ load32 MEM_PDC_ENTRY, %arg0
/* jump to rendevouz */
ldw 0x10(%r0),%r3 /* MEM_RENDEZ */
/* ldw 0x28(%r0),%r0 MEM_RENDEZ_HI - assume addr < 4GB */
- cmpb,=,n %r0,%r3,startup /* branch to startup if not yet initialized */
+ cmpb,=,n %r0,%r3,enter_smp_idle_loop
+ nop /* failed backward branch is nullified */
load32 startup, %rp
bv,n 0(%r3)
diff --git a/src/parisc/hppa_hardware.h b/src/parisc/hppa_hardware.h
index f74e770..d4230da 100644
--- a/src/parisc/hppa_hardware.h
+++ b/src/parisc/hppa_hardware.h
@@ -7,6 +7,8 @@
#define FIRMWARE_START 0xf0000000
#define FIRMWARE_END 0xf0800000
+#define MEM_PDC_ENTRY 0x4800 /* PDC entry address */
+
#define DEVICE_HPA_LEN 0x00100000
#define GSC_HPA 0xffc00000
diff --git a/src/parisc/parisc.c b/src/parisc/parisc.c
index d4eea02..2be2a16 100644
--- a/src/parisc/parisc.c
+++ b/src/parisc/parisc.c
@@ -161,8 +161,6 @@
#define MIN_RAM_SIZE (16*1024*1024) // 16 MB
-#define MEM_PDC_ENTRY 0x4800 /* as in a B160L */
-
#define CPU_HPA_IDX(i) (CPU_HPA + (i)*0x1000) /* CPU_HPA of CPU#i */
static int index_of_CPU_HPA(unsigned long hpa) {