Home | History | Annotate | Line # | Download | only in boot
boot.h revision 1.2.12.4
      1  1.2.12.4     yamt /*	$NetBSD: boot.h,v 1.2.12.4 2008/03/24 09:38:38 yamt 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  * 3. All advertising materials mentioning features or use of this software
     16       1.1      cdi  *    must display the following acknowledgement:
     17       1.1      cdi  *        This product includes software developed by the NetBSD
     18       1.1      cdi  *        Foundation, Inc. and its contributors.
     19       1.1      cdi  * 4. Neither the name of The NetBSD Foundation nor the names of its
     20       1.1      cdi  *    contributors may be used to endorse or promote products derived
     21       1.1      cdi  *    from this software without specific prior written permission.
     22       1.1      cdi  *
     23       1.1      cdi  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     24       1.1      cdi  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     25       1.1      cdi  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     26       1.1      cdi  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     27       1.1      cdi  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     28       1.1      cdi  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     29       1.1      cdi  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     30       1.1      cdi  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     31       1.1      cdi  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     32       1.1      cdi  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     33       1.1      cdi  * POSSIBILITY OF SUCH DAMAGE.
     34       1.1      cdi  */
     35       1.1      cdi 
     36       1.1      cdi #if defined(_DEBUG)
     37       1.1      cdi #define DPRINTF(x)	printf x;
     38       1.1      cdi #else
     39       1.1      cdi #define DPRINTF(x)
     40       1.1      cdi #endif
     41       1.1      cdi 
     42       1.1      cdi #define MAXDEVNAME	16
     43       1.2  tsutsui #define DEFBOOTDEV	"wd0a"
     44       1.1      cdi #define DEFKERNELNAME	kernelnames[0]
     45       1.1      cdi 
     46       1.1      cdi extern char *kernelnames[];
     47       1.1      cdi 
     48       1.1      cdi /*
     49       1.1      cdi  * com
     50       1.1      cdi  */
     51  1.2.12.1     yamt int comspeed(long);
     52       1.1      cdi 
     53       1.1      cdi /*
     54       1.1      cdi  * console
     55       1.1      cdi  */
     56  1.2.12.1     yamt char *cninit(int *, int *);
     57  1.2.12.1     yamt int   cngetc(void);
     58  1.2.12.1     yamt void  cnputc(int);
     59  1.2.12.1     yamt int   cnscan(void);
     60       1.1      cdi 
     61       1.1      cdi /*
     62       1.1      cdi  * clock
     63       1.1      cdi  */
     64       1.1      cdi void delay(int);
     65       1.1      cdi 
     66       1.1      cdi /*
     67       1.1      cdi  * wd
     68       1.1      cdi  */
     69  1.2.12.1     yamt int wdstrategy(void *, int, daddr_t, size_t, void *, size_t *);
     70  1.2.12.1     yamt int wdopen(struct open_file *, ...);
     71  1.2.12.1     yamt int wdclose(struct open_file *);
     72       1.1      cdi 
     73       1.1      cdi /*
     74  1.2.12.2     yamt  * tlp
     75  1.2.12.2     yamt  */
     76  1.2.12.2     yamt void *tlp_init(void *);
     77  1.2.12.2     yamt int tlp_send(void *, char *, u_int);
     78  1.2.12.2     yamt int tlp_recv(void *, char *, u_int, u_int);
     79  1.2.12.2     yamt 
     80  1.2.12.2     yamt extern struct netif_driver ether_tlp_driver;
     81  1.2.12.2     yamt 
     82  1.2.12.2     yamt /*
     83       1.1      cdi  * devopen
     84       1.1      cdi  */
     85  1.2.12.1     yamt int devparse(const char *, int *, uint8_t *, uint8_t *, const char **);
     86       1.2  tsutsui 
     87  1.2.12.2     yamt /*
     88  1.2.12.2     yamt  * tgetc
     89  1.2.12.2     yamt  */
     90       1.2  tsutsui int tgets(char *);
     91  1.2.12.2     yamt 
     92  1.2.12.2     yamt /*
     93  1.2.12.2     yamt  * cache
     94  1.2.12.2     yamt  */
     95  1.2.12.2     yamt #define CACHELINESIZE	32
     96  1.2.12.2     yamt 
     97  1.2.12.2     yamt void pdcache_wb(uint32_t, u_int);
     98  1.2.12.2     yamt void pdcache_inv(uint32_t, u_int);
     99  1.2.12.2     yamt void pdcache_wbinv(uint32_t, u_int);
    100  1.2.12.3     yamt 
    101  1.2.12.3     yamt /*
    102  1.2.12.3     yamt  * pci
    103  1.2.12.3     yamt  */
    104  1.2.12.3     yamt uint32_t pcicfgread(uint32_t, uint32_t);
    105