Home | History | Annotate | Line # | Download | only in sboot
sboot.h revision 1.3
      1  1.3  perry /*	$NetBSD: sboot.h,v 1.3 1998/01/05 07:03:07 perry 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.1  chuck typedef unsigned short u_short;
     40  1.1  chuck typedef unsigned long u_long;
     41  1.1  chuck typedef unsigned char u_char;
     42  1.1  chuck typedef unsigned int u_int;
     43  1.1  chuck typedef u_long size_t;
     44  1.1  chuck typedef char *caddr_t;
     45  1.1  chuck extern caddr_t end;
     46  1.1  chuck 
     47  1.1  chuck #define NULL ((char *)0)
     48  1.1  chuck 
     49  1.1  chuck void bcopy(const void *, void *, size_t); /* libc_sa */
     50  1.1  chuck void *memset(void *, int, size_t); /* libc_sa */
     51  1.1  chuck void printf(const char *, ...); /* libc_sa */
     52  1.1  chuck 
     53  1.1  chuck /* console */
     54  1.1  chuck void puts(char *);
     55  1.1  chuck void putchar(char);
     56  1.1  chuck char cngetc();
     57  1.2  chuck char *ngets(char *, int);
     58  1.1  chuck 
     59  1.1  chuck /* sboot */
     60  1.1  chuck void callrom();
     61  1.2  chuck void do_cmd(char *, char *);
     62  1.1  chuck 
     63  1.1  chuck /* le */
     64  1.1  chuck #define LANCE_ADDR 0xfffe0778
     65  1.1  chuck #define ERAM_ADDR  0xfffe0774
     66  1.1  chuck #define LANCE_REG_ADDR 0xfffe1800
     67  1.1  chuck void le_end(void);
     68  1.1  chuck void le_init(void);
     69  1.1  chuck int le_get(u_char *, size_t, u_long);
     70  1.1  chuck int le_put(u_char *, size_t);
     71  1.1  chuck 
     72  1.1  chuck /* etherfun */
     73  1.1  chuck #define READ 0
     74  1.1  chuck #define ACKN 1
     75  1.1  chuck void do_rev_arp();
     76  1.1  chuck int get_rev_arp();
     77  1.1  chuck int rev_arp();
     78  1.1  chuck void do_send_tftp( int );
     79  1.1  chuck int do_get_file();
     80  1.1  chuck void tftp_file(char *, u_long);
     81  1.1  chuck 
     82  1.1  chuck /* clock */
     83  1.1  chuck u_long time(void);
     84  1.1  chuck 
     85  1.1  chuck /* checksum */
     86  1.1  chuck u_long oc_cksum (void *, u_long, u_long);
     87  1.1  chuck 
     88  1.1  chuck #define CONS_ZS_ADDR (0xfffe3002)
     89  1.1  chuck #define CLOCK_ADDR (0xfffe07f8)
     90  1.1  chuck #define LOAD_ADDR 0x8000
     91  1.1  chuck 
     92  1.1  chuck unsigned char myea[6];                /* my ether addr */
     93  1.1  chuck unsigned char myip[4];
     94  1.1  chuck unsigned char servip[4];
     95  1.1  chuck unsigned char servea[6];
     96  1.1  chuck u_short myport;
     97  1.1  chuck u_short servport;
     98  1.1  chuck unsigned char reboot;
     99