2004-05-14 11:46:45 +00:00
|
|
|
/* $NetBSD: machdep.h,v 1.7 2002/02/21 02:52:21 thorpej Exp $ */
|
|
|
|
/* $FreeBSD$ */
|
|
|
|
|
|
|
|
#ifndef _MACHDEP_BOOT_MACHDEP_H_
|
|
|
|
#define _MACHDEP_BOOT_MACHDEP_H_
|
|
|
|
|
2016-01-29 10:31:54 +00:00
|
|
|
#include <machine/acle-compat.h>
|
|
|
|
|
2012-09-22 06:41:56 +00:00
|
|
|
/* Structs that need to be initialised by initarm */
|
2016-01-29 10:31:54 +00:00
|
|
|
#if __ARM_ARCH >= 6
|
2015-03-26 21:13:53 +00:00
|
|
|
extern vm_offset_t irqstack;
|
|
|
|
extern vm_offset_t undstack;
|
|
|
|
extern vm_offset_t abtstack;
|
|
|
|
#else
|
2013-03-29 18:43:10 +00:00
|
|
|
struct pv_addr;
|
2012-09-22 06:41:56 +00:00
|
|
|
extern struct pv_addr irqstack;
|
|
|
|
extern struct pv_addr undstack;
|
|
|
|
extern struct pv_addr abtstack;
|
2015-03-26 21:13:53 +00:00
|
|
|
#endif
|
2012-09-22 06:41:56 +00:00
|
|
|
|
|
|
|
/* Define various stack sizes in pages */
|
|
|
|
#define IRQ_STACK_SIZE 1
|
|
|
|
#define ABT_STACK_SIZE 1
|
|
|
|
#define UND_STACK_SIZE 1
|
|
|
|
|
2004-05-14 11:46:45 +00:00
|
|
|
/* misc prototypes used by the many arm machdeps */
|
2013-03-29 18:43:10 +00:00
|
|
|
struct trapframe;
|
Instead of using sysarch() to store-retrieve the tp, add a magic address,
ARM_TP_ADDRESS, where the tp will be stored. On CPUs that support it, a cache
line will be allocated and locked for this address, so that it will never go
to RAM. On CPUs that does not, a page is allocated for it (it will be a bit
slower, and is wrong for SMP, but should be fine for UP).
The tp is still stored in the mdthread struct, and at each context switch,
ARM_TP_ADDRESS gets updated.
Suggested by: davidxu
2005-02-26 18:59:01 +00:00
|
|
|
void arm_lock_cache_line(vm_offset_t);
|
2012-06-10 01:13:04 +00:00
|
|
|
void init_proc0(vm_offset_t kstack);
|
2008-04-03 16:44:50 +00:00
|
|
|
void halt(void);
|
2014-12-25 17:06:58 +00:00
|
|
|
void abort_handler(struct trapframe *, int );
|
2012-09-22 06:41:56 +00:00
|
|
|
void set_stackptrs(int cpu);
|
2013-03-29 18:43:10 +00:00
|
|
|
void undefinedinstruction_bounce(struct trapframe *);
|
2012-06-14 04:18:56 +00:00
|
|
|
|
|
|
|
/* Early boot related helper functions */
|
2012-06-14 04:00:30 +00:00
|
|
|
struct arm_boot_params;
|
2012-06-14 04:09:20 +00:00
|
|
|
vm_offset_t default_parse_boot_param(struct arm_boot_params *abp);
|
2012-06-14 04:16:16 +00:00
|
|
|
vm_offset_t freebsd_parse_boot_param(struct arm_boot_params *abp);
|
|
|
|
vm_offset_t linux_parse_boot_param(struct arm_boot_params *abp);
|
2012-06-14 04:09:20 +00:00
|
|
|
vm_offset_t fake_preload_metadata(struct arm_boot_params *abp);
|
|
|
|
vm_offset_t parse_boot_param(struct arm_boot_params *abp);
|
2014-02-26 22:06:10 +00:00
|
|
|
void arm_generic_initclocks(void);
|
2012-06-14 04:00:30 +00:00
|
|
|
|
2013-01-05 23:08:10 +00:00
|
|
|
/* Board-specific attributes */
|
|
|
|
void board_set_serial(uint64_t);
|
|
|
|
void board_set_revision(uint32_t);
|
|
|
|
|
2015-11-02 16:56:34 +00:00
|
|
|
int arm_predict_branch(void *, u_int, register_t, register_t *,
|
|
|
|
u_int (*)(void*, int), u_int (*)(void*, vm_offset_t, u_int*));
|
|
|
|
|
2004-05-14 11:46:45 +00:00
|
|
|
#endif /* !_MACHINE_MACHDEP_H_ */
|