xref: /illumos-gate/usr/src/boot/common/rbx.h (revision ddb365bfc9e868ad24ccdcb0dc91af18b10df082)
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 
16 #ifndef _RBX_H_
17 #define	_RBX_H_
18 
19 #define RBX_ASKNAME	0x0	/* -a */
20 #define RBX_SINGLE	0x1	/* -s */
21 /* 0x2 is reserved for log2(RB_NOSYNC). */
22 /* 0x3 is reserved for log2(RB_HALT). */
23 /* 0x4 is reserved for log2(RB_INITNAME). */
24 #define RBX_DFLTROOT	0x5	/* -r */
25 #define RBX_KDB 	0x6	/* -d */
26 /* 0x7 is reserved for log2(RB_RDONLY). */
27 /* 0x8 is reserved for log2(RB_DUMP). */
28 /* 0x9 is reserved for log2(RB_MINIROOT). */
29 #define RBX_CONFIG	0xa	/* -c */
30 #define RBX_VERBOSE	0xb	/* -v */
31 #define RBX_SERIAL	0xc	/* -h */
32 #define RBX_CDROM	0xd	/* -C */
33 /* 0xe is reserved for log2(RB_POWEROFF). */
34 #define RBX_GDB 	0xf	/* -g */
35 #define RBX_MUTE	0x10	/* -m */
36 /* 0x11 is reserved for log2(RB_SELFTEST). */
37 /* 0x12 is reserved for boot programs. */
38 #define	RBX_TEXT_MODE	0x13	/* -t */
39 #define RBX_PAUSE	0x14	/* -p */
40 #define RBX_QUIET	0x15	/* -q */
41 #define RBX_NOINTR	0x1c	/* -n */
42 /* 0x1d is reserved for log2(RB_MULTIPLE) and is just misnamed here. */
43 #define RBX_DUAL	0x1d	/* -D */
44 /* 0x1f is reserved for log2(RB_BOOTINFO). */
45 
46 /* pass: -a, -s, -r, -d, -c, -v, -h, -C, -g, -m, -p, -D, -t */
47 #define RBX_MASK	(OPT_SET(RBX_ASKNAME) | OPT_SET(RBX_SINGLE) | \
48 			OPT_SET(RBX_DFLTROOT) | OPT_SET(RBX_KDB ) | \
49 			OPT_SET(RBX_CONFIG) | OPT_SET(RBX_VERBOSE) | \
50 			OPT_SET(RBX_SERIAL) | OPT_SET(RBX_CDROM) | \
51 			OPT_SET(RBX_GDB ) | OPT_SET(RBX_MUTE) | \
52 			OPT_SET(RBX_PAUSE) | OPT_SET(RBX_DUAL) | \
53 			OPT_SET(RBX_TEXT_MODE))
54 
55 #define OPT_SET(opt)	(1 << (opt))
56 #define OPT_CHECK(opt)	((opts) & OPT_SET(opt))
57 
58 extern uint32_t opts;
59 
60 #endif	/* !_RBX_H_ */
61