mv_machdep.c revision 184729
1/*-
2 * Copyright (c) 1994-1998 Mark Brinicombe.
3 * Copyright (c) 1994 Brini.
4 * All rights reserved.
5 *
6 * This code is derived from software written for Brini by Mark Brinicombe
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 * 1. Redistributions of source code must retain the above copyright
12 *    notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright
14 *    notice, this list of conditions and the following disclaimer in the
15 *    documentation and/or other materials provided with the distribution.
16 * 3. All advertising materials mentioning features or use of this software
17 *    must display the following acknowledgement:
18 *      This product includes software developed by Brini.
19 * 4. The name of the company nor the name of the author may be used to
20 *    endorse or promote products derived from this software without specific
21 *    prior written permission.
22 *
23 * THIS SOFTWARE IS PROVIDED BY BRINI ``AS IS'' AND ANY EXPRESS OR IMPLIED
24 * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
25 * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 * IN NO EVENT SHALL BRINI OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
27 * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
29 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
30 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
32 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
33 * SUCH DAMAGE.
34 *
35 * from: FreeBSD: //depot/projects/arm/src/sys/arm/at91/kb920x_machdep.c, rev 45
36 */
37
38#include "opt_msgbuf.h"
39#include "opt_ddb.h"
40
41#include <sys/cdefs.h>
42__FBSDID("$FreeBSD: head/sys/arm/mv/mv_machdep.c 184729 2008-11-06 16:25:12Z raj $");
43
44#define _ARM32_BUS_DMA_PRIVATE
45#include <sys/param.h>
46#include <sys/systm.h>
47#include <sys/sysproto.h>
48#include <sys/signalvar.h>
49#include <sys/imgact.h>
50#include <sys/kernel.h>
51#include <sys/ktr.h>
52#include <sys/linker.h>
53#include <sys/lock.h>
54#include <sys/malloc.h>
55#include <sys/mutex.h>
56#include <sys/pcpu.h>
57#include <sys/proc.h>
58#include <sys/ptrace.h>
59#include <sys/cons.h>
60#include <sys/bio.h>
61#include <sys/bus.h>
62#include <sys/buf.h>
63#include <sys/exec.h>
64#include <sys/kdb.h>
65#include <sys/msgbuf.h>
66#include <machine/reg.h>
67#include <machine/cpu.h>
68
69#include <vm/vm.h>
70#include <vm/pmap.h>
71#include <vm/vm_object.h>
72#include <vm/vm_page.h>
73#include <vm/vm_pager.h>
74#include <vm/vm_map.h>
75#include <vm/vnode_pager.h>
76#include <machine/pte.h>
77#include <machine/pmap.h>
78#include <machine/vmparam.h>
79#include <machine/pcb.h>
80#include <machine/undefined.h>
81#include <machine/machdep.h>
82#include <machine/metadata.h>
83#include <machine/armreg.h>
84#include <machine/bus.h>
85#include <sys/reboot.h>
86#include <machine/bootinfo.h>
87
88#include <arm/mv/mvvar.h>	/* XXX eventually this should be eliminated */
89
90#ifdef  DEBUG
91#define debugf(fmt, args...) printf(fmt, ##args)
92#else
93#define debugf(fmt, args...)
94#endif
95
96/*
97 * This is the number of L2 page tables required for covering max
98 * (hypothetical) memsize of 4GB and all kernel mappings (vectors, msgbuf,
99 * stacks etc.), uprounded to be divisible by 4.
100 */
101#define KERNEL_PT_MAX	78
102
103/* Define various stack sizes in pages */
104#define IRQ_STACK_SIZE	1
105#define ABT_STACK_SIZE	1
106#define UND_STACK_SIZE	1
107
108/* Maximum number of memory regions */
109#define MEM_REGIONS	8
110
111extern unsigned char kernbase[];
112extern unsigned char _etext[];
113extern unsigned char _edata[];
114extern unsigned char __bss_start[];
115extern unsigned char _end[];
116
117extern u_int data_abort_handler_address;
118extern u_int prefetch_abort_handler_address;
119extern u_int undefined_handler_address;
120
121extern const struct pmap_devmap *pmap_devmap_bootstrap_table;
122extern vm_offset_t pmap_bootstrap_lastaddr;
123
124struct pv_addr kernel_pt_table[KERNEL_PT_MAX];
125
126extern int *end;
127
128struct pcpu __pcpu;
129struct pcpu *pcpup = &__pcpu;
130
131/* Physical and virtual addresses for some global pages */
132
133vm_paddr_t phys_avail[10];
134vm_paddr_t dump_avail[4];
135vm_offset_t physical_pages;
136
137struct pv_addr systempage;
138struct pv_addr msgbufpv;
139struct pv_addr irqstack;
140struct pv_addr undstack;
141struct pv_addr abtstack;
142struct pv_addr kernelstack;
143
144static struct trapframe proc0_tf;
145
146struct mem_region {
147	vm_offset_t	mr_start;
148	vm_size_t	mr_size;
149};
150
151static struct mem_region availmem_regions[MEM_REGIONS];
152static int availmem_regions_sz;
153
154struct bootinfo *bootinfo;
155
156static void print_kenv(void);
157static void print_kernel_section_addr(void);
158static void print_bootinfo(void);
159
160static void physmap_init(int);
161
162static char *
163kenv_next(char *cp)
164{
165
166	if (cp != NULL) {
167		while (*cp != 0)
168			cp++;
169		cp++;
170		if (*cp == 0)
171			cp = NULL;
172	}
173	return (cp);
174}
175
176static void
177print_kenv(void)
178{
179	int len;
180	char *cp;
181
182	debugf("loader passed (static) kenv:\n");
183	if (kern_envp == NULL) {
184		debugf(" no env, null ptr\n");
185		return;
186	}
187	debugf(" kern_envp = 0x%08x\n", (uint32_t)kern_envp);
188
189	len = 0;
190	for (cp = kern_envp; cp != NULL; cp = kenv_next(cp))
191		debugf(" %x %s\n", (uint32_t)cp, cp);
192}
193
194static void
195print_bootinfo(void)
196{
197	struct bi_mem_region *mr;
198	struct bi_eth_addr *eth;
199	int i, j;
200
201	debugf("bootinfo:\n");
202	if (bootinfo == NULL) {
203		debugf(" no bootinfo, null ptr\n");
204		return;
205	}
206
207	debugf(" version = 0x%08x\n", bootinfo->bi_version);
208	debugf(" ccsrbar = 0x%08x\n", bootinfo->bi_bar_base);
209	debugf(" cpu_clk = 0x%08x\n", bootinfo->bi_cpu_clk);
210	debugf(" bus_clk = 0x%08x\n", bootinfo->bi_bus_clk);
211
212	debugf(" mem regions:\n");
213	mr = (struct bi_mem_region *)bootinfo->bi_data;
214	for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++)
215		debugf("    #%d, base = 0x%08x, size = 0x%08x\n", i,
216		    mr->mem_base, mr->mem_size);
217
218	debugf(" eth addresses:\n");
219	eth = (struct bi_eth_addr *)mr;
220	for (i = 0; i < bootinfo->bi_eth_addr_no; i++, eth++) {
221		debugf("    #%d, addr = ", i);
222		for (j = 0; j < 6; j++)
223			debugf("%02x ", eth->mac_addr[j]);
224		debugf("\n");
225	}
226}
227
228static void
229print_kernel_section_addr(void)
230{
231
232	debugf("kernel image addresses:\n");
233	debugf(" kernbase       = 0x%08x\n", (uint32_t)kernbase);
234	debugf(" _etext (sdata) = 0x%08x\n", (uint32_t)_etext);
235	debugf(" _edata         = 0x%08x\n", (uint32_t)_edata);
236	debugf(" __bss_start    = 0x%08x\n", (uint32_t)__bss_start);
237	debugf(" _end           = 0x%08x\n", (uint32_t)_end);
238}
239
240struct bi_mem_region *
241bootinfo_mr(void)
242{
243
244	return ((struct bi_mem_region *)bootinfo->bi_data);
245}
246
247static void
248physmap_init(int hardcoded)
249{
250	int i, j, cnt;
251	vm_offset_t phys_kernelend, kernload;
252	uint32_t s, e, sz;
253	struct mem_region *mp, *mp1;
254
255	phys_kernelend = KERNPHYSADDR + (virtual_avail - KERNVIRTADDR);
256	kernload = KERNPHYSADDR;
257
258	/*
259	 * Use hardcoded physical addresses if we don't use memory regions
260	 * from metadata.
261	 */
262	if (hardcoded) {
263		phys_avail[0] = 0;
264		phys_avail[1] = kernload;
265
266		phys_avail[2] = phys_kernelend;
267		phys_avail[3] = PHYSMEM_SIZE;
268
269		phys_avail[4] = 0;
270		phys_avail[5] = 0;
271		return;
272	}
273
274	/*
275	 * Remove kernel physical address range from avail
276	 * regions list. Page align all regions.
277	 * Non-page aligned memory isn't very interesting to us.
278	 * Also, sort the entries for ascending addresses.
279	 */
280	sz = 0;
281	cnt = availmem_regions_sz;
282	debugf("processing avail regions:\n");
283	for (mp = availmem_regions; mp->mr_size; mp++) {
284		s = mp->mr_start;
285		e = mp->mr_start + mp->mr_size;
286		debugf(" %08x-%08x -> ", s, e);
287		/* Check whether this region holds all of the kernel. */
288		if (s < kernload && e > phys_kernelend) {
289			availmem_regions[cnt].mr_start = phys_kernelend;
290			availmem_regions[cnt++].mr_size = e - phys_kernelend;
291			e = kernload;
292		}
293		/* Look whether this regions starts within the kernel. */
294		if (s >= kernload && s < phys_kernelend) {
295			if (e <= phys_kernelend)
296				goto empty;
297			s = phys_kernelend;
298		}
299		/* Now look whether this region ends within the kernel. */
300		if (e > kernload && e <= phys_kernelend) {
301			if (s >= kernload) {
302				goto empty;
303			}
304			e = kernload;
305		}
306		/* Now page align the start and size of the region. */
307		s = round_page(s);
308		e = trunc_page(e);
309		if (e < s)
310			e = s;
311		sz = e - s;
312		debugf("%08x-%08x = %x\n", s, e, sz);
313
314		/* Check whether some memory is left here. */
315		if (sz == 0) {
316		empty:
317			printf("skipping\n");
318			bcopy(mp + 1, mp,
319			    (cnt - (mp - availmem_regions)) * sizeof(*mp));
320			cnt--;
321			mp--;
322			continue;
323		}
324
325		/* Do an insertion sort. */
326		for (mp1 = availmem_regions; mp1 < mp; mp1++)
327			if (s < mp1->mr_start)
328				break;
329		if (mp1 < mp) {
330			bcopy(mp1, mp1 + 1, (char *)mp - (char *)mp1);
331			mp1->mr_start = s;
332			mp1->mr_size = sz;
333		} else {
334			mp->mr_start = s;
335			mp->mr_size = sz;
336		}
337	}
338	availmem_regions_sz = cnt;
339
340	/* Fill in phys_avail table, based on availmem_regions */
341	debugf("fill in phys_avail:\n");
342	for (i = 0, j = 0; i < availmem_regions_sz; i++, j += 2) {
343
344		debugf(" region: 0x%08x - 0x%08x (0x%08x)\n",
345		    availmem_regions[i].mr_start,
346		    availmem_regions[i].mr_start + availmem_regions[i].mr_size,
347		    availmem_regions[i].mr_size);
348
349		phys_avail[j] = availmem_regions[i].mr_start;
350		phys_avail[j + 1] = availmem_regions[i].mr_start +
351		    availmem_regions[i].mr_size;
352	}
353	phys_avail[j] = 0;
354	phys_avail[j + 1] = 0;
355}
356
357void *
358initarm(void *mdp, void *unused __unused)
359{
360	struct pv_addr kernel_l1pt;
361	vm_offset_t freemempos, l2_start, lastaddr;
362	uint32_t memsize, l2size;
363	struct bi_mem_region *mr;
364	void *kmdp;
365	u_int l1pagetable;
366	int i = 0, j = 0;
367
368	kmdp = NULL;
369	lastaddr = 0;
370	memsize = 0;
371
372	set_cpufuncs();
373
374	/*
375	 * Mask metadata pointer: it is supposed to be on page boundary. If
376	 * the first argument (mdp) doesn't point to a valid address the
377	 * bootloader must have passed us something else than the metadata
378	 * ptr... In this case we want to fall back to some built-in settings.
379	 */
380	mdp = (void *)((uint32_t)mdp & ~PAGE_MASK);
381
382	/* Parse metadata and fetch parameters */
383	if (mdp != NULL) {
384		preload_metadata = mdp;
385		kmdp = preload_search_by_type("elf kernel");
386		if (kmdp != NULL) {
387			bootinfo = (struct bootinfo *)preload_search_info(kmdp,
388			    MODINFO_METADATA|MODINFOMD_BOOTINFO);
389
390			boothowto = MD_FETCH(kmdp, MODINFOMD_HOWTO, int);
391			kern_envp = MD_FETCH(kmdp, MODINFOMD_ENVP, char *);
392			lastaddr = MD_FETCH(kmdp, MODINFOMD_KERNEND, vm_offset_t);
393		}
394
395		/* Initialize memory regions table */
396		mr = bootinfo_mr();
397		for (i = 0; i < bootinfo->bi_mem_reg_no; i++, mr++) {
398			if (i == MEM_REGIONS)
399				break;
400			availmem_regions[i].mr_start = mr->mem_base;
401			availmem_regions[i].mr_size = mr->mem_size;
402			memsize += mr->mem_size;
403		}
404		availmem_regions_sz = i;
405	} else {
406		/* Fall back to hardcoded boothowto flags and metadata. */
407		boothowto = RB_VERBOSE | RB_SINGLE;
408		lastaddr = fake_preload_metadata();
409
410		/*
411		 * Assume a single memory region of size specified in board
412		 * configuration file.
413		 */
414		memsize = PHYSMEM_SIZE;
415	}
416
417	/*
418	 * If memsize is invalid, we can neither proceed nor panic (too
419	 * early for console output).
420	 */
421	if (memsize == 0)
422		while (1);
423
424	/* Platform-specific initialisation */
425	if (platform_pmap_init() != 0)
426		return (NULL);
427
428	pcpu_init(pcpup, 0, sizeof(struct pcpu));
429	PCPU_SET(curthread, &thread0);
430
431	/* Calculate number of L2 tables needed for mapping vm_page_array */
432	l2size = (memsize / PAGE_SIZE) * sizeof(struct vm_page);
433	l2size = (l2size >> L1_S_SHIFT) + 1;
434
435	/*
436	 * Add one table for end of kernel map, one for stacks, msgbuf and
437	 * L1 and L2 tables map and one for vectors map.
438	 */
439	l2size += 3;
440
441	/* Make it divisible by 4 */
442	l2size = (l2size + 3) & ~3;
443
444#define KERNEL_TEXT_BASE (KERNBASE)
445	freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
446
447	/* Define a macro to simplify memory allocation */
448#define valloc_pages(var, np)                   \
449	alloc_pages((var).pv_va, (np));         \
450	(var).pv_pa = (var).pv_va + (KERNPHYSADDR - KERNVIRTADDR);
451
452#define alloc_pages(var, np)			\
453	(var) = freemempos;		\
454	freemempos += (np * PAGE_SIZE);		\
455	memset((char *)(var), 0, ((np) * PAGE_SIZE));
456
457	while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0)
458		freemempos += PAGE_SIZE;
459	valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE);
460
461	for (i = 0; i < l2size; ++i) {
462		if (!(i % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) {
463			valloc_pages(kernel_pt_table[i],
464			    L2_TABLE_SIZE / PAGE_SIZE);
465			j = i;
466		} else {
467			kernel_pt_table[i].pv_va = kernel_pt_table[j].pv_va +
468			    L2_TABLE_SIZE_REAL * (i - j);
469			kernel_pt_table[i].pv_pa =
470			    kernel_pt_table[i].pv_va - KERNVIRTADDR +
471			    KERNPHYSADDR;
472
473		}
474	}
475	/*
476	 * Allocate a page for the system page mapped to 0x00000000
477	 * or 0xffff0000. This page will just contain the system vectors
478	 * and can be shared by all processes.
479	 */
480	valloc_pages(systempage, 1);
481
482	/* Allocate stacks for all modes */
483	valloc_pages(irqstack, IRQ_STACK_SIZE);
484	valloc_pages(abtstack, ABT_STACK_SIZE);
485	valloc_pages(undstack, UND_STACK_SIZE);
486	valloc_pages(kernelstack, KSTACK_PAGES);
487	valloc_pages(msgbufpv, round_page(MSGBUF_SIZE) / PAGE_SIZE);
488
489	/*
490	 * Now we start construction of the L1 page table
491	 * We start by mapping the L2 page tables into the L1.
492	 * This means that we can replace L1 mappings later on if necessary
493	 */
494	l1pagetable = kernel_l1pt.pv_va;
495
496	/*
497	 * Try to map as much as possible of kernel text and data using
498	 * 1MB section mapping and for the rest of initial kernel address
499	 * space use L2 coarse tables.
500	 *
501	 * Link L2 tables for mapping remainder of kernel (modulo 1MB)
502	 * and kernel structures
503	 */
504	l2_start = lastaddr & ~(L1_S_OFFSET);
505	for (i = 0 ; i < l2size - 1; i++)
506		pmap_link_l2pt(l1pagetable, l2_start + i * L1_S_SIZE,
507		    &kernel_pt_table[i]);
508
509	pmap_curmaxkvaddr = l2_start + (l2size - 1) * L1_S_SIZE;
510
511	/* Map kernel code and data */
512	pmap_map_chunk(l1pagetable, KERNVIRTADDR, KERNPHYSADDR,
513	   (((uint32_t)(lastaddr) - KERNVIRTADDR) + PAGE_MASK) & ~PAGE_MASK,
514	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
515
516
517	/* Map L1 directory and allocated L2 page tables */
518	pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
519	    L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
520
521	pmap_map_chunk(l1pagetable, kernel_pt_table[0].pv_va,
522	    kernel_pt_table[0].pv_pa,
523	    L2_TABLE_SIZE_REAL * l2size,
524	    VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
525
526	/* Map allocated stacks and msgbuf */
527	pmap_map_chunk(l1pagetable, irqstack.pv_va, irqstack.pv_pa,
528	    freemempos - irqstack.pv_va,
529	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
530
531	/* Link and map the vector page */
532	pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH,
533	    &kernel_pt_table[l2size - 1]);
534	pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
535	    VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
536
537	pmap_devmap_bootstrap(l1pagetable, pmap_devmap_bootstrap_table);
538	cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) |
539	    DOMAIN_CLIENT);
540	setttb(kernel_l1pt.pv_pa);
541	cpu_tlb_flushID();
542	cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
543	cninit();
544	physmem = memsize / PAGE_SIZE;
545
546	debugf("initarm: console initialized\n");
547	debugf(" arg1 mdp = 0x%08x\n", (uint32_t)mdp);
548	debugf(" boothowto = 0x%08x\n", boothowto);
549	print_bootinfo();
550	print_kernel_section_addr();
551	print_kenv();
552
553	/*
554	 * Re-initialise decode windows
555	 */
556	if (soc_decode_win() != 0)
557		printf("WARNING: could not re-initialise decode windows! "
558		    "Running with existing settings...\n");
559	/*
560	 * Pages were allocated during the secondary bootstrap for the
561	 * stacks for different CPU modes.
562	 * We must now set the r13 registers in the different CPU modes to
563	 * point to these stacks.
564	 * Since the ARM stacks use STMFD etc. we must set r13 to the top end
565	 * of the stack memory.
566	 */
567	cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
568	set_stackptr(PSR_IRQ32_MODE,
569	    irqstack.pv_va + IRQ_STACK_SIZE * PAGE_SIZE);
570	set_stackptr(PSR_ABT32_MODE,
571	    abtstack.pv_va + ABT_STACK_SIZE * PAGE_SIZE);
572	set_stackptr(PSR_UND32_MODE,
573	    undstack.pv_va + UND_STACK_SIZE * PAGE_SIZE);
574
575	/*
576	 * We must now clean the cache again....
577	 * Cleaning may be done by reading new data to displace any
578	 * dirty data in the cache. This will have happened in setttb()
579	 * but since we are boot strapping the addresses used for the read
580	 * may have just been remapped and thus the cache could be out
581	 * of sync. A re-clean after the switch will cure this.
582	 * After booting there are no gross reloations of the kernel thus
583	 * this problem will not occur after initarm().
584	 */
585	cpu_idcache_wbinv_all();
586
587	/* Set stack for exception handlers */
588	data_abort_handler_address = (u_int)data_abort_handler;
589	prefetch_abort_handler_address = (u_int)prefetch_abort_handler;
590	undefined_handler_address = (u_int)undefinedinstruction_bounce;
591	undefined_init();
592
593	proc_linkup0(&proc0, &thread0);
594	thread0.td_kstack = kernelstack.pv_va;
595	thread0.td_kstack_pages = KSTACK_PAGES;
596	thread0.td_pcb = (struct pcb *)
597	    (thread0.td_kstack + KSTACK_PAGES * PAGE_SIZE) - 1;
598	thread0.td_pcb->pcb_flags = 0;
599	thread0.td_frame = &proc0_tf;
600	pcpup->pc_curpcb = thread0.td_pcb;
601
602	arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
603
604	dump_avail[0] = 0;
605	dump_avail[1] = memsize;
606	dump_avail[2] = 0;
607	dump_avail[3] = 0;
608
609	pmap_bootstrap(freemempos, pmap_bootstrap_lastaddr, &kernel_l1pt);
610	msgbufp = (void *)msgbufpv.pv_va;
611	msgbufinit(msgbufp, MSGBUF_SIZE);
612	mutex_init();
613
614	/*
615	 * Prepare map of physical memory regions available to vm subsystem.
616	 * If metadata pointer doesn't point to a valid address, use hardcoded
617	 * values.
618	 */
619	physmap_init((mdp != NULL) ? 0 : 1);
620
621	/* Do basic tuning, hz etc */
622	init_param1();
623	init_param2(physmem);
624	kdb_init();
625	return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
626	    sizeof(struct pcb)));
627}
628
629struct arm32_dma_range *
630bus_dma_get_range(void)
631{
632
633	return (NULL);
634}
635
636int
637bus_dma_get_range_nb(void)
638{
639
640	return (0);
641}
642