home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 9.ddi / usr / include / sys / sysi86.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  7.8 KB  |  198 lines

  1. /*    Copyright (c) 1990 UNIX System Laboratories, Inc.    */
  2. /*    Copyright (c) 1984, 1986, 1987, 1988, 1989, 1990 AT&T    */
  3. /*      All Rights Reserved      */
  4.  
  5. /*    THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF         */
  6. /*    UNIX System Laboratories, Inc.                         */
  7. /*    The copyright notice above does not evidence any       */
  8. /*    actual or intended publication of such source code.    */
  9.  
  10. #ifndef _SYS_SYSI86_H
  11. #define _SYS_SYSI86_H
  12.  
  13. #ident    "@(#)/usr/include/sys/sysi86.h.sl 1.1 4.0 12/08/90 27740 AT&T-USL"
  14.  
  15. #ifndef DIRSIZ
  16. #define    DIRSIZ    14
  17. #endif
  18.  
  19. /*
  20.  * Commands for sysi86 system call (1-?)
  21.  */
  22.  
  23. #define SI86SWPI        1       /* General swap interface.                */
  24. #define SI86SYM         2       /* acquire boot-built symbol table        */
  25. #define SI86CONF        4       /* acquire boot-built configuration table */
  26. #define SI86BOOT        5       /* acquire timestamp and name of program  */
  27.                 /* booted                                 */
  28. #define SI86AUTO        9       /* was an auto-config boot done?          */
  29. #define SI86EDT         10      /* copy contents of EDT to user           */
  30. #define SI86SWAP        12      /* Declare swap space                     */
  31. #define SI86FPHW        40      /* what (if any?) floating-point hardware */
  32.  
  33. #define GRNON        52    /* set green light to solid on state */
  34. #define GRNFLASH    53    /* start green light flashing */
  35. #define STIME         54    /* set internal time */
  36. #define SETNAME        56    /* rename the system */
  37. #define RNVR         58    /* read NVRAM */
  38. #define WNVR         59    /* write NVRAM */
  39. #define RTODC        60    /* read time of day clock */
  40. #define CHKSER        61    /* check soft serial number */
  41. #define SI86NVPRT       62      /* print an xtra_nvr structure */
  42. #define SANUPD        63    /* sanity update of kernel buffers */
  43. #define SI86KSTR        64      /* make a copy of a kernel string */
  44. #define SI86MEM         65      /* return the memory size of system */
  45. #define SI86TODEMON     66      /* Transfer control to firmware.        */
  46. #define SI86CCDEMON     67      /* Control character access to demon.   */
  47. #define SI86CACHE       68      /* Turn cache on and off.               */
  48. #define SI86DELMEM      69      /* Delete available memory for testing. */
  49. #define SI86ADDMEM      70      /* Add back deleted memory.             */
  50. /* 71 through 74 reserved for VPIX */
  51. #define SI86V86         71      /* V86 system calls (see v86.h)         */
  52. #define    SI86SLTIME    72    /* Set local time correction        */
  53. #define SI86DSCR        75      /* Set a segment or gate descriptor     */
  54. #define RDUBLK        76    /* Read U Block */
  55. /* NFA entry point */
  56. #define SI86NFA        77    /* make nfa_sys system call        */
  57. #define SI86VM86    81
  58. #define SI86VMENABLE    82
  59. #define SI86LIMUSER    91    /* liscense interface */
  60. #define SI86RDID    92    /* ROM BIOS Machid ID */
  61. #define SI86RDBOOT    93    /* Bootable Non-SCSI Hard Disk */
  62. /* XENIX Support */
  63. #define SI86SHFIL    100    /* map a file into addr space of a proc */
  64. #define SI86PCHRGN    101    /* make globally visible change to a region */
  65. #define SI86BADVISE    102    /* badvise subcommand - see below for   */
  66.                 /*    badvise subfunction definitions */
  67. #define SI86SHRGN    103    /* enable/disable XENIX small model shared */
  68.                 /*    data context switching           */ 
  69. #define    SI86CHIDT    104    /* set user level int 0xf0, ... 0xff handlers */
  70. #define    SI86EMULRDA    105    /* remove special emulator read access    */
  71.  
  72. /*
  73.  *    NOTE: Numbers 106 - 110 have been registered and are reserved
  74.  *    for future use for AT&T hardware.
  75.  */
  76.  
  77. /*
  78.  *  The SI86DSCR subcommand of the sysi86() system call
  79.  *  sets a segment or gate descriptor in the kernel.
  80.  *  The following descriptor types are accepted:
  81.  *    - executable and data segments in the LDT at DPL 3
  82.  *    - a call gate in the GDT at DPL 3 that points to a segment in the LDT
  83.  *  The request structure declared below is used to pass the values
  84.  *  to be placed in the descriptor.  A pointer to the structure is
  85.  *  passed as the second argument of the system call.
  86.  *  If acc1 is zero, the descriptor is cleared.
  87. */
  88.  
  89. /* request structure passed by user */
  90. struct ssd {
  91.     unsigned int sel;   /* descriptor selector */
  92.     unsigned int bo;    /* segment base or gate offset */
  93.     unsigned int ls;    /* segment limit or gate selector */
  94.     unsigned int acc1;  /* access byte 5 */
  95.     unsigned int acc2;  /* access bits in byte 6 or gate count */
  96. };
  97.  
  98. /*
  99.  *  The SI86SHFIL subcommand of the sysi86() system call
  100.  *  maps a file into a region in user address space.
  101.  *  The request structure declared below is used to pass the
  102.  *  system call parameters.  A pointer to the structure is
  103.  *  passed as the second argument of the system call.
  104.  */
  105. struct mmf {
  106.     char *    mf_filename;    /* path name of file */
  107.     long    mf_filesz;    /* Size in bytes of section of file    */
  108.                 /* from which this region is mapped.    */
  109.     long    mf_regsz;    /* Size of region in bytes */
  110.     short    mf_flags;    /* Either 0 or RG_NOSHARE */
  111. };
  112.  
  113. /*
  114.  *  The SI86PCHRGN subcommand of the sysi86() system call
  115.  *  change the memory mapped image of a file.
  116.  *  The request structure declared below is used to pass the values
  117.  *  system call parameters.  A pointer to the structure is
  118.  *  passed as the second argument of the system call.
  119. */
  120. struct cmf {
  121.     char *    cf_srcva;    /* modified image address */
  122.     char *    cf_dstva;    /* location to patch */
  123.     long    cf_count;    /* size of patch */
  124. };
  125.  
  126. /*
  127.  * The SI86BADVISE subcommand of the sysi86() system call specifies
  128.  * XENIX variant behavior for certain system calls and kernel routines.
  129.  * The 'arg' argument of sysi86() for SI86BADVISE is an integer.  Bits
  130.  * 8..15 specify SI86B_SET or SI86B_GET.  Bits 0..7 contain
  131.  * SI86B_PRE_SV, SI86B_XOUT, or SI86B_XSDSWTCH.  All these constants are 
  132.  * defined below.  The 'arg' argument thus consists of either SI86B_SET 
  133.  * OR'ed with zero or more of SI86B_PRE_SV, SI86B_XOUT, and SI86B_XSDSWTCH,
  134.  * or of SI86B_GET. 
  135.  */
  136.  
  137. #define SI86B_SET        0x0100    /* set badvise bits      */
  138. #define SI86B_GET        0x0200    /* retrieve badvise bits */    
  139.  
  140. #define SI86B_PRE_SV        0x0008    /* follow pre-System V x.out behavior */
  141. #define SI86B_XOUT        0x0010     /* follow XENIX x.out behavior */
  142. #define SI86B_XSDSWTCH        0x0080    /* XENIX small model shared data    */
  143.                     /*    context switching enabled   */
  144. /*
  145.  *   The request structure declared below is used by the XENIX 286 emulator
  146.  *   (/bin/x286emul) in conjunction with the SI86SHRGN subcommand of sysi86().
  147.  *   The SI86SHRGN subcommand is used by the XENIX 286 emulator to support
  148.  *   XENIX shared data.  The second argument passed to sysi86() is a 
  149.  *   pointer to an xsdbuf struct.
  150.  *
  151.  *   If the 'xsd_cmd' field of xsdbuf is SI86SHR_CP, the XENIX 286 emulator is 
  152.  *   using the SI86SHRGN subcommand to set up XENIX small model shared data 
  153.  *   context switching support for a given XENIX shared data segment.  In this 
  154.  *   case, the xsdbuf struct contains the start addr for the shared data in 
  155.  *   386 space, followed by the start addr for the shared data in the 286 
  156.  *   executable's private data.  
  157.  *
  158.  *   If the 'xsd_cmd' field is SI86SHR_SZ, the XENIX 286 emulator is using the 
  159.  *   SI86SHRGN subcommand to retrieve the size of an existing XENIX shared 
  160.  *   data segment.  In this case, the xsdbuf struct contains the start addr
  161.  *   for the shared data in 386 space.
  162.  *   The size of the shared data segment starting at 'xsd_386vaddr' will
  163.  *   be returned in the 'xsd_size' field by sysi86().
  164.  */
  165.  
  166. #define SI86SHR_CP    0x1    /* SI86SHRGN used for XENIX sd context switch */
  167. #define SI86SHR_SZ    0x2    /* SI86SHRGN used to get XENIX sd seg size */
  168.  
  169. struct xsdbuf {
  170.     unsigned xsd_cmd;    /* SI86SHRGN subcommand, either SI86SHR_CP 
  171.                  *     or SI86SHR_SZ.
  172.                  */     
  173.     char    *xsd_386vaddr;    /* Addr of "real" XENIX shared data seg in 
  174.                  *     the emulator.
  175.                  */
  176.     union {
  177.        char    *xsd_286vaddr;    /* Addr of XENIX shared data seg in the
  178.                  *     286 data portion of the emulator.
  179.                  */
  180.        unsigned long xsd_size;/* Size of XENIX shared data seg */
  181.     } xsd_un;
  182. };
  183. /* End XENIX Support */
  184.  
  185. /*
  186.  * Cascade defines
  187. */
  188.  
  189. #define C2    'E'
  190. #define C3    'F'
  191. #define C4    'G'
  192. #define C6    'K'
  193.  
  194. /* Enterprise IDNO defines */
  195. #define E8R1    'R'
  196.  
  197. #endif    /* _SYS_SYSI86_H */
  198.