2004-05-14 11:49:40 +00:00
|
|
|
# $FreeBSD$
|
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)
2016-09-18 11:36:54 +00:00
|
|
|
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"
|
|
|
|
#
|
2016-09-07 05:34:41 +00:00
|
|
|
arm/annapurna/alpine/alpine_ccu.c optional al_ccu fdt
|
|
|
|
arm/annapurna/alpine/alpine_nb_service.c optional al_nb_service fdt
|
2016-09-20 11:11:06 +00:00
|
|
|
arm/annapurna/alpine/alpine_pci.c optional al_pci fdt
|
2016-10-20 11:23:59 +00:00
|
|
|
arm/annapurna/alpine/alpine_pci_msix.c optional al_pci fdt
|
2016-10-20 11:26:51 +00:00
|
|
|
arm/annapurna/alpine/alpine_serdes.c optional al_serdes fdt \
|
|
|
|
no-depend \
|
|
|
|
compile-with "${CC} -c -o ${.TARGET} ${CFLAGS} -I$S/contrib/alpine-hal -I$S/contrib/alpine-hal/eth ${PROF} ${.IMPSRC}"
|
2007-10-25 14:16:07 +00:00
|
|
|
arm/arm/autoconf.c standard
|
|
|
|
arm/arm/bcopy_page.S standard
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/bcopyinout.S standard
|
|
|
|
arm/arm/blockio.S standard
|
|
|
|
arm/arm/bus_space_asm_generic.S standard
|
2015-11-21 15:30:08 +00:00
|
|
|
arm/arm/bus_space_base.c optional fdt
|
|
|
|
arm/arm/bus_space_generic.c standard
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/busdma_machdep-v4.c optional !armv7 !armv6 !ARM_USE_V6_BUSDMA
|
|
|
|
arm/arm/busdma_machdep-v6.c optional armv7 | armv6 | ARM_USE_V6_BUSDMA
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/copystr.S standard
|
|
|
|
arm/arm/cpufunc.c standard
|
|
|
|
arm/arm/cpufunc_asm.S standard
|
2016-02-02 14:53:34 +00:00
|
|
|
arm/arm/cpufunc_asm_arm9.S optional cpu_arm9 | cpu_arm9e
|
2015-03-29 22:43:39 +00:00
|
|
|
arm/arm/cpufunc_asm_arm11.S optional cpu_arm1176
|
|
|
|
arm/arm/cpufunc_asm_arm11x6.S optional cpu_arm1176
|
2016-02-03 09:15:44 +00:00
|
|
|
arm/arm/cpufunc_asm_armv4.S optional cpu_arm9 | cpu_arm9e | cpu_fa526 | cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342
|
2015-03-29 22:43:39 +00:00
|
|
|
arm/arm/cpufunc_asm_armv5_ec.S optional cpu_arm9e
|
|
|
|
arm/arm/cpufunc_asm_armv6.S optional cpu_arm1176
|
2017-02-02 06:14:44 +00:00
|
|
|
arm/arm/cpufunc_asm_armv7.S optional cpu_cortexa | cpu_krait | cpu_mv_pj4b
|
2015-03-29 22:43:39 +00:00
|
|
|
arm/arm/cpufunc_asm_fa526.S optional cpu_fa526
|
|
|
|
arm/arm/cpufunc_asm_pj4b.S optional cpu_mv_pj4b
|
|
|
|
arm/arm/cpufunc_asm_sheeva.S optional cpu_arm9e
|
2016-02-03 09:15:44 +00:00
|
|
|
arm/arm/cpufunc_asm_xscale.S optional cpu_xscale_pxa2x0 | cpu_xscale_ixp425 | cpu_xscale_81342
|
2015-03-29 22:43:39 +00:00
|
|
|
arm/arm/cpufunc_asm_xscale_c3.S optional cpu_xscale_81342
|
2014-12-28 18:12:56 +00:00
|
|
|
arm/arm/cpuinfo.c standard
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/cpu_asm-v6.S optional armv7 | armv6
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/db_disasm.c optional ddb
|
|
|
|
arm/arm/db_interface.c optional ddb
|
|
|
|
arm/arm/db_trace.c optional ddb
|
2016-01-25 18:02:28 +00:00
|
|
|
arm/arm/debug_monitor.c optional ddb armv6
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/debug_monitor.c optional ddb armv7
|
2005-10-04 14:37:53 +00:00
|
|
|
arm/arm/disassem.c optional ddb
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/dump_machdep.c standard
|
|
|
|
arm/arm/elf_machdep.c standard
|
2014-10-18 13:38:04 +00:00
|
|
|
arm/arm/elf_note.S standard
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/exception.S standard
|
|
|
|
arm/arm/fiq.c standard
|
|
|
|
arm/arm/fiq_subr.S standard
|
|
|
|
arm/arm/fusu.S standard
|
2006-07-14 00:50:51 +00:00
|
|
|
arm/arm/gdb_machdep.c optional gdb
|
2015-11-21 16:23:56 +00:00
|
|
|
arm/arm/generic_timer.c optional generic_timer
|
2015-05-10 09:33:03 +00:00
|
|
|
arm/arm/gic.c optional gic
|
2016-08-01 16:29:04 +00:00
|
|
|
arm/arm/gic_fdt.c optional gic fdt
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/identcpu-v4.c optional !armv7 !armv6
|
|
|
|
arm/arm/identcpu-v6.c optional armv7 | armv6
|
2011-04-20 12:58:30 +00:00
|
|
|
arm/arm/in_cksum.c optional inet | inet6
|
|
|
|
arm/arm/in_cksum_arm.S optional inet | inet6
|
2016-04-15 16:05:41 +00:00
|
|
|
arm/arm/intr.c optional !intrng
|
|
|
|
kern/subr_intr.c optional intrng
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/locore.S standard no-obj
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/hypervisor-stub.S optional armv7 | armv6
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/machdep.c standard
|
2017-03-11 07:07:41 +00:00
|
|
|
arm/arm/machdep_boot.c standard
|
|
|
|
arm/arm/machdep_kdb.c standard
|
2015-12-18 05:43:59 +00:00
|
|
|
arm/arm/machdep_intr.c standard
|
2017-03-11 07:07:41 +00:00
|
|
|
arm/arm/machdep_ptrace.c standard
|
2004-11-22 22:20:50 +00:00
|
|
|
arm/arm/mem.c optional mem
|
2008-11-06 16:20:27 +00:00
|
|
|
arm/arm/minidump_machdep.c optional mem
|
2012-08-15 03:03:03 +00:00
|
|
|
arm/arm/mp_machdep.c optional smp
|
2015-11-21 16:23:56 +00:00
|
|
|
arm/arm/mpcore_timer.c optional mpcore_timer
|
2007-12-02 13:10:42 +00:00
|
|
|
arm/arm/nexus.c standard
|
2015-12-21 18:07:32 +00:00
|
|
|
arm/arm/ofw_machdep.c optional fdt
|
2014-02-08 23:54:16 +00:00
|
|
|
arm/arm/physmem.c standard
|
2012-12-13 23:03:37 +00:00
|
|
|
arm/arm/pl190.c optional pl190
|
2012-08-15 03:03:03 +00:00
|
|
|
arm/arm/pl310.c optional pl310
|
2014-05-17 11:27:36 +00:00
|
|
|
arm/arm/platform.c optional platform
|
|
|
|
arm/arm/platform_if.m optional platform
|
2017-07-11 16:30:16 +00:00
|
|
|
arm/arm/platform_pl310_if.m optional platform pl310
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/pmap-v4.c optional !armv7 !armv6
|
|
|
|
arm/arm/pmap-v6.c optional armv7 | armv6
|
2015-10-15 01:51:10 +00:00
|
|
|
arm/arm/pmu.c optional pmu | fdt hwpmc
|
2017-09-14 15:03:43 +00:00
|
|
|
arm/arm/ptrace_machdep.c standard
|
2012-08-25 23:59:31 +00:00
|
|
|
arm/arm/sc_machdep.c optional sc
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/setcpsr.S standard
|
|
|
|
arm/arm/setstack.s standard
|
Break out stack(9) from ddb(4):
- Introduce per-architecture stack_machdep.c to hold stack_save(9).
- Introduce per-architecture machine/stack.h to capture any common
definitions required between db_trace.c and stack_machdep.c.
- Add new kernel option "options STACK"; we will build in stack(9) if it is
defined, or also if "options DDB" is defined to provide compatibility
with existing users of stack(9).
Add new stack_save_td(9) function, which allows the capture of a stacktrace
of another thread rather than the current thread, which the existing
stack_save(9) was limited to. It requires that the thread be neither
swapped out nor running, which is the responsibility of the consumer to
enforce.
Update stack(9) man page.
Build tested: amd64, arm, i386, ia64, powerpc, sparc64, sun4v
Runtime tested: amd64 (rwatson), arm (cognet), i386 (rwatson)
2007-12-02 20:40:35 +00:00
|
|
|
arm/arm/stack_machdep.c optional ddb | stack
|
2013-06-13 18:46:49 +00:00
|
|
|
arm/arm/stdatomic.c standard \
|
|
|
|
compile-with "${NORMAL_C:N-Wmissing-prototypes}"
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/support.S standard
|
|
|
|
arm/arm/swtch.S standard
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/swtch-v4.S optional !armv7 !armv6
|
|
|
|
arm/arm/swtch-v6.S optional armv7 | armv6
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/sys_machdep.c standard
|
2014-10-01 12:44:16 +00:00
|
|
|
arm/arm/syscall.c standard
|
2017-10-05 23:01:50 +00:00
|
|
|
arm/arm/trap-v4.c optional !armv7 !armv6
|
|
|
|
arm/arm/trap-v6.c optional armv7 | armv6
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/uio_machdep.c standard
|
|
|
|
arm/arm/undefined.c standard
|
2015-02-19 12:20:21 +00:00
|
|
|
arm/arm/unwind.c optional ddb | kdtrace_hooks
|
2004-05-14 11:49:40 +00:00
|
|
|
arm/arm/vm_machdep.c standard
|
2013-08-17 18:51:38 +00:00
|
|
|
arm/arm/vfp.c standard
|
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)
2016-09-18 11:36:54 +00:00
|
|
|
arm/cloudabi32/cloudabi32_sysvec.c optional compat_cloudabi32
|
2012-10-25 05:22:25 +00:00
|
|
|
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" \
|
|
|
|
no-obj no-implicit-rule before-depend \
|
|
|
|
clean "board_id.h"
|
2015-06-10 15:53:39 +00:00
|
|
|
cddl/compat/opensolaris/kern/opensolaris_atomic.c optional zfs | dtrace compile-with "${CDDL_C}"
|
|
|
|
cddl/dev/dtrace/arm/dtrace_asm.S optional dtrace compile-with "${DTRACE_S}"
|
|
|
|
cddl/dev/dtrace/arm/dtrace_subr.c optional dtrace compile-with "${DTRACE_C}"
|
|
|
|
cddl/dev/fbt/arm/fbt_isa.c optional dtrace_fbt | dtraceall compile-with "${FBT_C}"
|
2017-02-06 08:49:57 +00:00
|
|
|
crypto/blowfish/bf_enc.c optional crypto | ipsec | ipsec_support
|
|
|
|
crypto/des/des_enc.c optional crypto | ipsec | ipsec_support | netsmb
|
2016-09-06 21:36:20 +00:00
|
|
|
dev/cpufreq/cpufreq_dt.c optional cpufreq fdt
|
2015-09-20 14:13:29 +00:00
|
|
|
dev/dwc/if_dwc.c optional dwc
|
|
|
|
dev/dwc/if_dwc_if.m optional dwc
|
2012-08-25 23:59:31 +00:00
|
|
|
dev/fb/fb.c optional sc
|
2014-05-17 11:27:36 +00:00
|
|
|
dev/fdt/fdt_arm_platform.c optional platform fdt
|
2016-12-20 01:34:29 +00:00
|
|
|
dev/hdmi/hdmi_if.m optional hdmi
|
2009-12-23 23:53:30 +00:00
|
|
|
dev/hwpmc/hwpmc_arm.c optional hwpmc
|
2015-03-28 18:57:13 +00:00
|
|
|
dev/hwpmc/hwpmc_armv7.c optional hwpmc armv6
|
2017-10-05 23:01:50 +00:00
|
|
|
dev/hwpmc/hwpmc_armv7.c optional hwpmc armv7
|
2016-02-14 23:51:13 +00:00
|
|
|
dev/iicbus/twsi/twsi.c optional twsi
|
2016-03-29 15:19:56 +00:00
|
|
|
dev/ofw/ofwpci.c optional fdt pci
|
2016-11-21 18:24:05 +00:00
|
|
|
dev/pci/pci_host_generic.c optional pci_host_generic pci
|
|
|
|
dev/pci/pci_host_generic_fdt.c optional pci_host_generic pci fdt
|
2015-04-12 13:00:58 +00:00
|
|
|
dev/psci/psci.c optional psci
|
|
|
|
dev/psci/psci_arm.S optional psci
|
2012-08-25 23:59:31 +00:00
|
|
|
dev/syscons/scgfbrndr.c optional sc
|
|
|
|
dev/syscons/scterm-teken.c optional sc
|
|
|
|
dev/syscons/scvtb.c optional sc
|
2013-05-21 03:05:49 +00:00
|
|
|
dev/uart/uart_cpu_fdt.c optional uart fdt
|
|
|
|
|
2012-10-25 05:22:25 +00:00
|
|
|
font.h optional sc \
|
|
|
|
compile-with "uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x16.fnt && file2c 'u_char dflt_font_16[16*256] = {' '};' < ${SC_DFLT_FONT}-8x16 > font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x14.fnt && file2c 'u_char dflt_font_14[14*256] = {' '};' < ${SC_DFLT_FONT}-8x14 >> font.h && uudecode < /usr/share/syscons/fonts/${SC_DFLT_FONT}-8x8.fnt && file2c 'u_char dflt_font_8[8*256] = {' '};' < ${SC_DFLT_FONT}-8x8 >> font.h" \
|
|
|
|
no-obj no-implicit-rule before-depend \
|
|
|
|
clean "font.h ${SC_DFLT_FONT}-8x14 ${SC_DFLT_FONT}-8x16 ${SC_DFLT_FONT}-8x8"
|
2016-05-16 09:11:40 +00:00
|
|
|
kern/msi_if.m optional intrng
|
2016-04-15 16:05:41 +00:00
|
|
|
kern/pic_if.m optional intrng
|
2012-12-20 00:57:24 +00:00
|
|
|
kern/subr_busdma_bufalloc.c standard
|
2016-04-26 11:53:37 +00:00
|
|
|
kern/subr_devmap.c standard
|
2014-08-05 09:44:10 +00:00
|
|
|
kern/subr_sfbuf.c standard
|
2013-03-16 04:06:49 +00:00
|
|
|
libkern/arm/aeabi_unwind.c standard
|
2004-05-14 11:49:40 +00:00
|
|
|
libkern/arm/divsi3.S standard
|
|
|
|
libkern/arm/ffs.S standard
|
2013-01-17 09:37:42 +00:00
|
|
|
libkern/arm/ldivmod.S standard
|
|
|
|
libkern/arm/ldivmod_helper.c standard
|
2015-07-09 20:54:38 +00:00
|
|
|
libkern/arm/memclr.S standard
|
2013-03-10 07:55:40 +00:00
|
|
|
libkern/arm/memcpy.S standard
|
2013-03-16 23:11:55 +00:00
|
|
|
libkern/arm/memset.S standard
|
2004-05-14 11:49:40 +00:00
|
|
|
libkern/arm/muldi3.c standard
|
|
|
|
libkern/ashldi3.c standard
|
|
|
|
libkern/ashrdi3.c standard
|
|
|
|
libkern/divdi3.c standard
|
|
|
|
libkern/ffsl.c standard
|
2015-10-22 20:28:37 +00:00
|
|
|
libkern/ffsll.c standard
|
2006-11-30 06:17:54 +00:00
|
|
|
libkern/fls.c standard
|
2004-05-14 11:49:40 +00:00
|
|
|
libkern/flsl.c standard
|
2014-02-14 15:18:37 +00:00
|
|
|
libkern/flsll.c standard
|
2004-05-14 11:49:40 +00:00
|
|
|
libkern/lshrdi3.c standard
|
|
|
|
libkern/moddi3.c standard
|
|
|
|
libkern/qdivrem.c standard
|
2011-10-26 19:07:36 +00:00
|
|
|
libkern/ucmpdi2.c standard
|
2004-05-14 11:49:40 +00:00
|
|
|
libkern/udivdi3.c standard
|
|
|
|
libkern/umoddi3.c standard
|