xref: /freebsd/sys/arm/include/machdep.h (revision 1f4bcc459a76b7aa664f3fd557684cd0ba6da352)
1 /* $NetBSD: machdep.h,v 1.7 2002/02/21 02:52:21 thorpej Exp $ */
2 /* $FreeBSD$ */
3 
4 #ifndef _MACHDEP_BOOT_MACHDEP_H_
5 #define _MACHDEP_BOOT_MACHDEP_H_
6 
7 #include <machine/acle-compat.h>
8 
9 /* Structs that need to be initialised by initarm */
10 #if __ARM_ARCH >= 6
11 extern vm_offset_t irqstack;
12 extern vm_offset_t undstack;
13 extern vm_offset_t abtstack;
14 #else
15 struct pv_addr;
16 extern struct pv_addr irqstack;
17 extern struct pv_addr undstack;
18 extern struct pv_addr abtstack;
19 #endif
20 
21 /* Define various stack sizes in pages */
22 #define IRQ_STACK_SIZE	1
23 #define ABT_STACK_SIZE	1
24 #define UND_STACK_SIZE	1
25 
26 /* misc prototypes used by the many arm machdeps */
27 struct trapframe;
28 void arm_lock_cache_line(vm_offset_t);
29 void init_proc0(vm_offset_t kstack);
30 void halt(void);
31 void abort_handler(struct trapframe *, int );
32 void set_stackptrs(int cpu);
33 void undefinedinstruction_bounce(struct trapframe *);
34 
35 /* Early boot related helper functions */
36 struct arm_boot_params;
37 vm_offset_t default_parse_boot_param(struct arm_boot_params *abp);
38 vm_offset_t freebsd_parse_boot_param(struct arm_boot_params *abp);
39 vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp);
40 vm_offset_t fake_preload_metadata(struct arm_boot_params *abp);
41 vm_offset_t parse_boot_param(struct arm_boot_params *abp);
42 void arm_generic_initclocks(void);
43 
44 /* Board-specific attributes */
45 void board_set_serial(uint64_t);
46 void board_set_revision(uint32_t);
47 
48 int arm_predict_branch(void *, u_int, register_t, register_t *,
49     u_int (*)(void*, int), u_int (*)(void*, vm_offset_t, u_int*));
50 
51 #endif /* !_MACHINE_MACHDEP_H_ */
52