boot.h revision 1.13 1 1.13 matt /* $NetBSD: boot.h,v 1.13 2015/06/23 20:27:28 matt Exp $ */
2 1.1 cdi
3 1.1 cdi /*-
4 1.1 cdi * Copyright (c) 2003 The NetBSD Foundation, Inc.
5 1.1 cdi * All rights reserved.
6 1.1 cdi *
7 1.1 cdi * Redistribution and use in source and binary forms, with or without
8 1.1 cdi * modification, are permitted provided that the following conditions
9 1.1 cdi * are met:
10 1.1 cdi * 1. Redistributions of source code must retain the above copyright
11 1.1 cdi * notice, this list of conditions and the following disclaimer.
12 1.1 cdi * 2. Redistributions in binary form must reproduce the above copyright
13 1.1 cdi * notice, this list of conditions and the following disclaimer in the
14 1.1 cdi * documentation and/or other materials provided with the distribution.
15 1.1 cdi *
16 1.1 cdi * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
17 1.1 cdi * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
18 1.1 cdi * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
19 1.1 cdi * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
20 1.1 cdi * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21 1.1 cdi * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22 1.1 cdi * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23 1.1 cdi * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24 1.1 cdi * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25 1.1 cdi * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26 1.1 cdi * POSSIBILITY OF SUCH DAMAGE.
27 1.1 cdi */
28 1.1 cdi
29 1.13 matt #include <mips/cpuregs.h>
30 1.13 matt
31 1.1 cdi #if defined(_DEBUG)
32 1.1 cdi #define DPRINTF(x) printf x;
33 1.1 cdi #else
34 1.1 cdi #define DPRINTF(x)
35 1.1 cdi #endif
36 1.1 cdi
37 1.1 cdi #define MAXDEVNAME 16
38 1.2 tsutsui #define DEFBOOTDEV "wd0a"
39 1.1 cdi #define DEFKERNELNAME kernelnames[0]
40 1.1 cdi
41 1.1 cdi extern char *kernelnames[];
42 1.1 cdi
43 1.1 cdi /*
44 1.1 cdi * com
45 1.1 cdi */
46 1.4 tsutsui int comspeed(long);
47 1.1 cdi
48 1.1 cdi /*
49 1.1 cdi * console
50 1.1 cdi */
51 1.4 tsutsui char *cninit(int *, int *);
52 1.4 tsutsui int cngetc(void);
53 1.4 tsutsui void cnputc(int);
54 1.4 tsutsui int cnscan(void);
55 1.1 cdi
56 1.1 cdi /*
57 1.1 cdi * clock
58 1.1 cdi */
59 1.1 cdi void delay(int);
60 1.1 cdi
61 1.1 cdi /*
62 1.1 cdi * wd
63 1.1 cdi */
64 1.4 tsutsui int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
65 1.4 tsutsui int wdopen(struct open_file *, ...);
66 1.4 tsutsui int wdclose(struct open_file *);
67 1.1 cdi
68 1.1 cdi /*
69 1.6 tsutsui * tlp
70 1.6 tsutsui */
71 1.6 tsutsui void *tlp_init(void *);
72 1.6 tsutsui int tlp_send(void *, char *, u_int);
73 1.6 tsutsui int tlp_recv(void *, char *, u_int, u_int);
74 1.6 tsutsui
75 1.6 tsutsui extern struct netif_driver ether_tlp_driver;
76 1.6 tsutsui
77 1.6 tsutsui /*
78 1.1 cdi * devopen
79 1.1 cdi */
80 1.4 tsutsui int devparse(const char *, int *, uint8_t *, uint8_t *, const char **);
81 1.2 tsutsui
82 1.6 tsutsui /*
83 1.6 tsutsui * tgetc
84 1.6 tsutsui */
85 1.2 tsutsui int tgets(char *);
86 1.6 tsutsui
87 1.6 tsutsui /*
88 1.6 tsutsui * cache
89 1.6 tsutsui */
90 1.6 tsutsui #define CACHELINESIZE 32
91 1.6 tsutsui
92 1.6 tsutsui void pdcache_wb(uint32_t, u_int);
93 1.6 tsutsui void pdcache_inv(uint32_t, u_int);
94 1.6 tsutsui void pdcache_wbinv(uint32_t, u_int);
95 1.8 tsutsui
96 1.8 tsutsui /*
97 1.8 tsutsui * pci
98 1.8 tsutsui */
99 1.8 tsutsui uint32_t pcicfgread(uint32_t, uint32_t);
100 1.11 tsutsui
101 1.11 tsutsui /*
102 1.11 tsutsui * lcd
103 1.11 tsutsui */
104 1.11 tsutsui void lcd_init(void);
105 1.11 tsutsui void lcd_banner(void);
106 1.11 tsutsui void lcd_loadfile(const char *);
107 1.12 tsutsui void lcd_failed(void);
108