Annotation of OSKit-Mach/include/sys/reboot.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Mach Operating System
                      3:  * Copyright (c) 1993,1991,1990 Carnegie Mellon University
                      4:  * All Rights Reserved.
                      5:  *
                      6:  * Permission to use, copy, modify and distribute this software and its
                      7:  * documentation is hereby granted, provided that both the copyright
                      8:  * notice and this permission notice appear in all copies of the
                      9:  * software, derivative works or modified versions, and any portions
                     10:  * thereof, and that both notices appear in supporting documentation.
                     11:  *
                     12:  * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
                     13:  * CONDITION.  CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
                     14:  * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
                     15:  *
                     16:  * Carnegie Mellon requests users of this software to return to
                     17:  *
                     18:  *  Software Distribution Coordinator  or  [email protected]
                     19:  *  School of Computer Science
                     20:  *  Carnegie Mellon University
                     21:  *  Pittsburgh PA 15213-3890
                     22:  *
                     23:  * any improvements or extensions that they make and grant Carnegie Mellon
                     24:  * the rights to redistribute these changes.
                     25:  */
                     26: /*
                     27:  * Copyright (c) 1982, 1986, 1988 Regents of the University of California.
                     28:  * All rights reserved.
                     29:  *
                     30:  * Redistribution and use in source and binary forms, with or without
                     31:  * modification, are permitted provided that the following conditions
                     32:  * are met:
                     33:  * 1. Redistributions of source code must retain the above copyright
                     34:  *    notice, this list of conditions and the following disclaimer.
                     35:  * 2. Redistributions in binary form must reproduce the above copyright
                     36:  *    notice, this list of conditions and the following disclaimer in the
                     37:  *    documentation and/or other materials provided with the distribution.
                     38:  * 4. The name of the Laboratory may not be used to endorse or promote
                     39:  *    products derived from this software without specific prior written
                     40:  *    permission.
                     41:  *
                     42:  * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
                     43:  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
                     44:  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
                     45:  * ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
                     46:  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
                     47:  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
                     48:  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
                     49:  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
                     50:  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
                     51:  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
                     52:  * SUCH DAMAGE.
                     53:  *
                     54:  *     @(#)reboot.h    7.5 (Berkeley) 6/27/88
                     55:  */
                     56: /*
                     57:  * Warning: The contents of this file are deprecated;
                     58:  * it should only ever be used for BSD and Mach 3 compatibility.
                     59:  * As the above copyright notice suggests, this file originated in BSD;
                     60:  * it is mostly the same, except the flags after RB_DFLTROOT
                     61:  * have diverged from BSD.
                     62:  */
                     63: #ifndef        _MACH_SYS_REBOOT_H_
                     64: #define        _MACH_SYS_REBOOT_H_
                     65: 
                     66: /*
                     67:  * Arguments to reboot system call.
                     68:  * These are converted to switches, and passed to startup program,
                     69:  * and on to init.
                     70:  */
                     71: #define        RB_AUTOBOOT     0       /* flags for system auto-booting itself */
                     72: 
                     73: #define        RB_ASKNAME      0x01    /* -a: ask for file name to reboot from */
                     74: #define        RB_SINGLE       0x02    /* -s: reboot to single user only */
                     75: #define        RB_KDB          0x04    /* -d: kernel debugger symbols loaded */
                     76: #define        RB_HALT         0x08    /* -h: enter KDB at bootup */
                     77:                                /*     for host_reboot(): don't reboot,
                     78:                                       just halt */
                     79: #define        RB_INITNAME     0x10    /* -i: name given for /etc/init (unused) */
                     80: #define        RB_DFLTROOT     0x20    /*     use compiled-in rootdev */
                     81: #define        RB_NOBOOTRC     0x20    /* -b: don't run /etc/rc.boot */
                     82: #define RB_ALTBOOT     0x40    /*     use /boot.old vs /boot */
                     83: #define        RB_UNIPROC      0x80    /* -u: start only one processor */
                     84: 
                     85: #define        RB_SHIFT        8       /* second byte is for ux */
                     86: 
                     87: #define        RB_DEBUGGER     0x1000  /*     for host_reboot(): enter kernel
                     88:                                       debugger from user level */
                     89: 
                     90: /* Corresponding BSD definitions, where they disagree with the Mach flags.  */
                     91: #define BSD_RB_NOSYNC   0x04    /* dont sync before reboot */
                     92: #define BSD_RB_KDB      0x40    /* give control to kernel debugger */
                     93: #define BSD_RB_RDONLY   0x80    /* mount root fs read-only */
                     94: #define BSD_RB_DUMP     0x100   /* dump kernel memory before reboot */
                     95: #define BSD_RB_MINIROOT 0x200   /* mini-root present in memory at boot time */
                     96: #define BSD_RB_CONFIG   0x400   /* invoke user configuration routing */
                     97: 
                     98: 
                     99: /*
                    100:  * Constants for converting boot-style device number to type,
                    101:  * adaptor (uba, mba, etc), unit number and partition number.
                    102:  * Type (== major device number) is in the low byte
                    103:  * for backward compatibility.  Except for that of the "magic
                    104:  * number", each mask applies to the shifted value.
                    105:  * Format:
                    106:  *      (4) (4) (4) (4)  (8)     (8)
                    107:  *     --------------------------------
                    108:  *     |MA | AD| CT| UN| PART  | TYPE |
                    109:  *     --------------------------------
                    110:  */
                    111: #define        B_ADAPTORSHIFT          24
                    112: #define        B_ADAPTORMASK           0x0f
                    113: #define        B_ADAPTOR(val)          (((val) >> B_ADAPTORSHIFT) & B_ADAPTORMASK)
                    114: #define B_CONTROLLERSHIFT      20
                    115: #define B_CONTROLLERMASK       0xf
                    116: #define        B_CONTROLLER(val)       (((val)>>B_CONTROLLERSHIFT) & B_CONTROLLERMASK)
                    117: #define B_UNITSHIFT            16
                    118: #define B_UNITMASK             0xf
                    119: #define        B_UNIT(val)             (((val) >> B_UNITSHIFT) & B_UNITMASK)
                    120: #define B_PARTITIONSHIFT       8
                    121: #define B_PARTITIONMASK                0xff
                    122: #define        B_PARTITION(val)        (((val) >> B_PARTITIONSHIFT) & B_PARTITIONMASK)
                    123: #define        B_TYPESHIFT             0
                    124: #define        B_TYPEMASK              0xff
                    125: #define        B_TYPE(val)             (((val) >> B_TYPESHIFT) & B_TYPEMASK)
                    126: 
                    127: #define        B_MAGICMASK     ((u_int)0xf0000000U)
                    128: #define        B_DEVMAGIC      ((u_int)0xa0000000U)
                    129: 
                    130: #define MAKEBOOTDEV(type, adaptor, controller, unit, partition) \
                    131:        (((type) << B_TYPESHIFT) | ((adaptor) << B_ADAPTORSHIFT) | \
                    132:        ((controller) << B_CONTROLLERSHIFT) | ((unit) << B_UNITSHIFT) | \
                    133:        ((partition) << B_PARTITIONSHIFT) | B_DEVMAGIC)
                    134: 
                    135: #endif /* _MACH_SYS_REBOOT_H_ */

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.