1#	$NetBSD: files.arm,v 1.168 2023/04/20 08:28:03 skrll Exp $
2
3# temporary define to allow easy moving to ../arch/arm/arm32
4defflag				ARM32
5
6# predefine for CPU_ARMV6 and CPU_ARMV7
7defflag	opt_cpuoptions.h	ARM32_DISABLE_ALIGNMENT_FAULTS
8
9# CPU types.  Make sure to update <arm/cpuconf.h> if you change this list.
10defflag	opt_cputypes.h		CPU_PRE_ARMV6
11defflag	opt_cputypes.h		CPU_ARMV3: CPU_PRE_ARMV6
12defflag	opt_cputypes.h		CPU_ARMV4: CPU_ARMV3
13defflag	opt_cputypes.h		CPU_ARMV4T: CPU_ARMV4
14defflag	opt_cputypes.h		CPU_ARMV5T: CPU_ARMV4T
15defflag	opt_cputypes.h		CPU_ARMV5TE: CPU_ARMV5T
16defflag	opt_cputypes.h		CPU_XSCALE: CPU_ARMV5TE
17defflag	opt_cputypes.h		CPU_ARMV6: ARM32_DISABLE_ALIGNMENT_FAULTS
18defflag	opt_cputypes.h		CPU_ARMV7: ARM32_DISABLE_ALIGNMENT_FAULTS
19defflag	opt_cputypes.h		CPU_ARM6: CPU_ARMV3
20defflag	opt_cputypes.h		CPU_ARM7: CPU_ARMV3
21defflag	opt_cputypes.h		CPU_ARM8: CPU_ARMV4
22defflag	opt_cputypes.h		CPU_SA110: CPU_ARMV4
23defflag	opt_cputypes.h		CPU_SA1100: CPU_ARMV4
24defflag	opt_cputypes.h		CPU_SA1110: CPU_ARMV4
25defflag	opt_cputypes.h		CPU_FA526: CPU_ARMV4
26defflag	opt_cputypes.h		CPU_IXP12X0: CPU_ARMV4
27defflag	opt_cputypes.h		CPU_ARM7TDMI: CPU_ARMV4T
28defflag	opt_cputypes.h		CPU_ARM9: CPU_ARMV4T
29defflag	opt_cputypes.h		CPU_ARM10: CPU_ARMV5T
30defflag	opt_cputypes.h		CPU_ARM9E: CPU_ARMV5TE
31defflag	opt_cputypes.h		CPU_XSCALE_80200: CPU_XSCALE
32defflag	opt_cputypes.h		CPU_XSCALE_80321: CPU_XSCALE
33defflag	opt_cputypes.h		CPU_XSCALE_PXA250: CPU_XSCALE
34defflag	opt_cputypes.h		CPU_XSCALE_PXA270: CPU_XSCALE
35defflag	opt_cputypes.h		CPU_XSCALE_IXP425: CPU_XSCALE
36defflag	opt_cputypes.h		CPU_SHEEVA: CPU_ARMV5TE
37defflag	opt_cputypes.h		CPU_ARM11: CPU_ARMV6
38defflag	opt_cputypes.h		CPU_ARM1136: CPU_ARM11
39defflag	opt_cputypes.h		CPU_ARM1176: CPU_ARM11
40defflag	opt_cputypes.h		CPU_ARM11MPCORE: CPU_ARM11
41defflag	opt_cputypes.h		CPU_PJ4B: CPU_ARMV7
42defflag	opt_cputypes.h		CPU_CORTEX: CPU_ARMV7
43defflag	opt_cputypes.h		FPU_VFP
44
45defparam opt_cpuoptions.h	XSCALE_CCLKCFG
46defflag  opt_cpuoptions.h	XSCALE_CACHE_WRITE_THROUGH
47defflag  opt_cpuoptions.h	XSCALE_CACHE_WRITE_BACK
48defflag  opt_cpuoptions.h	XSCALE_NO_COALESCE_WRITES
49defflag  opt_cpuoptions.h	XSCALE_CACHE_READ_WRITE_ALLOCATE
50defflag  opt_cpuoptions.h	ARM9_CACHE_WRITE_THROUGH
51defflag  opt_cpuoptions.h	TPIDRPRW_IS_CURLWP
52defflag  opt_cpuoptions.h	TPIDRPRW_IS_CURCPU
53defflag  opt_cpuoptions.h	ARM11_PMC CORTEX_PMC
54defflag  opt_cpuoptions.h	ARM11_CACHE_WRITE_THROUGH
55defflag	 opt_cpuoptions.h	ARM11_COMPAT_MMU
56defflag	 opt_cpuoptions.h	ARM_HAS_VBAR
57defflag	 opt_cpuoptions.h	ARM_HAS_LPAE
58# use extended small page in compatible MMU mode for ARMv6
59defflag  opt_cpuoptions.h	SHEEVA_L2_CACHE
60defflag  opt_cpuoptions.h	SHEEVA_L2_CACHE_WT: SHEEVA_L2_CACHE
61# override configuration base address register
62defparam opt_cpuoptions.h	ARM_CBAR
63
64# Interrupt implementation header definition.
65defparam opt_arm_intr_impl.h	ARM_INTR_IMPL
66
67# ARM-specific debug options
68defflag  opt_arm_debug.h	ARM_LOCK_CAS_DEBUG
69defflag  opt_arm_debug.h	VERBOSE_INIT_ARM
70defparam opt_arm_debug.h	EARLYCONS
71
72# ARMv8-specific options
73defflag  opt_cpuoptions.h	ARMV81_PAN
74defflag  opt_cpuoptions.h	ARMV83_PAC
75defflag  opt_cpuoptions.h	ARMV85_BTI
76
77# Board-specific bus_space(9)/bus_dma(9) definitions
78defflag  opt_arm_bus_space.h	__BUS_SPACE_HAS_STREAM_METHODS
79				__BUS_SPACE_HAS_PROBING_METHODS
80				_ARM32_NEED_BUS_DMA_BOUNCE
81				BUSDMA_COUNTERS
82
83# Timer options
84defflag opt_arm_timer.h		__HAVE_GENERIC_CPU_INITCLOCKS
85
86# Start code option
87defflag opt_arm_start.h		__HAVE_GENERIC_START
88
89# Console options
90defparam opt_console.h		CONSADDR
91defparam opt_console.h		CONSPEED
92defparam opt_console.h		CONMODE
93defparam opt_console.h		CONADDR
94
95# Floating point emulator
96obsolete defflag		ARMFPE
97
98# VFP support
99file	arch/arm/vfp/vfp_init.c			arm32
100#file	arch/arm/vfp/pmap_vfp.S			arm32 & fpu_vfp
101
102# SMC Calling Convention
103define	smccc
104file	arch/arm/arm/smccc.c			smccc
105
106# Power State Coordination Interface (PSCI)
107device	psci: smccc
108file	arch/arm/arm/psci.c			psci
109file	arch/arm/arm/psci_arm.S			psci
110
111# EFI support
112file	arch/arm/arm/efi_runtime.c		efi_runtime
113
114# New PMAP options
115defflag	opt_arm32_pmap.h	PMAPCOUNTERS
116				PMAP_STEAL_MEMORY PMAP_NEED_ALLOC_POOLPAGE
117				PMAP_TLB
118defparam opt_arm32_pmap.h	PGSHIFT
119
120# MI console support
121file	dev/cons.c
122
123# DDB
124file	arch/arm/arm/db_disasm.c		ddb
125file	arch/arm/arm32/db_interface.c		(ddb|kgdb) & arm32
126file	arch/arm/arm/db_trace.c			ddb
127file	arch/arm/arm32/db_machdep.c		ddb & arm32
128file	arch/arm/arm32/kgdb_machdep.c		kgdb & arm32
129
130# FIQ support
131file	arch/arm/arm/fiq.c
132file	arch/arm/arm/fiq_subr.S
133
134# mainbus files
135device	mainbus { [base = -1], [size = 0], [dack = -1], [irq = -1], [intrbase = -1], [core = -1] }
136attach	mainbus at root
137file	arch/arm/mainbus/mainbus.c		mainbus & arm32
138file	arch/arm/mainbus/mainbus_io.c		mainbus & arm32
139file	arch/arm/mainbus/mainbus_io_asm.S	mainbus & arm32
140
141device	cpu { }
142attach	cpu at mainbus with cpu_mainbus
143file	arch/arm/mainbus/cpu_mainbus.c		cpu_mainbus & arm32
144
145# files related to debugging
146file	arch/arm/arm/disassem.c
147
148# bus_space(9)
149define	bus_space_generic
150file	arch/arm/arm/bus_space_asm_generic.S	bus_space_generic
151file	arch/arm/arm/bus_space_notimpl.S	arm32
152
153file	arch/arm/arm/bus_stubs.c
154
155file	arch/arm/arm/arm_cpu_topology.c
156file	arch/arm/arm/arm_machdep.c
157file	arch/arm/arm/ast.c
158file	arch/arm/arm/bcopyinout.S
159file	arch/arm/arm/blockio.S
160file	arch/arm/arm/bootconfig.c
161file	arch/arm/arm/compat_13_machdep.c	compat_13
162file	arch/arm/arm/compat_16_machdep.c	compat_16
163file	arch/arm/arm/copystr.S
164file	arch/arm/arm/core_machdep.c		coredump
165file	arch/arm/arm/cpufunc.c
166file	arch/arm/arm/cpufunc_asm.S
167file	arch/arm/arm/cpufunc_asm_arm67.S	cpu_arm6 | cpu_arm7
168file	arch/arm/arm/cpufunc_asm_arm7tdmi.S	cpu_arm7tdmi
169file	arch/arm/arm/cpufunc_asm_arm8.S		cpu_arm8
170file	arch/arm/arm/cpufunc_asm_arm9.S		cpu_arm9
171file	arch/arm/arm/cpufunc_asm_arm10.S	cpu_arm9e | cpu_arm10 |
172							cpu_sheeva
173file	arch/arm/arm/cpufunc_asm_arm11.S	cpu_arm11
174file	arch/arm/arm/cpufunc_asm_arm1136.S	cpu_arm1136
175file	arch/arm/arm/cpufunc_asm_arm11x6.S	cpu_arm1136 | cpu_arm1176
176file	arch/arm/arm/cpufunc_asm_armv4.S	cpu_arm9 | cpu_arm9e |
177							cpu_arm10 |
178							cpu_fa526 |
179							cpu_sa110 |
180							cpu_sa1100 |
181							cpu_sa1110 |
182							cpu_ixp12x0 |
183							cpu_xscale |
184							cpu_sheeva
185file	arch/arm/arm/cpufunc_asm_armv5.S	cpu_arm10 | cpu_arm11mpcore
186file	arch/arm/arm/cpufunc_asm_armv5_ec.S	cpu_arm9e | cpu_arm10 |
187							cpu_sheeva
188file	arch/arm/arm/cpufunc_asm_armv6.S	cpu_arm11
189file	arch/arm/arm/cpufunc_asm_armv7.S	cpu_cortex | cpu_pj4b
190file	arch/arm/arm/cpufunc_asm_pj4b.S		cpu_pj4b
191file	arch/arm/arm/cpufunc_asm_sa1.S		cpu_sa110 | cpu_sa1100 |
192							cpu_sa1110 |
193							cpu_ixp12x0
194file	arch/arm/arm/cpufunc_asm_sa11x0.S	cpu_sa1100 | cpu_sa1110
195file	arch/arm/arm/cpufunc_asm_fa526.S	cpu_fa526
196file	arch/arm/arm/cpufunc_asm_xscale.S	cpu_xscale
197file	arch/arm/arm/cpufunc_asm_ixp12x0.S	cpu_ixp12x0
198file	arch/arm/arm/cpufunc_asm_sheeva.S	cpu_sheeva
199file	arch/arm/arm/cpu_exec.c
200file	arch/arm/arm/cpu_in_cksum.S		(inet | inet6) & cpu_in_cksum
201file	arch/arm/arm/cpu_subr.c
202file	arch/arm/arm/fusu.S
203file	arch/arm/arm/idle_machdep.c
204file	arch/arm/arm/lock_cas.S
205file	arch/arm/arm/process_machdep.c
206file	arch/arm/arm/procfs_machdep.c		procfs
207file	arch/arm/arm/sig_machdep.c
208file	arch/arm/arm/sigcode.S
209file	arch/arm/arm/syscall.c
210file	arch/arm/arm/trap.c
211file	arch/arm/arm/undefined.c
212file	arch/arm/arm/vectors.S			arm32
213
214# EFI runtime (machdep)
215file	arch/arm/arm/efi_machdep.c		efi_runtime
216
217
218# files common to arm32 implementations
219file	arch/arm/arm32/arm32_machdep.c		arm32
220file	arch/arm/arm32/bus_dma.c		arm32
221file	arch/arm/arm32/cpu.c			arm32 & cpu
222file	arch/arm/arm32/cpuswitch.S		arm32
223file	arch/arm/arm32/exception.S		arm32
224file	arch/arm/arm32/fault.c			arm32
225file	arch/arm/arm32/kobj_machdep.c		arm32 & modular
226file	arch/arm/arm32/pmap.c			arm32
227file	arch/arm/arm32/setcpsr.S		arm32
228file	arch/arm/arm32/setstack.S		arm32
229file	arch/arm/arm32/stubs.c			arm32
230file	arch/arm/arm32/sys_machdep.c		arm32
231file	arch/arm/arm32/vm_machdep.c		arm32
232
233# files less common to arm32 implementations...
234file	kern/kern_cctr.c			arm11
235file	arch/arm/arm32/arm11_pmc.c		arm11_pmc
236file	arch/arm/arm32/cortex_pmc.c		cortex_pmc
237file	arch/arm/arm32/arm32_tlb.c		(cpu_armv7 | cpu_arm11) & (!arm11_compat_mmu & !cpu_pre_armv6)
238file	uvm/pmap/pmap_devmap.c
239file	uvm/pmap/pmap_tlb.c			(cpu_armv7 | cpu_arm11) & (!arm11_compat_mmu & !cpu_pre_armv6)
240
241# generic pmap files for arm32 implementations
242file	uvm/pmap/pmap_pvt.c			arm32
243
244# arm32 library functions
245file	arch/arm/arm32/bcopy_page.S		arm32
246
247#
248include "compat/netbsd32/files.netbsd32"
249file	arch/arm/arm32/netbsd32_machdep.c	arm32 & compat_netbsd32
250file	arch/arm/arm32/netbsd32_machdep_16.c	arm32 & compat_netbsd32 &
251							compat_16
252file	arch/arm/arm32/netbsd32_machdep_13.c	arm32 & compat_netbsd32 &
253							compat_13
254
255
256# Linux binary compatibility (COMPAT_LINUX)
257include "compat/ossaudio/files.ossaudio"
258include "compat/linux/files.linux"
259include "compat/linux/arch/arm/files.linux_arm"
260file	arch/arm/arm/linux_sigcode.S		compat_linux
261file	arch/arm/arm/linux_syscall.c		compat_linux
262file	arch/arm/arm/linux_trap.c		compat_linux
263
264# profiling support
265file	dev/tprof/tprof_armv7.c			tprof
266
267# vpaes with ARM NEON
268include "crypto/aes/arch/arm/files.aesneon"
269
270# ChaCha with ARM NEON
271include "crypto/chacha/arch/arm/files.chacha_arm"
272