home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.2 (Developer) / NS_dev_3.2.iso / NextDeveloper / Headers / bsd / sys / reboot.h < prev    next >
Text File  |  1993-10-19  |  5KB  |  160 lines

  1. /* 
  2.  * Mach Operating System
  3.  * Copyright (c) 1989 Carnegie-Mellon University
  4.  * Copyright (c) 1988 Carnegie-Mellon University
  5.  * Copyright (c) 1987 Carnegie-Mellon University
  6.  * All rights reserved.  The CMU software License Agreement specifies
  7.  * the terms and conditions for use and redistribution.
  8.  */
  9. /*
  10.  * HISTORY
  11.  * $Log:    reboot.h,v $
  12.  * Revision 2.8  89/09/09  16:23:38  rvb
  13.  *     RB_KDB must ALWAYS be defined even if mach_kdb is off.
  14.  *     [89/09/07            rvb]
  15.  * 
  16.  * Revision 2.7  89/03/09  22:07:02  rpd
  17.  *     More cleanup.
  18.  * 
  19.  * Revision 2.6  89/02/25  17:55:48  gm0w
  20.  *     Changed to generic machine names and eliminated include
  21.  *     of cputypes.h. Made the MACH_KDB conditional always be
  22.  *     be used outside the kernel.
  23.  *     [89/02/14            mrt]
  24.  * 
  25.  * Revision 2.5  88/11/23  16:45:46  rpd
  26.  *     romp: Added RB_SUSPEND from Acis.
  27.  *     [88/11/04  18:05:05  rpd]
  28.  * 
  29.  * Revision 2.4  88/08/24  02:41:12  mwyoung
  30.  *     Adjusted include file references.
  31.  *     [88/08/17  02:21:13  mwyoung]
  32.  * 
  33.  * Revision 2.3  88/08/09  17:59:57  rvb
  34.  * Added RB_ALTBOOT and RB_UNIPROC.
  35.  * 
  36.  * 08-Jan-87  Robert Beck (beck) at Sequent Computer Systems, Inc.
  37.  *    Add Sequent specific stuff under #ifdef BALANCE.
  38.  *
  39.  * 21-Oct-86  Jonathan J. Chew (jjc) at Carnegie-Mellon University
  40.  *    Added RB_NOBOOTRC for SUN.
  41.  *
  42.  * 20-Oct-86  David L. Black (dlb) at Carnegie-Mellon University
  43.  *    Added include of cputypes.h to pick up MULTIMAX definition
  44.  *
  45.  * 14-Oct-86  Avadis Tevanian (avie) at Carnegie-Mellon University
  46.  *    Didn't special case RB_KDB for Multimax, this wasn't necessary
  47.  *    since the Multimax code uses the RB_DEBUG mnemonic.
  48.  *
  49.  * 07-Oct-86  David L. Black (dlb) at Carnegie-Mellon University
  50.  *    Added Multimax boot flag definitions.  Multimax uses a different
  51.  *    debugger flag than other systems.
  52.  *
  53.  * 25-Jan-86  Avadis Tevanian (avie) at Carnegie-Mellon University
  54.  *    Upgraded to 4.3.
  55.  *
  56.  * 22-Oct-85  Avadis Tevanian (avie) at Carnegie-Mellon University
  57.  *    CMUCS_KDB:  Added RB_KDB flag for kernel debugger.  This is currently
  58.  *    defined at 0x04 (RB_NOSYNC) to be backward compatible, but
  59.  *    should be changed in the future (when it is convenient to
  60.  *    update the boot programs).
  61.  *
  62.  */
  63.  
  64. /*
  65.  * Copyright (c) 1982, 1986 Regents of the University of California.
  66.  * All rights reserved.  The Berkeley software License Agreement
  67.  * specifies the terms and conditions for redistribution.
  68.  *
  69.  *    @(#)reboot.h    7.1 (Berkeley) 6/4/86
  70.  */
  71.  
  72. #ifndef    _SYS_REBOOT_H_
  73. #define _SYS_REBOOT_H_
  74.  
  75. #ifdef    KERNEL
  76. #import <mach_kdb.h>
  77. #endif    KERNEL
  78.  
  79. /*
  80.  * Arguments to reboot system call.
  81.  * These are passed to boot program in r11,
  82.  * and on to init.
  83.  */
  84.  
  85. #define RB_AUTOBOOT    0    /* flags for system auto-booting itself */
  86.  
  87. #define RB_ASKNAME    0x01    /* ask for file name to reboot from */
  88. #define RB_SINGLE    0x02    /* reboot to single user only */
  89. #define RB_NOSYNC    0x04    /* dont sync before reboot */
  90. #define RB_KDB        0x04    /* load kernel debugger */
  91. #define RB_HALT        0x08    /* don't reboot, just halt */
  92. #define RB_INITNAME    0x10    /* name given for /etc/init */
  93. #define RB_DFLTROOT    0x20    /* use compiled-in rootdev */
  94. #define RB_ALTBOOT    0x40    /* use /boot.old vs /boot */
  95. #define RB_UNIPROC    0x80    /* don't start slaves */
  96. #define RB_PANIC    0    /* reboot due to panic */
  97. #define RB_BOOT        1    /* reboot due to boot() */
  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.  */
  106. #define B_ADAPTORSHIFT    24
  107. #define B_ADAPTORMASK    0x0f
  108. #define B_UNITSHIFT    16
  109. #define B_UNITMASK    0xff
  110. #define B_PARTITIONSHIFT 8
  111. #define B_PARTITIONMASK    0xff
  112. #define B_TYPESHIFT    0
  113. #define B_TYPEMASK    0xff
  114. #define B_MAGICMASK    0xf0000000
  115. #define B_DEVMAGIC    0xa0000000
  116.  
  117. #ifdef    NeXT
  118. #import <bsd/machine/reboot.h>
  119. #endif    NeXT
  120.  
  121. #ifdef    ibmrt
  122. #define RB_SUSPEND    0x40    /* (6152) suspend unix */
  123. #endif    ibmrt
  124. #if    defined(sun3) || defined(sun4)
  125. #define RB_NOBOOTRC    0x20    /* don't run '/etc/rc.boot' */
  126. #endif    defined(sun3) || defined(sun4)
  127. #if    multimax
  128. /* Additional boot flags on multimax, plus bit defs for standard flags
  129.     Note that multimax uses a different bit for debugger. */
  130.  
  131. #define RB_B_ASKNAME    0    /* Ask for file name to reboot from */
  132. #define RB_B_SINGLE    1    /* Reboot to single user only */
  133. #define RB_B_NOSYNC    2    /* Don't sync before reboot */
  134. #define RB_B_HALT    3    /* Don't reboot, just halt */
  135. #define RB_B_INITNAME    4    /* Name given for /etc/init */
  136.  
  137. #define RB_B_PROFILED    28    /* OS Profiling */
  138. #define RB_PROFILED    (1 << RB_B_PROFILED)
  139. #define RB_B_MULTICPU    29    /* Multiprocessor boot */
  140. #define RB_MULTICPU    (1 << RB_B_MULTICPU)
  141. #define RB_B_INTERACT    30    /* Interactive boot */
  142. #define RB_INTERACT    (1 << RB_B_INTERACT)
  143. #define RB_B_DEBUG    31    /* Debug mode boot */
  144. #define RB_DEBUG    (1 << RB_B_DEBUG)
  145. #endif    multimax
  146.  
  147. #if    balance
  148. /*
  149.  * Sequent specific "reboot" flags.
  150.  */
  151. #define RB_NO_CTRL    0x20    /* for FIRMWARE, don't start controller */
  152. #define RB_NO_INIT    0x40    /* for FIRMWARE, don't init system */
  153. #define RB_AUXBOOT    0x80    /* Boot auxiliary boot name */
  154. #define RB_DUMP        RB_AUXBOOT
  155. #define RB_CONFIG    0x100    /* for FIRMWARE, only build cfg table */
  156. #endif    balance
  157.  
  158. #endif    _SYS_REBOOT_H_
  159.  
  160.