aboutsummaryrefslogtreecommitdiff
path: root/sys/conf
diff options
context:
space:
mode:
authorEd Schouten <ed@FreeBSD.org>2016-09-18 11:36:54 +0000
committerEd Schouten <ed@FreeBSD.org>2016-09-18 11:36:54 +0000
commit5e7b54b184da2c11df01c50ca53be077a14be081 (patch)
treef16c2a580202fdfa39a2dda6b7773f1611e935ca /sys/conf
parentc59a0a34e8f3cc64a2b372824a7177b88af2a962 (diff)
downloadsrc-5e7b54b184da2c11df01c50ca53be077a14be081.tar.gz
src-5e7b54b184da2c11df01c50ca53be077a14be081.zip
Add very preliminary support for CloudABI for ARMv6.
In order to make CloudABI work on ARMv6, start off by copying over the sysvec for ARM64 and adjust it to use 32-bit registers. Also add code for fetching arguments from the stack if needed, as there are fewer register than on ARM64. Also import the vDSO that is needed to invoke system calls. This vDSO uses the intra procedure call register (ip) to store the system call number. This is a bit simpler than what native FreeBSD does, as FreeBSD uses r7, while preserving the original r7 into ip. This sysvec seems to be complete enough to start CloudABI processes. These processes are capable of linking in the vDSO and are therefore capable of executing (most?) system calls successfully. Unfortunately, the biggest show stopper is still that TLS is completely broken: - The linker used by CloudABI, LLD, still has troubles with some of the relocations needed for TLS. See LLVM bug 30218 for more details. - Whereas FreeBSD uses the tpidruro register for TLS, for CloudABI I want to make use of tpidrurw, so that userspace can modify the base address directly. This is needed for efficient emulation. Unfortunately, this register doesn't seem to be preserved across context switches yet. Obtained from: https://github.com/NuxiNL/cloudabi (the vDSO)
Notes
Notes: svn path=/head/; revision=305928
Diffstat (limited to 'sys/conf')
-rw-r--r--sys/conf/files.arm13
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/conf/files.arm b/sys/conf/files.arm
index 86ae79e96dd1..bc7d4f2d7817 100644
--- a/sys/conf/files.arm
+++ b/sys/conf/files.arm
@@ -1,4 +1,16 @@
# $FreeBSD$
+cloudabi32_vdso.o optional compat_cloudabi32 \
+ dependency "$S/contrib/cloudabi/cloudabi_vdso_armv6.S" \
+ compile-with "${CC} -x assembler-with-cpp -shared -nostdinc -nostdlib -Wl,-T$S/compat/cloudabi/cloudabi_vdso.lds $S/contrib/cloudabi/cloudabi_vdso_armv6.S -o ${.TARGET}" \
+ no-obj no-implicit-rule \
+ clean "cloudabi32_vdso.o"
+#
+cloudabi32_vdso_blob.o optional compat_cloudabi32 \
+ dependency "cloudabi32_vdso.o" \
+ compile-with "${OBJCOPY} --input-target binary --output-target elf32-littlearm --binary-architecture arm cloudabi32_vdso.o ${.TARGET}" \
+ no-implicit-rule \
+ clean "cloudabi32_vdso_blob.o"
+#
arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt
arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt
arm/arm/autoconf.c standard
@@ -85,6 +97,7 @@ arm/arm/undefined.c standard
arm/arm/unwind.c optional ddb | kdtrace_hooks
arm/arm/vm_machdep.c standard
arm/arm/vfp.c standard
+arm/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32
board_id.h standard \
dependency "$S/arm/conf/genboardid.awk $S/arm/conf/mach-types" \
compile-with "${AWK} -f $S/arm/conf/genboardid.awk $S/arm/conf/mach-types > board_id.h" \