Home | History | Annotate | Line # | Download | only in arm32
machdep.h revision 1.18
      1  1.18      matt /* $NetBSD: machdep.h,v 1.18 2014/03/28 21:51:59 matt Exp $ */
      2   1.1     chris 
      3   1.1     chris #ifndef _ARM32_BOOT_MACHDEP_H_
      4   1.1     chris #define _ARM32_BOOT_MACHDEP_H_
      5   1.1     chris 
      6  1.11      matt /* Define various stack sizes in pages */
      7  1.11      matt #ifndef IRQ_STACK_SIZE
      8  1.11      matt #define IRQ_STACK_SIZE	1
      9  1.11      matt #endif
     10  1.11      matt #ifndef ABT_STACK_SIZE
     11  1.11      matt #define ABT_STACK_SIZE	1
     12  1.11      matt #endif
     13  1.11      matt #ifndef UND_STACK_SIZE
     14  1.11      matt #ifdef IPKDB
     15  1.11      matt #define UND_STACK_SIZE	2
     16  1.11      matt #else
     17  1.11      matt #define UND_STACK_SIZE	1
     18  1.11      matt #endif
     19  1.11      matt #endif
     20  1.11      matt #ifndef FIQ_STACK_SIZE
     21  1.11      matt #define FIQ_STACK_SIZE	1
     22  1.11      matt #endif
     23  1.11      matt 
     24  1.11      matt 
     25  1.11      matt extern void (*cpu_reset_address)(void);
     26  1.11      matt extern paddr_t cpu_reset_address_paddr;
     27  1.11      matt 
     28  1.10      matt extern u_int data_abort_handler_address;
     29  1.10      matt extern u_int prefetch_abort_handler_address;
     30  1.14      matt // extern u_int undefined_handler_address;
     31  1.14      matt #define	undefined_handler_address (curcpu()->ci_undefsave[2])
     32  1.14      matt 
     33  1.14      matt struct bootmem_info {
     34  1.14      matt 	paddr_t bmi_start;
     35  1.14      matt 	paddr_t bmi_kernelstart;
     36  1.14      matt 	paddr_t bmi_kernelend;
     37  1.14      matt 	paddr_t bmi_end;
     38  1.14      matt 	pv_addrqh_t bmi_freechunks;
     39  1.14      matt 	pv_addrqh_t bmi_chunks;		/* sorted list of memory to be mapped */
     40  1.14      matt 	pv_addr_t bmi_freeblocks[4];
     41  1.14      matt 	/*
     42  1.14      matt 	 * These need to be static for pmap's kernel_pt list.
     43  1.14      matt 	 */
     44  1.14      matt 	pv_addr_t bmi_vector_l2pt;
     45  1.14      matt 	pv_addr_t bmi_io_l2pt;
     46  1.17      matt 	pv_addr_t bmi_l2pts[32];	// for large memory disks.
     47  1.14      matt 	u_int bmi_freepages;
     48  1.14      matt 	u_int bmi_nfreeblocks;
     49  1.14      matt };
     50  1.14      matt 
     51  1.14      matt extern struct bootmem_info bootmem_info;
     52  1.10      matt 
     53  1.10      matt extern char *booted_kernel;
     54  1.10      matt 
     55  1.14      matt extern volatile uint32_t arm_cpu_hatched;
     56  1.18      matt extern volatile uint32_t arm_cpu_mbox;
     57  1.14      matt extern u_int arm_cpu_max;
     58  1.14      matt 
     59   1.1     chris /* misc prototypes used by the many arm machdeps */
     60  1.12      matt void cortex_pmc_ccnt_init(void);
     61  1.14      matt void cpu_hatch(struct cpu_info *, cpuid_t, void (*)(struct cpu_info *));
     62   1.9       dsl void halt(void);
     63   1.9       dsl void parse_mi_bootargs(char *);
     64   1.9       dsl void data_abort_handler(trapframe_t *);
     65   1.9       dsl void prefetch_abort_handler(trapframe_t *);
     66   1.9       dsl void undefinedinstruction_bounce(trapframe_t *);
     67   1.9       dsl void dumpsys(void);
     68   1.1     chris 
     69   1.2     chris /*
     70   1.8  christos  * note that we use void *as all the platforms have different ideas on what
     71   1.2     chris  * the structure is
     72   1.2     chris  */
     73   1.9       dsl u_int initarm(void *);
     74  1.14      matt struct pmap_devmap;
     75  1.14      matt struct boot_physmem;
     76  1.14      matt void arm32_bootmem_init(paddr_t memstart, psize_t memsize, paddr_t kernelstart);
     77  1.14      matt void arm32_kernel_vm_init(vaddr_t kvm_base, vaddr_t vectors,
     78  1.14      matt 	vaddr_t iovbase /* (can be zero) */,
     79  1.14      matt 	const struct pmap_devmap *devmap, bool mapallmem_p);
     80  1.14      matt vaddr_t initarm_common(vaddr_t kvm_base, vsize_t kvm_size,
     81  1.14      matt         const struct boot_physmem *bp, size_t nbp);
     82  1.14      matt 
     83   1.2     chris 
     84   1.2     chris /* from arm/arm32/intr.c */
     85   1.9       dsl void dosoftints(void);
     86   1.9       dsl void set_spl_masks(void);
     87   1.2     chris #ifdef DIAGNOSTIC
     88   1.9       dsl void dump_spl_masks(void);
     89   1.2     chris #endif
     90   1.1     chris #endif
     91