xref: /freebsd/stand/common/rbx.h (revision 732a02b4e77866604a120a275c082bb6221bd2ff)
1 /*-
2  * Copyright (c) 1998 Robert Nordier
3  * All rights reserved.
4  *
5  * Redistribution and use in source and binary forms are freely
6  * permitted provided that the above copyright notice and this
7  * paragraph and the following disclaimer are duplicated in all
8  * such forms.
9  *
10  * This software is provided "AS IS" and without any express or
11  * implied warranties, including, without limitation, the implied
12  * warranties of merchantability and fitness for a particular
13  * purpose.
14  *
15  * $FreeBSD$
16  */
17 
18 #ifndef _RBX_H_
19 #define	_RBX_H_
20 
21 #define RBX_ASKNAME	0x0	/* -a */
22 #define RBX_SINGLE	0x1	/* -s */
23 /* 0x2 is reserved for log2(RB_NOSYNC). */
24 /* 0x3 is reserved for log2(RB_HALT). */
25 /* 0x4 is reserved for log2(RB_INITNAME). */
26 #define RBX_DFLTROOT	0x5	/* -r */
27 #define RBX_KDB 	0x6	/* -d */
28 /* 0x7 is reserved for log2(RB_RDONLY). */
29 /* 0x8 is reserved for log2(RB_DUMP). */
30 /* 0x9 is reserved for log2(RB_MINIROOT). */
31 #define RBX_CONFIG	0xa	/* -c */
32 #define RBX_VERBOSE	0xb	/* -v */
33 #define RBX_SERIAL	0xc	/* -h */
34 #define RBX_CDROM	0xd	/* -C */
35 /* 0xe is reserved for log2(RB_POWEROFF). */
36 #define RBX_GDB 	0xf	/* -g */
37 #define RBX_MUTE	0x10	/* -m */
38 /* 0x11 is reserved for log2(RB_SELFTEST). */
39 /* 0x12 is reserved for boot programs. */
40 /* 0x13 is reserved for boot programs. */
41 #define RBX_PAUSE	0x14	/* -p */
42 #define RBX_QUIET	0x15	/* -q */
43 #define RBX_NOINTR	0x1c	/* -n */
44 /* 0x1d is reserved for log2(RB_MULTIPLE) and is just misnamed here. */
45 #define RBX_DUAL	0x1d	/* -D */
46 /* 0x1f is reserved for log2(RB_BOOTINFO). */
47 
48 /* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D */
49 #define RBX_MASK	(OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \
50 			OPT_SET(RBX_DFLTROOT) | OPT_SET(RBX_KDB ) | \
51 			OPT_SET(RBX_CONFIG) | OPT_SET(RBX_VERBOSE) | \
52 			OPT_SET(RBX_SERIAL) | OPT_SET(RBX_CDROM) | \
53 			OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \
54 			OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL))
55 
56 #define OPT_SET(opt)	(1 << (opt))
57 #define OPT_CHECK(opt)	((opts) & OPT_SET(opt))
58 
59 extern uint32_t opts;
60 
61 #endif	/* !_RBX_H_ */
62