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