xref: /netbsd-src/sys/arch/arm/include/bootconfig.h (revision 77314eed7d0affafcfa9aab22d40fec577b889ba)
1*77314eedSskrll /*	$NetBSD: bootconfig.h,v 1.10 2020/10/18 16:28:57 skrll Exp $	*/
22af5062aSbjh21 
32af5062aSbjh21 /*
42af5062aSbjh21  * Copyright (c) 1994 Mark Brinicombe.
52af5062aSbjh21  * Copyright (c) 1994 Brini.
62af5062aSbjh21  * All rights reserved.
72af5062aSbjh21  *
82af5062aSbjh21  * This code is derived from software written for Brini by Mark Brinicombe
92af5062aSbjh21  *
102af5062aSbjh21  * Redistribution and use in source and binary forms, with or without
112af5062aSbjh21  * modification, are permitted provided that the following conditions
122af5062aSbjh21  * are met:
132af5062aSbjh21  * 1. Redistributions of source code must retain the above copyright
142af5062aSbjh21  *    notice, this list of conditions and the following disclaimer.
152af5062aSbjh21  * 2. Redistributions in binary form must reproduce the above copyright
162af5062aSbjh21  *    notice, this list of conditions and the following disclaimer in the
172af5062aSbjh21  *    documentation and/or other materials provided with the distribution.
182af5062aSbjh21  * 3. All advertising materials mentioning features or use of this software
192af5062aSbjh21  *    must display the following acknowledgement:
202af5062aSbjh21  *	This product includes software developed by Mark Brinicombe
212af5062aSbjh21  *	for the NetBSD Project.
222af5062aSbjh21  * 4. The name of the company nor the name of the author may be used to
232af5062aSbjh21  *    endorse or promote products derived from this software without specific
242af5062aSbjh21  *    prior written permission.
252af5062aSbjh21  *
262af5062aSbjh21  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
272af5062aSbjh21  * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
282af5062aSbjh21  * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
292af5062aSbjh21  * IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
302af5062aSbjh21  * INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
312af5062aSbjh21  * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
322af5062aSbjh21  * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
332af5062aSbjh21  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
342af5062aSbjh21  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
352af5062aSbjh21  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
362af5062aSbjh21  * SUCH DAMAGE.
372af5062aSbjh21  */
382af5062aSbjh21 
394fcb6d73Sskrll #ifndef _ARM_BOOTCONFIG_H
404fcb6d73Sskrll #define _ARM_BOOTCONFIG_H
414fcb6d73Sskrll 
422af5062aSbjh21 #ifdef _KERNEL
432af5062aSbjh21 #define BOOTOPT_TYPE_BOOLEAN		0
442af5062aSbjh21 #define BOOTOPT_TYPE_STRING		1
452af5062aSbjh21 #define BOOTOPT_TYPE_INT		2
462af5062aSbjh21 #define BOOTOPT_TYPE_BININT		3
472af5062aSbjh21 #define BOOTOPT_TYPE_HEXINT		4
48a52589d6Sjmcneill #define BOOTOPT_TYPE_MACADDR		5
492af5062aSbjh21 #define BOOTOPT_TYPE_MASK		7
502af5062aSbjh21 
511f4278e1Smatt struct boot_physmem {
521f4278e1Smatt 	paddr_t bp_start;		/* starting PFN (not address) */
531f4278e1Smatt 	psize_t bp_pages;		/* # of pages */
541f4278e1Smatt 	u_int bp_freelist;		/* VM_FREELIST_ * */
551f4278e1Smatt 	u_int bp_flags;
561f4278e1Smatt #define BOOT_PHYSMEM_CAN_DMA	1	/* Can DMA direct to this memory.  */
571f4278e1Smatt };
581f4278e1Smatt 
5902cdf4d2Sdsl int get_bootconf_option(char *, const char *, int, void *);
6043e0601bSjmcneill bool match_bootconf_option(char *, const char *, const char *);
6143e0601bSjmcneill char *get_bootconf_string(char *, const char *);
622af5062aSbjh21 
632af5062aSbjh21 extern char *boot_args;
642af5062aSbjh21 #endif	/* _KERNEL */
654fcb6d73Sskrll 
664fcb6d73Sskrll #endif
67