xref: /netbsd-src/sys/arch/arm/include/ofw.h (revision 1e0abe4eb3eb7363abcb1d6a9c39e08e5103c45f)
1 /*	$NetBSD: ofw.h,v 1.5 2014/09/13 17:41:03 matt Exp $	*/
2 
3 /*
4  * Copyright 1997
5  * Digital Equipment Corporation. All rights reserved.
6  *
7  * This software is furnished under license and may be used and
8  * copied only in accordance with the following terms and conditions.
9  * Subject to these conditions, you may download, copy, install,
10  * use, modify and distribute this software in source and/or binary
11  * form. No title or ownership is transferred hereby.
12  *
13  * 1) Any source code used, modified or distributed must reproduce
14  *    and retain this copyright notice and list of conditions as
15  *    they appear in the source file.
16  *
17  * 2) No right is granted to use any trade name, trademark, or logo of
18  *    Digital Equipment Corporation. Neither the "Digital Equipment
19  *    Corporation" name nor any trademark or logo of Digital Equipment
20  *    Corporation may be used to endorse or promote products derived
21  *    from this software without the prior written permission of
22  *    Digital Equipment Corporation.
23  *
24  * 3) This software is provided "AS-IS" and any express or implied
25  *    warranties, including but not limited to, any implied warranties
26  *    of merchantability, fitness for a particular purpose, or
27  *    non-infringement are disclaimed. In no event shall DIGITAL be
28  *    liable for any damages whatsoever, and in particular, DIGITAL
29  *    shall not be liable for special, indirect, consequential, or
30  *    incidental damages or damages for lost profits, loss of
31  *    revenue or loss of use, whether such damages arise in contract,
32  *    negligence, tort, under statute, in equity, at law or otherwise,
33  *    even if advised of the possibility of such damage.
34  */
35 
36 #ifndef _ARM_OFW_H_
37 #define _ARM_OFW_H_
38 
39 
40 /* Virtual address range reserved for OFW. */
41 /* Maybe this should be elsewhere? -JJK */
42 #define	OFW_VIRT_BASE	0xF7000000
43 #define	OFW_VIRT_SIZE	0x01000000
44 
45 
46 /* OFW client services handle. */
47 typedef int (*ofw_handle_t)(void *);
48 
49 
50 /* Implemented in <ofw/ofw.c> */
51 void ofw_init(ofw_handle_t);
52 void ofw_boot(int, char *);
53 void ofw_getbootinfo(char **, char **);
54 void ofw_configmem(void);
55 void ofw_configisa(vaddr_t *, vaddr_t *);
56 void ofw_configisadma(vaddr_t *);
57 int  ofw_isadmarangeintersect(vaddr_t, vaddr_t, vaddr_t *, vaddr_t *);
58 vaddr_t ofw_gettranslation(vaddr_t);
59 vaddr_t ofw_map(vaddr_t, vsize_t, int);
60 vaddr_t ofw_getcleaninfo(void);
61 
62 #ifdef	OFWGENCFG
63 /* Implemented in <ofw/ofwgencfg_machdep.c> */
64 extern int ofw_handleticks;
65 extern void cpu_reboot(int, char *);
66 extern void ofrootfound(void);
67 #endif
68 
69 #endif /* !_ARM_OFW_H_ */
70