sboot.h revision 1.5.40.1 1 1.5.40.1 yamt /* $NetBSD: sboot.h,v 1.5.40.1 2007/09/03 14:28:13 yamt Exp $ */
2 1.3 perry
3 1.1 chuck /*
4 1.1 chuck *
5 1.1 chuck * Copyright (c) 1995 Charles D. Cranor and Seth Widoff
6 1.1 chuck * All rights reserved.
7 1.1 chuck *
8 1.1 chuck * Redistribution and use in source and binary forms, with or without
9 1.1 chuck * modification, are permitted provided that the following conditions
10 1.1 chuck * are met:
11 1.1 chuck * 1. Redistributions of source code must retain the above copyright
12 1.1 chuck * notice, this list of conditions and the following disclaimer.
13 1.1 chuck * 2. Redistributions in binary form must reproduce the above copyright
14 1.1 chuck * notice, this list of conditions and the following disclaimer in the
15 1.1 chuck * documentation and/or other materials provided with the distribution.
16 1.1 chuck * 3. All advertising materials mentioning features or use of this software
17 1.1 chuck * must display the following acknowledgement:
18 1.1 chuck * This product includes software developed by Charles D. Cranor
19 1.1 chuck * and Seth Widoff.
20 1.1 chuck * 4. The name of the author may not be used to endorse or promote products
21 1.1 chuck * derived from this software without specific prior written permission.
22 1.1 chuck *
23 1.1 chuck * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
24 1.1 chuck * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
25 1.1 chuck * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
26 1.1 chuck * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
27 1.1 chuck * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
28 1.1 chuck * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
29 1.1 chuck * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
30 1.1 chuck * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 1.1 chuck * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
32 1.1 chuck * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
33 1.1 chuck */
34 1.1 chuck
35 1.1 chuck /*
36 1.1 chuck * sboot.h: stuff for MVME147's serial line boot
37 1.1 chuck */
38 1.1 chuck
39 1.5 jdolecek #include <lib/libkern/libkern.h>
40 1.5 jdolecek #include <lib/libsa/stand.h>
41 1.5 jdolecek
42 1.5.40.1 yamt extern void *end;
43 1.1 chuck
44 1.1 chuck
45 1.1 chuck /* console */
46 1.1 chuck void puts(char *);
47 1.5 jdolecek void putchar(int);
48 1.5 jdolecek char cngetc(void);
49 1.2 chuck char *ngets(char *, int);
50 1.5 jdolecek void consinit(void);
51 1.1 chuck
52 1.1 chuck /* sboot */
53 1.5 jdolecek void callrom(void);
54 1.2 chuck void do_cmd(char *, char *);
55 1.1 chuck
56 1.1 chuck /* le */
57 1.1 chuck #define LANCE_ADDR 0xfffe0778
58 1.1 chuck #define ERAM_ADDR 0xfffe0774
59 1.1 chuck #define LANCE_REG_ADDR 0xfffe1800
60 1.1 chuck void le_end(void);
61 1.1 chuck void le_init(void);
62 1.1 chuck int le_get(u_char *, size_t, u_long);
63 1.1 chuck int le_put(u_char *, size_t);
64 1.1 chuck
65 1.1 chuck /* etherfun */
66 1.1 chuck #define READ 0
67 1.1 chuck #define ACKN 1
68 1.5 jdolecek void do_rev_arp(void);
69 1.5 jdolecek int get_rev_arp(void);
70 1.5 jdolecek int rev_arp(void);
71 1.5 jdolecek void do_send_tftp(int);
72 1.5 jdolecek int do_get_file(void);
73 1.1 chuck void tftp_file(char *, u_long);
74 1.1 chuck
75 1.1 chuck /* clock */
76 1.1 chuck u_long time(void);
77 1.1 chuck
78 1.1 chuck /* checksum */
79 1.1 chuck u_long oc_cksum (void *, u_long, u_long);
80 1.5 jdolecek
81 1.5 jdolecek /* start */
82 1.5 jdolecek void go(int, void *, void *);
83 1.1 chuck
84 1.1 chuck #define CONS_ZS_ADDR (0xfffe3002)
85 1.1 chuck #define CLOCK_ADDR (0xfffe07f8)
86 1.1 chuck #define LOAD_ADDR 0x8000
87 1.1 chuck
88 1.1 chuck unsigned char myea[6]; /* my ether addr */
89 1.1 chuck unsigned char myip[4];
90 1.1 chuck unsigned char servip[4];
91 1.1 chuck unsigned char servea[6];
92 1.1 chuck u_short myport;
93 1.1 chuck u_short servport;
94 1.1 chuck unsigned char reboot;
95