1 /* $NetBSD: bootpref.h,v 1.2 1998/06/17 11:45:13 leo 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 * 3. All advertising materials mentioning features or use of this software 18 * must display the following acknowledgement: 19 * This product includes software developed by the NetBSD 20 * Foundation, Inc. and its contributors. 21 * 4. Neither the name of The NetBSD Foundation nor the names of its 22 * contributors may be used to endorse or promote products derived 23 * from this software without specific prior written permission. 24 * 25 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS 26 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS 29 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 * POSSIBILITY OF SUCH DAMAGE. 36 */ 37 #define PATH_NVRAM "/dev/nvram" 38 39 #define NVRAM_BOOTPREF 1 /* Boot preference */ 40 #define BOOTPREF_TOS 0x80 41 #define BOOTPREF_SYSV 0x40 42 #define BOOTPREF_NETBSD 0x20 43 #define BOOTPREF_LINUX 0x10 44 #define BOOTPREF_MAGIC 0x08 45 #define BOOTPREF_NONE 0x00 46 47 #define NVRAM_LANG 6 /* Language */ 48 #define LANG_USA 0x00 49 #define LANG_D 0x01 50 #define LANG_FR 0x02 51 #define LANG_GB 0x03 52 #define LANG_ESP 0x04 53 #define LANG_I 0x05 54 55 #define NVRAM_KBDLANG 7 /* Keyboard language */ 56 #define KBDLANG_USA 0x00 57 #define KBDLANG_D 0x01 58 #define KBDLANG_FR 0x02 59 #define KBDLANG_GB 0x03 60 #define KBDLANG_ESP 0x04 61 #define KBDLANG_I 0x05 62 #define KBDLANG_CHF 0x07 63 #define KBDLANG_CHD 0x08 64 65 #define NVRAM_DATIME 8 /* TOS/GEM date & time formats */ 66 #define DATIME_24H 0x10 /* Otherwise 12H */ 67 #define DATIME_MMDDYY 0x00 68 #define DATIME_DDMMYY 0x01 69 #define DATIME_YYMMDD 0x02 70 #define DATIME_YYDDMM 0x03 71 72 #define NVRAM_DATESEP 9 /* Date separator */ 73 /* (ASCII value of char. or 0 for '/') */ 74 75 #define NVRAM_BOOTDLY 10 /* Bootdelay in seconds */ 76 77 #define NVRAM_VID1 14 /* Video stuff */ 78 #define VID1_INTERLACE 01 /* Interlace (TV) / Double line (VGA) */ 79 80 #define NVRAM_VID2 15 /* Video stuff */ 81 #define VID2_2COL 0x00 82 #define VID2_4COL 0x01 83 #define VID2_16COL 0x02 84 #define VID2_256COL 0x03 85 #define VID2_65535COL 0x04 86 #define VID2_80CLM 0x08 /* Otherwise 40 columns */ 87 #define VID2_VGA 0x10 /* Otherwise TV */ 88 #define VID2_PAL 0x20 /* Otherwise NTSC */ 89 #define VID2_OVERSCAN 0x40 90 #define VID2_COMPAT 0x80 91 92 #define NVRAM_HOSTID 16 /* Bitfield containing SCSI host-id */ 93 #define HOSTID_MASK 0x7f 94 #define HOSTID_VALID 0x80 95