aboutsummaryrefslogtreecommitdiff
path: root/sys/arm64/arm64/mp_machdep.c
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2020-07-01 16:57:57 +0000
committerAndrew Turner <andrew@FreeBSD.org>2020-07-01 16:57:57 +0000
commite4fc3b653aceb1254d61efe674fbbe1bd4088085 (patch)
treeb5426cd96071bf5e3a99220d7af3355db699681e /sys/arm64/arm64/mp_machdep.c
parent5dbd4b8e96521244525a0fee29694719c873bd75 (diff)
downloadsrc-e4fc3b653aceb1254d61efe674fbbe1bd4088085.tar.gz
src-e4fc3b653aceb1254d61efe674fbbe1bd4088085.zip
Read the CPU 0 arm64 ID registers early in initarm
We also update the kernel view early in the boot. This will allow the use of the common kernel view in ifunc resolvers. Sponsored by: Innovate UK
Notes
Notes: svn path=/head/; revision=362845
Diffstat (limited to 'sys/arm64/arm64/mp_machdep.c')
-rw-r--r--sys/arm64/arm64/mp_machdep.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/sys/arm64/arm64/mp_machdep.c b/sys/arm64/arm64/mp_machdep.c
index b90873c65054..d3dea3597106 100644
--- a/sys/arm64/arm64/mp_machdep.c
+++ b/sys/arm64/arm64/mp_machdep.c
@@ -220,7 +220,7 @@ init_secondary(uint64_t cpu)
* We need this before signalling the CPU is ready to
* let the boot CPU use the results.
*/
- identify_cpu();
+ identify_cpu(cpu);
/* Ensure the stores in identify_cpu have completed */
atomic_thread_fence_acq_rel();
@@ -230,6 +230,8 @@ init_secondary(uint64_t cpu)
while (!atomic_load_int(&aps_ready))
__asm __volatile("wfe");
+ pcpup->pc_midr = get_midr();
+
/* Initialize curthread */
KASSERT(PCPU_GET(idlethread) != NULL, ("no idle thread"));
pcpup->pc_curthread = pcpup->pc_idlethread;