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