home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 15 / 15.iso / s / s053 / 8.ddi / usr / include / sys / bootinfo.h < prev    next >
Encoding:
C/C++ Source or Header  |  1990-12-08  |  2.5 KB  |  97 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_BOOTINFO_H
  11. #define _SYS_BOOTINFO_H
  12.  
  13. #ident    "@(#)/usr/include/sys/bootinfo.h.sl 1.1 4.0 12/08/90 38207 AT&T-USL"
  14.  
  15. /*
  16.  *    Definition of bootinfo structure.  This is used to pass
  17.  *    information between the bootstrap and the kernel.
  18.  */
  19.  
  20. #define BKI_MAGIC    0xff1234ff
  21.  
  22. #define B_MAXARGS    15        /* max. number of boot args */
  23. #define B_STRSIZ    100        /* max length of boot arg. string */
  24.  
  25. struct bootmem {
  26.     paddr_t        base;
  27.     long        extent;
  28.     ushort        flags;
  29.     };
  30.  
  31. struct bootinfo {
  32.     ulong    bootflags;        /* miscellaneous flags */
  33.  
  34.     struct hdparams {         /* hard disk parameters */
  35.         ushort    hdp_ncyl;    /* # cylinders (0 = no disk) */
  36.         unchar    hdp_nhead;    /* # heads */
  37.         unchar    hdp_nsect;    /* # sectors per track */
  38.         ushort    hdp_precomp;    /* write precomp cyl */
  39.         ushort    hdp_lz;        /* landing zone */
  40.     } hdparams[2];            /* hard disk parameters */
  41.  
  42.     int    memavailcnt;
  43.     struct    bootmem    memavail[B_MAXARGS];
  44.  
  45.     int    memusedcnt;
  46.     struct    bootmem    memused[B_MAXARGS];
  47.  
  48.     int    bargc;                /* count of boot arguments */
  49.     char    bargv[B_MAXARGS][B_STRSIZ]; /* argument strings */
  50.  
  51.     char    id[5];            /* Contents of F000:E000 */
  52. #ifdef MBUS
  53.     caddr_t    bpsloc;
  54. #endif
  55.     int    checksum;
  56. };
  57.  
  58. #if defined(MB1) || defined(MB2)
  59.     unsigned long ramfsloc;
  60.     unsigned long ramfssiz;
  61. #endif
  62.  
  63. /* flags for struct mem flags */
  64.  
  65. #define B_MEM_NODMA    0x01
  66. #define B_MEM_KTEXT    0x02
  67. #define    B_MEM_KDATA    0x04
  68. #define B_MEM_BOOTSTRAP    0x8000    /* Used internally by bootstrap */
  69.  
  70. #define BF_FLOPPY    0x01        /* booted from floppy */
  71. #define BF_MB2SA    0x20000000    /* Kernel booted from MSA */
  72. #define BF_TAPE        0x40000000    /* Kernel booted from tape */
  73. #define BF_DEBUG    0x80000000    /* Bootloader  debug flag set by user */
  74.  
  75. #ifdef MB1
  76. #define BOOTINFO_LOC    ((paddr_t)0x1700)
  77. #define KPTBL_LOC    ((paddr_t)0x2000)  /* 8K Reserved for kernel pg table */
  78. #endif
  79.  
  80. #if defined (MB2) 
  81. #define BOOTINFO_LOC    ((paddr_t)0xd000)
  82. #define KPTBL_LOC    ((paddr_t)0xe000)  /* 8K Reserved for kernel pg table */
  83. #endif
  84.  
  85. #if defined (MB1) || defined (MB2) 
  86. extern char * bpsinfo;               /* defined by vuifile */
  87. #endif
  88.  
  89. #if defined (AT386)
  90. #define BOOTINFO_LOC    ((paddr_t)0x600)
  91. #define KPTBL_LOC    ((paddr_t)0x1000)  /* Reserved for kernel page table */
  92. #endif
  93.  
  94. extern struct bootinfo bootinfo;
  95.  
  96. #endif    /* _SYS_BOOTINFO_H */
  97.