1/* $NetBSD: machdep.h,v 1.7 2002/02/21 02:52:21 thorpej Exp $ */
2/* $FreeBSD: head/sys/arm/include/machdep.h 248907 2013-03-29 18:43:10Z ian $ */
3
4#ifndef _MACHDEP_BOOT_MACHDEP_H_
5#define _MACHDEP_BOOT_MACHDEP_H_
6
7/* Structs that need to be initialised by initarm */
8struct pv_addr;
9extern struct pv_addr irqstack;
10extern struct pv_addr undstack;
11extern struct pv_addr abtstack;
12
13/* Define various stack sizes in pages */
14#define IRQ_STACK_SIZE 1
15#define ABT_STACK_SIZE 1
16#define UND_STACK_SIZE 1
17
18/* misc prototypes used by the many arm machdeps */
19struct trapframe;
20void arm_lock_cache_line(vm_offset_t);
21void init_proc0(vm_offset_t kstack);
22void halt(void);
23void data_abort_handler(struct trapframe *);
24void prefetch_abort_handler(struct trapframe *);
25void set_stackptrs(int cpu);
26void undefinedinstruction_bounce(struct trapframe *);
27
28/* Early boot related helper functions */
29struct arm_boot_params;
30vm_offset_t default_parse_boot_param(struct arm_boot_params *abp);
31vm_offset_t freebsd_parse_boot_param(struct arm_boot_params *abp);
32vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp);
33vm_offset_t fake_preload_metadata(struct arm_boot_params *abp);
34vm_offset_t parse_boot_param(struct arm_boot_params *abp);
35
36/* Called by initarm */
37vm_offset_t initarm_lastaddr(void);
38void initarm_gpio_init(void);
39void initarm_late_init(void);
40int platform_devmap_init(void);
41
42/* Board-specific attributes */
43void board_set_serial(uint64_t);
44void board_set_revision(uint32_t);
45
46/* Needs to be initialised by platform_devmap_init */
47extern const struct pmap_devmap *pmap_devmap_bootstrap_table;
48
49/* Setup standard arrays */
50void arm_dump_avail_init( vm_offset_t memsize, size_t max);
51
52#endif /* !_MACHINE_MACHDEP_H_ */
2/* $FreeBSD: head/sys/arm/include/machdep.h 248907 2013-03-29 18:43:10Z ian $ */
3
4#ifndef _MACHDEP_BOOT_MACHDEP_H_
5#define _MACHDEP_BOOT_MACHDEP_H_
6
7/* Structs that need to be initialised by initarm */
8struct pv_addr;
9extern struct pv_addr irqstack;
10extern struct pv_addr undstack;
11extern struct pv_addr abtstack;
12
13/* Define various stack sizes in pages */
14#define IRQ_STACK_SIZE 1
15#define ABT_STACK_SIZE 1
16#define UND_STACK_SIZE 1
17
18/* misc prototypes used by the many arm machdeps */
19struct trapframe;
20void arm_lock_cache_line(vm_offset_t);
21void init_proc0(vm_offset_t kstack);
22void halt(void);
23void data_abort_handler(struct trapframe *);
24void prefetch_abort_handler(struct trapframe *);
25void set_stackptrs(int cpu);
26void undefinedinstruction_bounce(struct trapframe *);
27
28/* Early boot related helper functions */
29struct arm_boot_params;
30vm_offset_t default_parse_boot_param(struct arm_boot_params *abp);
31vm_offset_t freebsd_parse_boot_param(struct arm_boot_params *abp);
32vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp);
33vm_offset_t fake_preload_metadata(struct arm_boot_params *abp);
34vm_offset_t parse_boot_param(struct arm_boot_params *abp);
35
36/* Called by initarm */
37vm_offset_t initarm_lastaddr(void);
38void initarm_gpio_init(void);
39void initarm_late_init(void);
40int platform_devmap_init(void);
41
42/* Board-specific attributes */
43void board_set_serial(uint64_t);
44void board_set_revision(uint32_t);
45
46/* Needs to be initialised by platform_devmap_init */
47extern const struct pmap_devmap *pmap_devmap_bootstrap_table;
48
49/* Setup standard arrays */
50void arm_dump_avail_init( vm_offset_t memsize, size_t max);
51
52#endif /* !_MACHINE_MACHDEP_H_ */