Home | History | Annotate | Line # | Download | only in libtos
tosdefs.h revision 1.2.4.2
      1  1.2.4.2  nathanw /*	$NetBSD: tosdefs.h,v 1.2.4.2 2002/02/28 04:08:34 nathanw Exp $	*/
      2  1.2.4.2  nathanw 
      3  1.2.4.2  nathanw /*-
      4  1.2.4.2  nathanw  * Copyright (c) 1998 The NetBSD Foundation, Inc.
      5  1.2.4.2  nathanw  * All rights reserved.
      6  1.2.4.2  nathanw  *
      7  1.2.4.2  nathanw  * This code is derived from software contributed to The NetBSD Foundation
      8  1.2.4.2  nathanw  * by Leo Weppelman.
      9  1.2.4.2  nathanw  *
     10  1.2.4.2  nathanw  * Redistribution and use in source and binary forms, with or without
     11  1.2.4.2  nathanw  * modification, are permitted provided that the following conditions
     12  1.2.4.2  nathanw  * are met:
     13  1.2.4.2  nathanw  * 1. Redistributions of source code must retain the above copyright
     14  1.2.4.2  nathanw  *    notice, this list of conditions and the following disclaimer.
     15  1.2.4.2  nathanw  * 2. Redistributions in binary form must reproduce the above copyright
     16  1.2.4.2  nathanw  *    notice, this list of conditions and the following disclaimer in the
     17  1.2.4.2  nathanw  *    documentation and/or other materials provided with the distribution.
     18  1.2.4.2  nathanw  * 3. All advertising materials mentioning features or use of this software
     19  1.2.4.2  nathanw  *    must display the following acknowledgement:
     20  1.2.4.2  nathanw  *        This product includes software developed by the NetBSD
     21  1.2.4.2  nathanw  *        Foundation, Inc. and its contributors.
     22  1.2.4.2  nathanw  * 4. Neither the name of The NetBSD Foundation nor the names of its
     23  1.2.4.2  nathanw  *    contributors may be used to endorse or promote products derived
     24  1.2.4.2  nathanw  *    from this software without specific prior written permission.
     25  1.2.4.2  nathanw  *
     26  1.2.4.2  nathanw  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
     27  1.2.4.2  nathanw  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     28  1.2.4.2  nathanw  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     29  1.2.4.2  nathanw  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
     30  1.2.4.2  nathanw  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     31  1.2.4.2  nathanw  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     32  1.2.4.2  nathanw  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     33  1.2.4.2  nathanw  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     34  1.2.4.2  nathanw  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     35  1.2.4.2  nathanw  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     36  1.2.4.2  nathanw  * POSSIBILITY OF SUCH DAMAGE.
     37  1.2.4.2  nathanw  */
     38  1.2.4.2  nathanw 
     39  1.2.4.2  nathanw #ifndef _LIBTOS_TOSDEFS_H
     40  1.2.4.2  nathanw #define _LIBTOS_TOSDEFS_H
     41  1.2.4.2  nathanw 
     42  1.2.4.2  nathanw #include <sys/types.h>
     43  1.2.4.2  nathanw 
     44  1.2.4.2  nathanw 
     45  1.2.4.2  nathanw #include "kparamb.h"
     46  1.2.4.2  nathanw 
     47  1.2.4.2  nathanw /*
     48  1.2.4.2  nathanw  * TOS variables in low memory
     49  1.2.4.2  nathanw  */
     50  1.2.4.2  nathanw struct _gem_mupb;
     51  1.2.4.2  nathanw struct _basepage;
     52  1.2.4.2  nathanw struct _osheader {
     53  1.2.4.2  nathanw 	u_int16_t	 os_entry;
     54  1.2.4.2  nathanw 	u_int16_t	 os_version;
     55  1.2.4.2  nathanw 	void		 *reseth;
     56  1.2.4.2  nathanw 	struct _osheader *os_beg;
     57  1.2.4.2  nathanw 	void		 *os_end;
     58  1.2.4.2  nathanw 	u_int32_t	 os_rsv1;
     59  1.2.4.2  nathanw 	struct _gem_mupb *os_magic;
     60  1.2.4.2  nathanw 	u_int32_t	 os_date;
     61  1.2.4.2  nathanw 	u_int16_t	 os_conf;
     62  1.2.4.2  nathanw 	u_int16_t	 os_dosdate;
     63  1.2.4.2  nathanw 	char		 **p_root;
     64  1.2.4.2  nathanw 	u_int8_t	 **pkbshift;
     65  1.2.4.2  nathanw 	struct _basepage **p_run;
     66  1.2.4.2  nathanw 	char		 *p_rsv2;
     67  1.2.4.2  nathanw };
     68  1.2.4.2  nathanw 
     69  1.2.4.2  nathanw typedef	struct _osheader	OSH;
     70  1.2.4.2  nathanw 
     71  1.2.4.2  nathanw #define	ADDR_P_COOKIE	((long**)0x5a0)	/* Pointer to cookie jar	*/
     72  1.2.4.2  nathanw #define	ADDR_OSHEAD	((OSH**)0x4f2)	/* Pointer Os-header		*/
     73  1.2.4.2  nathanw #define	ADDR_PHYSTOP	((long*)0x42e)	/* End of ST-ram		*/
     74  1.2.4.2  nathanw #define	ADDR_RAMTOP	((long*)0x5a4)	/* End of TT-ram (unofficial)	*/
     75  1.2.4.2  nathanw #define	ADDR_CHKRAMTOP	((long*)0x5a8)	/*  above is valid (unofficial)	*/
     76  1.2.4.2  nathanw 
     77  1.2.4.2  nathanw #define	RAMTOP_MAGIC	(0x1357bd13)	/* Magic no. for ADDR_CHKRAMTOP	*/
     78  1.2.4.2  nathanw 
     79  1.2.4.2  nathanw #define	TTRAM_BASE	(0x1000000)	/* Fastram always starts here	*/
     80  1.2.4.2  nathanw #define	CTRAM_BASE	(0x4000000)	/*  ... except on CT2 boards:	*/
     81  1.2.4.2  nathanw 					/*         Logical : TTRAM_BASE */
     82  1.2.4.2  nathanw 					/*         Physical: CTRAM_BASE */
     83  1.2.4.2  nathanw 
     84  1.2.4.2  nathanw /*
     85  1.2.4.2  nathanw  * Kernel parameter block
     86  1.2.4.2  nathanw  */
     87  1.2.4.2  nathanw typedef struct osdsc {
     88  1.2.4.2  nathanw 	const char *	ostype;
     89  1.2.4.2  nathanw 	const char *	osname;
     90  1.2.4.2  nathanw 	unsigned	rootfs;
     91  1.2.4.2  nathanw 	struct kparamb 	kp;
     92  1.2.4.2  nathanw } osdsc_t;
     93  1.2.4.2  nathanw 
     94  1.2.4.2  nathanw #define	ksize		kp.ksize
     95  1.2.4.2  nathanw #define	kstart		kp.kp
     96  1.2.4.2  nathanw #define	kentry		kp.entry
     97  1.2.4.2  nathanw #define	k_esym		kp.esym_loc
     98  1.2.4.2  nathanw #define	stmem_size	kp.stmem_size
     99  1.2.4.2  nathanw #define	ttmem_size	kp.ttmem_size
    100  1.2.4.2  nathanw #define	ttmem_start	kp.ttmem_start
    101  1.2.4.2  nathanw #define	cputype		kp.bootflags
    102  1.2.4.2  nathanw #define	boothowto	kp.boothowto
    103  1.2.4.2  nathanw 
    104  1.2.4.2  nathanw #endif /* !_LIBTOS_TOSDEFS_H */
    105