xref: /freebsd/sys/powerpc/include/md_var.h (revision 1c96bdd14645b8778bd1ec4e0ddcdda18195a99f)
1897cd717SDoug Rabson /*-
2897cd717SDoug Rabson  * Copyright (c) 1998 Doug Rabson
3897cd717SDoug Rabson  * All rights reserved.
4897cd717SDoug Rabson  *
5897cd717SDoug Rabson  * Redistribution and use in source and binary forms, with or without
6897cd717SDoug Rabson  * modification, are permitted provided that the following conditions
7897cd717SDoug Rabson  * are met:
8897cd717SDoug Rabson  * 1. Redistributions of source code must retain the above copyright
9897cd717SDoug Rabson  *    notice, this list of conditions and the following disclaimer.
10897cd717SDoug Rabson  * 2. Redistributions in binary form must reproduce the above copyright
11897cd717SDoug Rabson  *    notice, this list of conditions and the following disclaimer in the
12897cd717SDoug Rabson  *    documentation and/or other materials provided with the distribution.
13897cd717SDoug Rabson  *
14897cd717SDoug Rabson  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15897cd717SDoug Rabson  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16897cd717SDoug Rabson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17897cd717SDoug Rabson  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18897cd717SDoug Rabson  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19897cd717SDoug Rabson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20897cd717SDoug Rabson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21897cd717SDoug Rabson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22897cd717SDoug Rabson  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23897cd717SDoug Rabson  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24897cd717SDoug Rabson  * SUCH DAMAGE.
25897cd717SDoug Rabson  *
26c3aac50fSPeter Wemm  * $FreeBSD$
27897cd717SDoug Rabson  */
28897cd717SDoug Rabson 
29897cd717SDoug Rabson #ifndef _MACHINE_MD_VAR_H_
30897cd717SDoug Rabson #define	_MACHINE_MD_VAR_H_
31897cd717SDoug Rabson 
32897cd717SDoug Rabson /*
33897cd717SDoug Rabson  * Miscellaneous machine-dependent declarations.
34897cd717SDoug Rabson  */
35897cd717SDoug Rabson 
36897cd717SDoug Rabson extern	char	sigcode[];
3752c008e8SDoug Rabson extern	char	esigcode[];
38897cd717SDoug Rabson extern	int	szsigcode;
39447b3772SPeter Wemm extern	long	Maxmem;
4049c0f52eSAndrew Gallatin extern	int	busdma_swi_pending;
41897cd717SDoug Rabson 
425244eac9SBenno Rice extern	vm_offset_t	kstack0;
435244eac9SBenno Rice extern	vm_offset_t	kstack0_phys;
445244eac9SBenno Rice 
45d8e36186SBenno Rice extern	u_long	ns_per_tick;
46d8e36186SBenno Rice 
478a109fa3SMarcel Moolenaar extern	int powerpc_pow_enabled;
484c01c0b9SNathan Whitehorn extern	int cacheline_size;
491c96bdd1SNathan Whitehorn extern  int ppc64;
501c96bdd1SNathan Whitehorn extern  int hw_direct_map;
5101bd17ccSMarcel Moolenaar 
5201bd17ccSMarcel Moolenaar void	__syncicache(void *, int);
5301bd17ccSMarcel Moolenaar 
54812344bcSAlfred Perlstein void	busdma_swi(void);
55812344bcSAlfred Perlstein int	is_physical_memory(vm_offset_t addr);
56949313b7SMarcel Moolenaar int	mem_valid(vm_offset_t addr, int len);
57897cd717SDoug Rabson 
586b7ba544SRafal Jaworowski void	decr_config(unsigned long);
598bc7bc1eSBenno Rice void	decr_init(void);
6020588444SPeter Grehan void	decr_tc_init(void);
618bc7bc1eSBenno Rice 
62fb954d9dSBenno Rice void	cpu_setup(u_int);
63fb954d9dSBenno Rice 
6477d40ffdSMarcel Moolenaar struct trapframe;
6577d40ffdSMarcel Moolenaar void	powerpc_interrupt(struct trapframe *);
6677d40ffdSMarcel Moolenaar 
67897cd717SDoug Rabson #endif /* !_MACHINE_MD_VAR_H_ */
68