2 * Copyright (c) 1994-1998 Mark Brinicombe.
3 * Copyright (c) 1994 Brini.
6 * This code is derived from software written for Brini by Mark Brinicombe
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
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.
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
35 * RiscBSD kernel project
39 * Machine dependant functions for kernel setup
41 * This file needs a lot of work.
46 #include "opt_platform.h"
48 #include <sys/cdefs.h>
49 __FBSDID("$FreeBSD$");
51 #define _ARM32_BUS_DMA_PRIVATE
52 #include <sys/param.h>
53 #include <sys/systm.h>
54 #include <sys/sysproto.h>
55 #include <sys/signalvar.h>
56 #include <sys/imgact.h>
57 #include <sys/kernel.h>
59 #include <sys/linker.h>
61 #include <sys/malloc.h>
62 #include <sys/mutex.h>
65 #include <sys/ptrace.h>
72 #include <sys/msgbuf.h>
73 #include <machine/physmem.h>
74 #include <machine/reg.h>
75 #include <machine/cpu.h>
76 #include <machine/board.h>
80 #include <vm/vm_object.h>
81 #include <vm/vm_page.h>
82 #include <vm/vm_map.h>
83 #include <machine/devmap.h>
84 #include <machine/vmparam.h>
85 #include <machine/pcb.h>
86 #include <machine/undefined.h>
87 #include <machine/machdep.h>
88 #include <machine/metadata.h>
89 #include <machine/armreg.h>
90 #include <machine/bus.h>
91 #include <sys/reboot.h>
93 #include <arm/at91/at91board.h>
94 #include <arm/at91/at91var.h>
95 #include <arm/at91/at91soc.h>
96 #include <arm/at91/at91_usartreg.h>
97 #include <arm/at91/at91rm92reg.h>
98 #include <arm/at91/at91sam9g20reg.h>
99 #include <arm/at91/at91sam9g45reg.h>
105 /* Page table for mapping proc0 zero page */
106 #define KERNEL_PT_SYS 0
107 #define KERNEL_PT_KERN 1
108 #define KERNEL_PT_KERN_NUM 22
109 /* L2 table for mapping after kernel */
110 #define KERNEL_PT_AFKERNEL KERNEL_PT_KERN + KERNEL_PT_KERN_NUM
111 #define KERNEL_PT_AFKERNEL_NUM 5
113 /* this should be evenly divisable by PAGE_SIZE / L2_TABLE_SIZE_REAL (or 4) */
114 #define NUM_KERNEL_PTS (KERNEL_PT_AFKERNEL + KERNEL_PT_AFKERNEL_NUM)
116 extern struct bus_space at91_bs_tag;
118 struct pv_addr kernel_pt_table[NUM_KERNEL_PTS];
120 extern uint32_t at91_master_clock;
122 /* Static device mappings. */
123 const struct arm_devmap_entry at91_devmap[] = {
125 * Map the critical on-board devices. The interrupt vector at
126 * 0xffff0000 makes it impossible to map them PA == VA, so we map all
127 * 0xfffxxxxx addresses to 0xdffxxxxx. This covers all critical devices
128 * on all members of the AT91SAM9 and AT91RM9200 families.
134 VM_PROT_READ|VM_PROT_WRITE,
137 /* There's a notion that we should do the rest of these lazily. */
139 * We can't just map the OHCI registers VA == PA, because
140 * AT91xx_xxx_BASE belongs to the userland address space.
141 * We could just choose a different virtual address, but a better
142 * solution would probably be to just use pmap_mapdev() to allocate
143 * KVA, as we don't need the OHCI controller before the vm
144 * initialization is done. However, the AT91 resource allocation
145 * system doesn't know how to use pmap_mapdev() yet.
146 * Care must be taken to ensure PA and VM address do not overlap
151 * Add the ohci controller, and anything else that might be
152 * on this chip select for a VA/PA mapping.
154 /* Internal Memory 1MB */
155 AT91RM92_OHCI_VA_BASE,
158 VM_PROT_READ|VM_PROT_WRITE,
162 /* CompactFlash controller. Portion of EBI CS4 1MB */
166 VM_PROT_READ|VM_PROT_WRITE,
170 * The next two should be good for the 9260, 9261 and 9G20 since
171 * addresses mapping is the same.
174 /* Internal Memory 1MB */
175 AT91SAM9G20_OHCI_VA_BASE,
176 AT91SAM9G20_OHCI_BASE,
178 VM_PROT_READ|VM_PROT_WRITE,
183 AT91SAM9G20_NAND_VA_BASE,
184 AT91SAM9G20_NAND_BASE,
185 AT91SAM9G20_NAND_SIZE,
186 VM_PROT_READ|VM_PROT_WRITE,
190 * The next should be good for the 9G45.
193 /* Internal Memory 1MB */
194 AT91SAM9G45_OHCI_VA_BASE,
195 AT91SAM9G45_OHCI_BASE,
197 VM_PROT_READ|VM_PROT_WRITE,
203 #ifdef LINUX_BOOT_ABI
205 extern int memstart[];
206 extern int memsize[];
212 uint32_t cr, mdr, mr, *SDRAMC;
213 int banks, rows, cols, bw;
214 #ifdef LINUX_BOOT_ABI
216 * If we found any ATAGs that were for memory, return the first bank.
222 if (at91_is_rm92()) {
223 SDRAMC = (uint32_t *)(AT91_BASE + AT91RM92_SDRAMC_BASE);
224 cr = SDRAMC[AT91RM92_SDRAMC_CR / 4];
225 mr = SDRAMC[AT91RM92_SDRAMC_MR / 4];
226 banks = (cr & AT91RM92_SDRAMC_CR_NB_4) ? 2 : 1;
227 rows = ((cr & AT91RM92_SDRAMC_CR_NR_MASK) >> 2) + 11;
228 cols = (cr & AT91RM92_SDRAMC_CR_NC_MASK) + 8;
229 bw = (mr & AT91RM92_SDRAMC_MR_DBW_16) ? 1 : 2;
230 } else if (at91_cpu_is(AT91_T_SAM9G45)) {
231 SDRAMC = (uint32_t *)(AT91_BASE + AT91SAM9G45_DDRSDRC0_BASE);
232 cr = SDRAMC[AT91SAM9G45_DDRSDRC_CR / 4];
233 mdr = SDRAMC[AT91SAM9G45_DDRSDRC_MDR / 4];
235 rows = ((cr & AT91SAM9G45_DDRSDRC_CR_NR_MASK) >> 2) + 11;
236 cols = (cr & AT91SAM9G45_DDRSDRC_CR_NC_MASK) + 8;
237 bw = (mdr & AT91SAM9G45_DDRSDRC_MDR_DBW_16) ? 1 : 2;
239 /* Fix the calculation for DDR memory */
240 mdr &= AT91SAM9G45_DDRSDRC_MDR_MASK;
241 if (mdr & AT91SAM9G45_DDRSDRC_MDR_LPDDR1 ||
242 mdr & AT91SAM9G45_DDRSDRC_MDR_DDR2) {
243 /* The cols value is 1 higher for DDR */
245 /* DDR has 4 internal banks. */
250 * This should be good for the 9260, 9261, 9G20, 9G35 and 9X25
251 * as addresses and registers are the same.
253 SDRAMC = (uint32_t *)(AT91_BASE + AT91SAM9G20_SDRAMC_BASE);
254 cr = SDRAMC[AT91SAM9G20_SDRAMC_CR / 4];
255 mr = SDRAMC[AT91SAM9G20_SDRAMC_MR / 4];
256 banks = (cr & AT91SAM9G20_SDRAMC_CR_NB_4) ? 2 : 1;
257 rows = ((cr & AT91SAM9G20_SDRAMC_CR_NR_MASK) >> 2) + 11;
258 cols = (cr & AT91SAM9G20_SDRAMC_CR_NC_MASK) + 8;
259 bw = (cr & AT91SAM9G20_SDRAMC_CR_DBW_16) ? 1 : 2;
262 return (1 << (cols + rows + banks + bw));
265 static const char *soc_type_name[] = {
266 [AT91_T_CAP9] = "at91cap9",
267 [AT91_T_RM9200] = "at91rm9200",
268 [AT91_T_SAM9260] = "at91sam9260",
269 [AT91_T_SAM9261] = "at91sam9261",
270 [AT91_T_SAM9263] = "at91sam9263",
271 [AT91_T_SAM9G10] = "at91sam9g10",
272 [AT91_T_SAM9G20] = "at91sam9g20",
273 [AT91_T_SAM9G45] = "at91sam9g45",
274 [AT91_T_SAM9N12] = "at91sam9n12",
275 [AT91_T_SAM9RL] = "at91sam9rl",
276 [AT91_T_SAM9X5] = "at91sam9x5",
277 [AT91_T_NONE] = "UNKNOWN"
280 static const char *soc_subtype_name[] = {
281 [AT91_ST_NONE] = "UNKNOWN",
282 [AT91_ST_RM9200_BGA] = "at91rm9200_bga",
283 [AT91_ST_RM9200_PQFP] = "at91rm9200_pqfp",
284 [AT91_ST_SAM9XE] = "at91sam9xe",
285 [AT91_ST_SAM9G45] = "at91sam9g45",
286 [AT91_ST_SAM9M10] = "at91sam9m10",
287 [AT91_ST_SAM9G46] = "at91sam9g46",
288 [AT91_ST_SAM9M11] = "at91sam9m11",
289 [AT91_ST_SAM9G15] = "at91sam9g15",
290 [AT91_ST_SAM9G25] = "at91sam9g25",
291 [AT91_ST_SAM9G35] = "at91sam9g35",
292 [AT91_ST_SAM9X25] = "at91sam9x25",
293 [AT91_ST_SAM9X35] = "at91sam9x35",
296 struct at91_soc_info soc_info;
299 * Read the SoC ID from the CIDR register and try to match it against the
300 * values we know. If we find a good one, we return true. If not, we
301 * return false. When we find a good one, we also find the subtype
305 at91_try_id(uint32_t dbgu_base)
309 soc_info.cidr = *(volatile uint32_t *)(AT91_BASE + dbgu_base +
311 socid = soc_info.cidr & ~AT91_CPU_VERSION_MASK;
313 soc_info.type = AT91_T_NONE;
314 soc_info.subtype = AT91_ST_NONE;
315 soc_info.family = (soc_info.cidr & AT91_CPU_FAMILY_MASK) >> 20;
316 soc_info.exid = *(volatile uint32_t *)(AT91_BASE + dbgu_base +
321 soc_info.type = AT91_T_CAP9;
323 case AT91_CPU_RM9200:
324 soc_info.type = AT91_T_RM9200;
326 case AT91_CPU_SAM9XE128:
327 case AT91_CPU_SAM9XE256:
328 case AT91_CPU_SAM9XE512:
329 case AT91_CPU_SAM9260:
330 soc_info.type = AT91_T_SAM9260;
331 if (soc_info.family == AT91_FAMILY_SAM9XE)
332 soc_info.subtype = AT91_ST_SAM9XE;
334 case AT91_CPU_SAM9261:
335 soc_info.type = AT91_T_SAM9261;
337 case AT91_CPU_SAM9263:
338 soc_info.type = AT91_T_SAM9263;
340 case AT91_CPU_SAM9G10:
341 soc_info.type = AT91_T_SAM9G10;
343 case AT91_CPU_SAM9G20:
344 soc_info.type = AT91_T_SAM9G20;
346 case AT91_CPU_SAM9G45:
347 soc_info.type = AT91_T_SAM9G45;
349 case AT91_CPU_SAM9N12:
350 soc_info.type = AT91_T_SAM9N12;
352 case AT91_CPU_SAM9RL64:
353 soc_info.type = AT91_T_SAM9RL;
355 case AT91_CPU_SAM9X5:
356 soc_info.type = AT91_T_SAM9X5;
362 switch (soc_info.type) {
364 switch (soc_info.exid) {
365 case AT91_EXID_SAM9G45:
366 soc_info.subtype = AT91_ST_SAM9G45;
368 case AT91_EXID_SAM9G46:
369 soc_info.subtype = AT91_ST_SAM9G46;
371 case AT91_EXID_SAM9M10:
372 soc_info.subtype = AT91_ST_SAM9M10;
374 case AT91_EXID_SAM9M11:
375 soc_info.subtype = AT91_ST_SAM9M11;
380 switch (soc_info.exid) {
381 case AT91_EXID_SAM9G15:
382 soc_info.subtype = AT91_ST_SAM9G15;
384 case AT91_EXID_SAM9G25:
385 soc_info.subtype = AT91_ST_SAM9G25;
387 case AT91_EXID_SAM9G35:
388 soc_info.subtype = AT91_ST_SAM9G35;
390 case AT91_EXID_SAM9X25:
391 soc_info.subtype = AT91_ST_SAM9X25;
393 case AT91_EXID_SAM9X35:
394 soc_info.subtype = AT91_ST_SAM9X35;
402 * Disable interrupts in the DBGU unit...
404 *(volatile uint32_t *)(AT91_BASE + dbgu_base + USART_IDR) = 0xffffffff;
407 * Save the name for later...
409 snprintf(soc_info.name, sizeof(soc_info.name), "%s%s%s",
410 soc_type_name[soc_info.type],
411 soc_info.subtype == AT91_ST_NONE ? "" : " subtype ",
412 soc_info.subtype == AT91_ST_NONE ? "" :
413 soc_subtype_name[soc_info.subtype]);
416 * try to get the matching CPU support.
418 soc_info.soc_data = at91_match_soc(soc_info.type, soc_info.subtype);
419 soc_info.dbgu_base = AT91_BASE + dbgu_base;
428 if (!at91_try_id(AT91_DBGU0))
429 at91_try_id(AT91_DBGU1);
432 #ifdef ARM_MANY_BOARD
433 /* likely belongs in arm/arm/machdep.c, but since board_init is still at91 only... */
434 SET_DECLARE(arm_board_set, const struct arm_board);
436 /* Not yet fully functional, but enough to build ATMEL config */
445 /* Physical and virtual addresses for some global pages */
447 struct pv_addr msgbufpv;
448 struct pv_addr kernelstack;
449 struct pv_addr systempage;
450 struct pv_addr irqstack;
451 struct pv_addr abtstack;
452 struct pv_addr undstack;
455 initarm(struct arm_boot_params *abp)
457 struct pv_addr kernel_l1pt;
458 struct pv_addr dpcpu;
461 vm_offset_t freemempos;
462 vm_offset_t afterkern;
464 vm_offset_t lastaddr;
466 lastaddr = parse_boot_param(abp);
467 arm_physmem_kernaddr = abp->abp_physaddr;
471 /* Do basic tuning, hz etc */
474 freemempos = (lastaddr + PAGE_MASK) & ~PAGE_MASK;
475 /* Define a macro to simplify memory allocation */
476 #define valloc_pages(var, np) \
477 alloc_pages((var).pv_va, (np)); \
478 (var).pv_pa = (var).pv_va + (abp->abp_physaddr - KERNVIRTADDR);
480 #define alloc_pages(var, np) \
481 (var) = freemempos; \
482 freemempos += (np * PAGE_SIZE); \
483 memset((char *)(var), 0, ((np) * PAGE_SIZE));
485 while (((freemempos - L1_TABLE_SIZE) & (L1_TABLE_SIZE - 1)) != 0)
486 freemempos += PAGE_SIZE;
487 valloc_pages(kernel_l1pt, L1_TABLE_SIZE / PAGE_SIZE);
488 for (i = 0; i < NUM_KERNEL_PTS; ++i) {
489 if (!(i % (PAGE_SIZE / L2_TABLE_SIZE_REAL))) {
490 valloc_pages(kernel_pt_table[i],
491 L2_TABLE_SIZE / PAGE_SIZE);
493 kernel_pt_table[i].pv_va = freemempos -
494 (i % (PAGE_SIZE / L2_TABLE_SIZE_REAL)) *
496 kernel_pt_table[i].pv_pa =
497 kernel_pt_table[i].pv_va - KERNVIRTADDR +
502 * Allocate a page for the system page mapped to 0x00000000
503 * or 0xffff0000. This page will just contain the system vectors
504 * and can be shared by all processes.
506 valloc_pages(systempage, 1);
508 /* Allocate dynamic per-cpu area. */
509 valloc_pages(dpcpu, DPCPU_SIZE / PAGE_SIZE);
510 dpcpu_init((void *)dpcpu.pv_va, 0);
512 /* Allocate stacks for all modes */
513 valloc_pages(irqstack, IRQ_STACK_SIZE * MAXCPU);
514 valloc_pages(abtstack, ABT_STACK_SIZE * MAXCPU);
515 valloc_pages(undstack, UND_STACK_SIZE * MAXCPU);
516 valloc_pages(kernelstack, KSTACK_PAGES * MAXCPU);
517 valloc_pages(msgbufpv, round_page(msgbufsize) / PAGE_SIZE);
520 * Now we start construction of the L1 page table
521 * We start by mapping the L2 page tables into the L1.
522 * This means that we can replace L1 mappings later on if necessary
524 l1pagetable = kernel_l1pt.pv_va;
526 /* Map the L2 pages tables in the L1 page table */
527 pmap_link_l2pt(l1pagetable, ARM_VECTORS_HIGH,
528 &kernel_pt_table[KERNEL_PT_SYS]);
529 for (i = 0; i < KERNEL_PT_KERN_NUM; i++)
530 pmap_link_l2pt(l1pagetable, KERNBASE + i * L1_S_SIZE,
531 &kernel_pt_table[KERNEL_PT_KERN + i]);
532 pmap_map_chunk(l1pagetable, KERNBASE, PHYSADDR,
533 (((uint32_t)lastaddr - KERNBASE) + PAGE_SIZE) & ~(PAGE_SIZE - 1),
534 VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
535 afterkern = round_page((lastaddr + L1_S_SIZE) & ~(L1_S_SIZE - 1));
536 for (i = 0; i < KERNEL_PT_AFKERNEL_NUM; i++) {
537 pmap_link_l2pt(l1pagetable, afterkern + i * L1_S_SIZE,
538 &kernel_pt_table[KERNEL_PT_AFKERNEL + i]);
541 /* Map the vector page. */
542 pmap_map_entry(l1pagetable, ARM_VECTORS_HIGH, systempage.pv_pa,
543 VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
545 /* Map the DPCPU pages */
546 pmap_map_chunk(l1pagetable, dpcpu.pv_va, dpcpu.pv_pa, DPCPU_SIZE,
547 VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
549 /* Map the stack pages */
550 pmap_map_chunk(l1pagetable, irqstack.pv_va, irqstack.pv_pa,
551 IRQ_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
552 pmap_map_chunk(l1pagetable, abtstack.pv_va, abtstack.pv_pa,
553 ABT_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
554 pmap_map_chunk(l1pagetable, undstack.pv_va, undstack.pv_pa,
555 UND_STACK_SIZE * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
556 pmap_map_chunk(l1pagetable, kernelstack.pv_va, kernelstack.pv_pa,
557 KSTACK_PAGES * PAGE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
559 pmap_map_chunk(l1pagetable, kernel_l1pt.pv_va, kernel_l1pt.pv_pa,
560 L1_TABLE_SIZE, VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
561 pmap_map_chunk(l1pagetable, msgbufpv.pv_va, msgbufpv.pv_pa,
562 msgbufsize, VM_PROT_READ|VM_PROT_WRITE, PTE_CACHE);
564 for (i = 0; i < NUM_KERNEL_PTS; ++i) {
565 pmap_map_chunk(l1pagetable, kernel_pt_table[i].pv_va,
566 kernel_pt_table[i].pv_pa, L2_TABLE_SIZE,
567 VM_PROT_READ|VM_PROT_WRITE, PTE_PAGETABLE);
570 arm_devmap_bootstrap(l1pagetable, at91_devmap);
571 cpu_domains((DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2)) | DOMAIN_CLIENT);
572 setttb(kernel_l1pt.pv_pa);
574 cpu_domains(DOMAIN_CLIENT << (PMAP_DOMAIN_KERNEL * 2));
579 * Initialize all the clocks, so that the console can work. We can only
580 * do this if at91_soc_id() was able to fill in the support data. Even
581 * if we can't init the clocks, still try to do a console init so we can
582 * try to print the error message about missing soc support. There's a
583 * chance the printf will work if the bootloader set up the DBGU.
585 if (soc_info.soc_data != NULL) {
586 soc_info.soc_data->soc_clock_init();
587 at91_pmc_init_clock();
592 if (soc_info.soc_data == NULL)
593 printf("Warning: No soc support for %s found.\n", soc_info.name);
595 memsize = board_init();
597 printf("board_init() failed, cannot determine ram size; "
599 memsize = 16 * 1024 * 1024;
603 * Pages were allocated during the secondary bootstrap for the
604 * stacks for different CPU modes.
605 * We must now set the r13 registers in the different CPU modes to
606 * point to these stacks.
607 * Since the ARM stacks use STMFD etc. we must set r13 to the top end
608 * of the stack memory.
610 cpu_control(CPU_CONTROL_MMU_ENABLE, CPU_CONTROL_MMU_ENABLE);
616 * We must now clean the cache again....
617 * Cleaning may be done by reading new data to displace any
618 * dirty data in the cache. This will have happened in setttb()
619 * but since we are boot strapping the addresses used for the read
620 * may have just been remapped and thus the cache could be out
621 * of sync. A re-clean after the switch will cure this.
622 * After booting there are no gross relocations of the kernel thus
623 * this problem will not occur after initarm().
625 cpu_idcache_wbinv_all();
629 init_proc0(kernelstack.pv_va);
631 arm_vector_init(ARM_VECTORS_HIGH, ARM_VEC_ALL);
633 pmap_curmaxkvaddr = afterkern + L1_S_SIZE * (KERNEL_PT_KERN_NUM - 1);
634 /* Always use the 256MB of KVA we have available between the kernel and devices */
635 vm_max_kernel_address = KERNVIRTADDR + (256 << 20);
636 pmap_bootstrap(freemempos, &kernel_l1pt);
637 msgbufp = (void*)msgbufpv.pv_va;
638 msgbufinit(msgbufp, msgbufsize);
642 * Add the physical ram we have available.
644 * Exclude the kernel, and all the things we allocated which immediately
645 * follow the kernel, from the VM allocation pool but not from crash
646 * dumps. virtual_avail is a global variable which tracks the kva we've
647 * "allocated" while setting up pmaps.
649 * Prepare the list of physical memory available to the vm subsystem.
651 arm_physmem_hardware_region(PHYSADDR, memsize);
652 arm_physmem_exclude_region(abp->abp_physaddr,
653 virtual_avail - KERNVIRTADDR, EXFLAG_NOALLOC);
654 arm_physmem_init_kernel_globals();
656 init_param2(physmem);
658 return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP -
659 sizeof(struct pcb)));
664 * These functions are handled elsewhere, so make them nops here.
667 cpu_startprofclock(void)
673 cpu_stopprofclock(void)
688 if (soc_info.soc_data)
689 soc_info.soc_data->soc_delay(n);
696 if (soc_info.soc_data)
697 soc_info.soc_data->soc_reset();