freebsd-skq/sys/powerpc/aim
Brandon Bergren bad9fa5662 [PowerPC] Fix AP bringup on 32-bit AIM SMP
In r361544, the pmap drivers were converted to ifuncs. When doing so,
this changed the call type of pmap functions to be called via the
secure-plt stubs.

These stubs depend on the TOC base being loaded to r30 to run properly.

On SMP AIM (i.e. a dual processor G4 or running 32-bit on G5), since the
APs were being started up from the reset vector instead of going
through __start, they had never had r30 initialized properly, so when the
cpu_reset code in trap_subr32.S attempted to branch to
pmap_cpu_bootstrap(), it was loading the target from the wrong location.

Ensure r30 is set up directly in the cpu_reset trap code, so we can make
PLT calls as normal.

Fixes boot on my SMP G4.

Reviewed by:	jhibbits
MFC after:	3 days
Sponsored by:	Tag1 Consulting, Inc.
2021-03-06 15:46:28 -06:00
..
aim_machdep.c powerpc/aim: Add machine check handler for TLB multihit 2020-12-30 23:45:10 +01:00
locore32.S powerpc64: Add a trap stack area 2019-02-04 16:02:03 +00:00
locore64.S powerpc64: Fix boot on virtual-mode OF (PowerMac G5) 2021-02-07 16:13:55 -06:00
locore.S Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00
mmu_oea64.c vm_phys: Try to clean up NUMA KPIs 2020-11-19 03:59:21 +00:00
mmu_oea64.h Implement superpages for PowerPC64 (HPT) 2020-11-06 14:12:45 +00:00
mmu_oea.c [PowerPC] Implement pmap_mincore() for moea 2020-09-13 16:46:03 +00:00
mmu_radix.c Add a VA_IS_CLEANMAP() macro. 2021-02-17 16:32:11 -08:00
moea64_native.c [PowerPC] Fix powerpc64le boot after HPT superpages addition 2020-11-08 23:34:06 +00:00
mp_cpudep.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
slb.c powerpc: clean up empty lines in .c and .h files 2020-09-01 21:20:08 +00:00
trap_subr32.S [PowerPC] Fix AP bringup on 32-bit AIM SMP 2021-03-06 15:46:28 -06:00
trap_subr64.S Add CFI start/end proc directives to arm64, i386, and ppc 2020-12-05 00:33:28 +00:00