xref: /freebsd/sys/powerpc/include/md_var.h (revision 0ecc478b74a858011290fa1590995ce1609c4f78)
1897cd717SDoug Rabson /*-
271e3c308SPedro F. Giffuni  * SPDX-License-Identifier: BSD-2-Clause-FreeBSD
371e3c308SPedro F. Giffuni  *
4897cd717SDoug Rabson  * Copyright (c) 1998 Doug Rabson
5897cd717SDoug Rabson  * All rights reserved.
6897cd717SDoug Rabson  *
7897cd717SDoug Rabson  * Redistribution and use in source and binary forms, with or without
8897cd717SDoug Rabson  * modification, are permitted provided that the following conditions
9897cd717SDoug Rabson  * are met:
10897cd717SDoug Rabson  * 1. Redistributions of source code must retain the above copyright
11897cd717SDoug Rabson  *    notice, this list of conditions and the following disclaimer.
12897cd717SDoug Rabson  * 2. Redistributions in binary form must reproduce the above copyright
13897cd717SDoug Rabson  *    notice, this list of conditions and the following disclaimer in the
14897cd717SDoug Rabson  *    documentation and/or other materials provided with the distribution.
15897cd717SDoug Rabson  *
16897cd717SDoug Rabson  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
17897cd717SDoug Rabson  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18897cd717SDoug Rabson  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19897cd717SDoug Rabson  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
20897cd717SDoug Rabson  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
21897cd717SDoug Rabson  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
22897cd717SDoug Rabson  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
23897cd717SDoug Rabson  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
24897cd717SDoug Rabson  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
25897cd717SDoug Rabson  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
26897cd717SDoug Rabson  * SUCH DAMAGE.
27897cd717SDoug Rabson  *
28c3aac50fSPeter Wemm  * $FreeBSD$
29897cd717SDoug Rabson  */
30897cd717SDoug Rabson 
31897cd717SDoug Rabson #ifndef _MACHINE_MD_VAR_H_
32897cd717SDoug Rabson #define	_MACHINE_MD_VAR_H_
33897cd717SDoug Rabson 
34897cd717SDoug Rabson /*
35897cd717SDoug Rabson  * Miscellaneous machine-dependent declarations.
36897cd717SDoug Rabson  */
37897cd717SDoug Rabson 
38c3e289e1SNathan Whitehorn extern	char	sigcode32[];
39c3e289e1SNathan Whitehorn extern	int	szsigcode32;
40c3e289e1SNathan Whitehorn 
41c3e289e1SNathan Whitehorn #ifdef __powerpc64__
42fd6820bbSNathan Whitehorn extern	char	sigcode64[], sigcode64_elfv2[];
43fd6820bbSNathan Whitehorn extern	int	szsigcode64, szsigcode64_elfv2;
44*0ecc478bSLeandro Lupori 
45*0ecc478bSLeandro Lupori extern	uint64_t	*vm_page_dump;
46*0ecc478bSLeandro Lupori extern	int	vm_page_dump_size;
47*0ecc478bSLeandro Lupori 
48*0ecc478bSLeandro Lupori struct	dumperinfo;
49*0ecc478bSLeandro Lupori int	minidumpsys(struct dumperinfo *);
50*0ecc478bSLeandro Lupori int	is_dumpable(vm_paddr_t);
51*0ecc478bSLeandro Lupori void	dump_add_page(vm_paddr_t);
52*0ecc478bSLeandro Lupori void	dump_drop_page(vm_paddr_t);
53c3e289e1SNathan Whitehorn #endif
54c3e289e1SNathan Whitehorn 
55447b3772SPeter Wemm extern	long	Maxmem;
5649c0f52eSAndrew Gallatin extern	int	busdma_swi_pending;
57897cd717SDoug Rabson 
585244eac9SBenno Rice extern	vm_offset_t	kstack0;
595244eac9SBenno Rice extern	vm_offset_t	kstack0_phys;
605244eac9SBenno Rice 
618a109fa3SMarcel Moolenaar extern	int powerpc_pow_enabled;
624c01c0b9SNathan Whitehorn extern	int cacheline_size;
631c96bdd1SNathan Whitehorn extern  int hw_direct_map;
6401bd17ccSMarcel Moolenaar 
6501bd17ccSMarcel Moolenaar void	__syncicache(void *, int);
6601bd17ccSMarcel Moolenaar 
67812344bcSAlfred Perlstein void	busdma_swi(void);
68812344bcSAlfred Perlstein int	is_physical_memory(vm_offset_t addr);
69949313b7SMarcel Moolenaar int	mem_valid(vm_offset_t addr, int len);
70897cd717SDoug Rabson 
718bc7bc1eSBenno Rice void	decr_init(void);
727ad9c533SRafal Jaworowski void	decr_ap_init(void);
7320588444SPeter Grehan void	decr_tc_init(void);
748bc7bc1eSBenno Rice 
7555a12bbdSJustin Hibbits void	cpu_feature_setup(void);
76fb954d9dSBenno Rice void	cpu_setup(u_int);
77fb954d9dSBenno Rice 
7877d40ffdSMarcel Moolenaar struct	trapframe;
7977d40ffdSMarcel Moolenaar void	powerpc_interrupt(struct trapframe *);
8077d40ffdSMarcel Moolenaar 
81897cd717SDoug Rabson #endif /* !_MACHINE_MD_VAR_H_ */
82