xref: /netbsd-src/sys/arch/sbmips/include/autoconf.h (revision 290a34a0654c1fa44ee7c555fca756322438c03e)
1*290a34a0Smatt /* $NetBSD: autoconf.h,v 1.4 2009/12/14 00:46:12 matt Exp $ */
24b7a1286Ssimonb 
34b7a1286Ssimonb /*
44b7a1286Ssimonb  * Copyright 2000, 2001
54b7a1286Ssimonb  * Broadcom Corporation. All rights reserved.
64b7a1286Ssimonb  *
74b7a1286Ssimonb  * This software is furnished under license and may be used and copied only
84b7a1286Ssimonb  * in accordance with the following terms and conditions.  Subject to these
94b7a1286Ssimonb  * conditions, you may download, copy, install, use, modify and distribute
104b7a1286Ssimonb  * modified or unmodified copies of this software in source and/or binary
114b7a1286Ssimonb  * form. No title or ownership is transferred hereby.
124b7a1286Ssimonb  *
134b7a1286Ssimonb  * 1) Any source code used, modified or distributed must reproduce and
144b7a1286Ssimonb  *    retain this copyright notice and list of conditions as they appear in
154b7a1286Ssimonb  *    the source file.
164b7a1286Ssimonb  *
174b7a1286Ssimonb  * 2) No right is granted to use any trade name, trademark, or logo of
188a6b8c3bScgd  *    Broadcom Corporation.  The "Broadcom Corporation" name may not be
198a6b8c3bScgd  *    used to endorse or promote products derived from this software
208a6b8c3bScgd  *    without the prior written permission of Broadcom Corporation.
214b7a1286Ssimonb  *
224b7a1286Ssimonb  * 3) THIS SOFTWARE IS PROVIDED "AS-IS" AND ANY EXPRESS OR IMPLIED
234b7a1286Ssimonb  *    WARRANTIES, INCLUDING BUT NOT LIMITED TO, ANY IMPLIED WARRANTIES OF
244b7a1286Ssimonb  *    MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
254b7a1286Ssimonb  *    NON-INFRINGEMENT ARE DISCLAIMED. IN NO EVENT SHALL BROADCOM BE LIABLE
264b7a1286Ssimonb  *    FOR ANY DAMAGES WHATSOEVER, AND IN PARTICULAR, BROADCOM SHALL NOT BE
274b7a1286Ssimonb  *    LIABLE FOR DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
284b7a1286Ssimonb  *    CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
294b7a1286Ssimonb  *    SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR
304b7a1286Ssimonb  *    BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
314b7a1286Ssimonb  *    WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE
324b7a1286Ssimonb  *    OR OTHERWISE), EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
334b7a1286Ssimonb  */
344b7a1286Ssimonb 
354b7a1286Ssimonb /*
360a30e5fbSsimonb  * Machine-dependent structures for autoconfiguration
374b7a1286Ssimonb  */
384b7a1286Ssimonb 
394b7a1286Ssimonb /*
404b7a1286Ssimonb  * The boot program passes a pointer to a bootinfo structure to the
414b7a1286Ssimonb  * kernel using the following convention:
424b7a1286Ssimonb  *
434b7a1286Ssimonb  *	a0 - CFE handle
444b7a1286Ssimonb  *	a1 - bootinfo magic
454b7a1286Ssimonb  *	a2 - pointer to bootinfo_v1 structrure
464b7a1286Ssimonb  *	a3 - reserved, 0
474b7a1286Ssimonb  */
484b7a1286Ssimonb 
494b7a1286Ssimonb #define	BOOTINFO_MAGIC			0x1234ABCD
504b7a1286Ssimonb #define	BOOTINFO_VERSION		1
514b7a1286Ssimonb 
52*290a34a0Smatt #if _LP64
53*290a34a0Smatt #define BI_FIXUP(x) ((vaddr_t)x | 0xffffffff00000000)
54*290a34a0Smatt #else
55*290a34a0Smatt #define BI_FIXUP(x) x
56*290a34a0Smatt #endif
57*290a34a0Smatt 
58*290a34a0Smatt 
594b7a1286Ssimonb struct bootinfo_v1 {
60*290a34a0Smatt 	uint32_t	version;	/*  0: version of bootinfo	 */
61*290a34a0Smatt 	uint32_t	reserved;	/*  4: round to 64-bit boundary	 */
62*290a34a0Smatt 	uint32_t	ssym;		/*  8: start of kernel sym table */
63*290a34a0Smatt 	uint32_t	esym;		/* 12: end of kernel sym table	 */
644b7a1286Ssimonb 	char	boot_flags[64];		/* 16: boot flags		 */
654b7a1286Ssimonb 	char	booted_kernel[64];	/* 80: name of booted kernel	 */
66*290a34a0Smatt 	uint32_t	fwhandle;	/* 144: firmware handle		 */
67*290a34a0Smatt 	uint32_t	fwentry;	/* 148: firmware entry point	 */
684b7a1286Ssimonb 	u_char	reserved2[100];		/* 256: total size		 */
694b7a1286Ssimonb };
70*290a34a0Smatt 
71*290a34a0Smatt 
72*290a34a0Smatt struct bootinfo_v1_int {
73*290a34a0Smatt 	uint32_t	version;	/*   0/0: version of bootinfo	    */
74*290a34a0Smatt 	uint32_t	reserved;	/*   4/4: round to 64-bit boundary  */
75*290a34a0Smatt 	vaddr_t	ssym;			/*   8/8: start of kernel sym table */
76*290a34a0Smatt 	vaddr_t	esym;			/* 12/16: end of kernel sym table   */
77*290a34a0Smatt 	char	boot_flags[64];		/* 16/24: boot flags		    */
78*290a34a0Smatt 	char	booted_kernel[64];	/* 80/88: name of booted kernel	    */
79*290a34a0Smatt 	vaddr_t	fwhandle;		/* 144/152: firmware handle	    */
80*290a34a0Smatt 	vaddr_t	fwentry;		/* 148/160: firmware entry point    */
81*290a34a0Smatt #ifdef _LP64
82*290a34a0Smatt 	u_char	reserved2[88];		/* 168: total size -> 256	    */
83*290a34a0Smatt #else
84*290a34a0Smatt 	u_char	reserved2[104];		/* 152: total size -> 256	    */
85*290a34a0Smatt #endif
86*290a34a0Smatt };
87*290a34a0Smatt 
88