1 /* $NetBSD: machdep.h,v 1.18 2014/03/28 21:51:59 matt Exp $ */
3 #ifndef _ARM32_BOOT_MACHDEP_H_
4 #define _ARM32_BOOT_MACHDEP_H_
6 /* Define various stack sizes in pages */
8 #define IRQ_STACK_SIZE 1
10 #ifndef ABT_STACK_SIZE
11 #define ABT_STACK_SIZE 1
13 #ifndef UND_STACK_SIZE
15 #define UND_STACK_SIZE 2
17 #define UND_STACK_SIZE 1
20 #ifndef FIQ_STACK_SIZE
21 #define FIQ_STACK_SIZE 1
25 extern void (*cpu_reset_address
)(void);
26 extern paddr_t cpu_reset_address_paddr
;
28 extern u_int data_abort_handler_address
;
29 extern u_int prefetch_abort_handler_address
;
30 // extern u_int undefined_handler_address;
31 #define undefined_handler_address (curcpu()->ci_undefsave[2])
35 paddr_t bmi_kernelstart
;
36 paddr_t bmi_kernelend
;
38 pv_addrqh_t bmi_freechunks
;
39 pv_addrqh_t bmi_chunks
; /* sorted list of memory to be mapped */
40 pv_addr_t bmi_freeblocks
[4];
42 * These need to be static for pmap's kernel_pt list.
44 pv_addr_t bmi_vector_l2pt
;
45 pv_addr_t bmi_io_l2pt
;
46 pv_addr_t bmi_l2pts
[32]; // for large memory disks.
48 u_int bmi_nfreeblocks
;
51 extern struct bootmem_info bootmem_info
;
53 extern char *booted_kernel
;
55 extern volatile uint32_t arm_cpu_hatched
;
56 extern volatile uint32_t arm_cpu_mbox
;
57 extern u_int arm_cpu_max
;
59 /* misc prototypes used by the many arm machdeps */
60 void cortex_pmc_ccnt_init(void);
61 void cpu_hatch(struct cpu_info
*, cpuid_t
, void (*)(struct cpu_info
*));
63 void parse_mi_bootargs(char *);
64 void data_abort_handler(trapframe_t
*);
65 void prefetch_abort_handler(trapframe_t
*);
66 void undefinedinstruction_bounce(trapframe_t
*);
70 * note that we use void *as all the platforms have different ideas on what
73 u_int
initarm(void *);
76 void arm32_bootmem_init(paddr_t memstart
, psize_t memsize
, paddr_t kernelstart
);
77 void arm32_kernel_vm_init(vaddr_t kvm_base
, vaddr_t vectors
,
78 vaddr_t iovbase
/* (can be zero) */,
79 const struct pmap_devmap
*devmap
, bool mapallmem_p
);
80 vaddr_t
initarm_common(vaddr_t kvm_base
, vsize_t kvm_size
,
81 const struct boot_physmem
*bp
, size_t nbp
);
84 /* from arm/arm32/intr.c */
85 void dosoftints(void);
86 void set_spl_masks(void);
88 void dump_spl_masks(void);