diff options
author | Helge Deller <deller@gmx.de> | 2023-10-27 11:11:45 +0200 |
---|---|---|
committer | Helge Deller <deller@gmx.de> | 2023-10-27 11:11:45 +0200 |
commit | 4670cf4068a7036956de5f5401b351daaba66a9c (patch) | |
tree | f6b9b693dc6824ff2718f843ad084d2e12c2e80f | |
parent | 888d51209f7c8b0ea3e2b3c03cf323ec5f50996f (diff) | |
download | seabios-hppa-4670cf4068a7036956de5f5401b351daaba66a9c.zip seabios-hppa-4670cf4068a7036956de5f5401b351daaba66a9c.tar.gz seabios-hppa-4670cf4068a7036956de5f5401b351daaba66a9c.tar.bz2 |
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>
-rw-r--r-- | src/parisc/head.S | 7 | ||||
-rw-r--r-- | src/parisc/hppa_hardware.h | 2 | ||||
-rw-r--r-- | src/parisc/parisc.c | 2 |
3 files changed, 6 insertions, 5 deletions
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 @@ $smp_exit_loop: 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 @@ extern char iodc_entry_table[14*4]; #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) { |