xref: /netbsd-src/sys/arch/atari/stand/bootpref/bootpref.h (revision ce099b40997c43048fb78bd578195f81d2456523)
1 /*	$NetBSD: bootpref.h,v 1.3 2008/04/28 20:23:15 martin Exp $	*/
2 /*-
3  * Copyright (c) 1998 The NetBSD Foundation, Inc.
4  * All rights reserved.
5  *
6  * This code is derived from software contributed to The NetBSD Foundation
7  * by Julian Coleman & Leo Weppelman.
8  *
9  * Redistribution and use in source and binary forms, with or without
10  * modification, are permitted provided that the following conditions
11  * are met:
12  * 1. Redistributions of source code must retain the above copyright
13  *    notice, this list of conditions and the following disclaimer.
14  * 2. Redistributions in binary form must reproduce the above copyright
15  *    notice, this list of conditions and the following disclaimer in the
16  *    documentation and/or other materials provided with the distribution.
17  *
18  * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28  * POSSIBILITY OF SUCH DAMAGE.
29  */
30 #define	PATH_NVRAM	"/dev/nvram"
31 
32 #define	NVRAM_BOOTPREF	1	/* Boot preference			*/
33 #define	BOOTPREF_TOS	0x80
34 #define	BOOTPREF_SYSV	0x40
35 #define	BOOTPREF_NETBSD	0x20
36 #define	BOOTPREF_LINUX	0x10
37 #define BOOTPREF_MAGIC	0x08
38 #define BOOTPREF_NONE	0x00
39 
40 #define	NVRAM_LANG	6	/* Language				*/
41 #define	LANG_USA	0x00
42 #define	LANG_D		0x01
43 #define	LANG_FR		0x02
44 #define	LANG_GB		0x03
45 #define	LANG_ESP	0x04
46 #define	LANG_I		0x05
47 
48 #define	NVRAM_KBDLANG	7	/* Keyboard language			*/
49 #define	KBDLANG_USA	0x00
50 #define	KBDLANG_D	0x01
51 #define	KBDLANG_FR	0x02
52 #define	KBDLANG_GB	0x03
53 #define	KBDLANG_ESP	0x04
54 #define	KBDLANG_I	0x05
55 #define KBDLANG_CHF	0x07
56 #define KBDLANG_CHD	0x08
57 
58 #define NVRAM_DATIME	8	/* TOS/GEM date & time formats		*/
59 #define	DATIME_24H	0x10	/* Otherwise 12H			*/
60 #define	DATIME_MMDDYY	0x00
61 #define	DATIME_DDMMYY	0x01
62 #define	DATIME_YYMMDD	0x02
63 #define	DATIME_YYDDMM	0x03
64 
65 #define NVRAM_DATESEP	9	/* Date separator			*/
66 				/* (ASCII value of char. or 0 for '/')	*/
67 
68 #define	NVRAM_BOOTDLY	10	/* Bootdelay in seconds			*/
69 
70 #define	NVRAM_VID1	14	/* Video stuff				*/
71 #define VID1_INTERLACE	01	/* Interlace (TV) / Double line (VGA)	*/
72 
73 #define	NVRAM_VID2	15	/* Video stuff				*/
74 #define	VID2_2COL	0x00
75 #define	VID2_4COL	0x01
76 #define	VID2_16COL	0x02
77 #define	VID2_256COL	0x03
78 #define	VID2_65535COL	0x04
79 #define VID2_80CLM	0x08	/* Otherwise 40 columns			*/
80 #define	VID2_VGA	0x10	/* Otherwise TV				*/
81 #define	VID2_PAL	0x20	/* Otherwise NTSC			*/
82 #define	VID2_OVERSCAN	0x40
83 #define	VID2_COMPAT	0x80
84 
85 #define	NVRAM_HOSTID	16	/* Bitfield containing SCSI host-id	*/
86 #define HOSTID_MASK	0x7f
87 #define HOSTID_VALID	0x80
88