aboutsummaryrefslogtreecommitdiff
path: root/sys/amd64/amd64/machdep.c
diff options
context:
space:
mode:
authorAndrew Turner <andrew@FreeBSD.org>2020-07-05 14:38:22 +0000
committerAndrew Turner <andrew@FreeBSD.org>2020-07-05 14:38:22 +0000
commitfcf7a4819102791e44f076e86f1b1318a83f4851 (patch)
tree1df5c0c998b2da871df5386fade4baedc3a8b9b6 /sys/amd64/amd64/machdep.c
parent6bc927360c285410f641aaf87243715d1f52fdfd (diff)
downloadsrc-fcf7a4819102791e44f076e86f1b1318a83f4851.tar.gz
src-fcf7a4819102791e44f076e86f1b1318a83f4851.zip
Rerun kernel ifunc resolvers after all CPUs have started
On architectures that use RELA relocations it is safe to rerun the ifunc resolvers on after all CPUs have started, but while they are sill parked. On arm64 with big.LITTLE this is needed as some SoCs have shipped with different ID register values the big and little clusters meaning we were unable to rely on the register values from the boot CPU. Add support for rerunning the resolvers on arm64 and amd64 as these are both RELA using architectures. Reviewed by: kib Sponsored by: Innovate UK Differential Revision: https://reviews.freebsd.org/D25455
Notes
Notes: svn path=/head/; revision=362944
Diffstat (limited to 'sys/amd64/amd64/machdep.c')
-rw-r--r--sys/amd64/amd64/machdep.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/amd64/amd64/machdep.c b/sys/amd64/amd64/machdep.c
index 6227344569df..4fb846d75948 100644
--- a/sys/amd64/amd64/machdep.c
+++ b/sys/amd64/amd64/machdep.c
@@ -320,6 +320,13 @@ cpu_startup(dummy)
cpu_setregs();
}
+static void
+late_ifunc_resolve(void *dummy __unused)
+{
+ link_elf_late_ireloc();
+}
+SYSINIT(late_ifunc_resolve, SI_SUB_CPU, SI_ORDER_ANY, late_ifunc_resolve, NULL);
+
/*
* Send an interrupt to process.
*