Annotation of XNU/osfmk/i386/AT386/kernBootStruct.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
        !             3:  *
        !             4:  * @APPLE_LICENSE_HEADER_START@
        !             5:  * 
        !             6:  * The contents of this file constitute Original Code as defined in and
        !             7:  * are subject to the Apple Public Source License Version 1.1 (the
        !             8:  * "License").  You may not use this file except in compliance with the
        !             9:  * License.  Please obtain a copy of the License at
        !            10:  * http://www.apple.com/publicsource and read it before using this file.
        !            11:  * 
        !            12:  * This Original Code and all software distributed under the License are
        !            13:  * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
        !            14:  * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
        !            15:  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
        !            16:  * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT.  Please see the
        !            17:  * License for the specific language governing rights and limitations
        !            18:  * under the License.
        !            19:  * 
        !            20:  * @APPLE_LICENSE_HEADER_END@
        !            21:  */
        !            22: /*
        !            23:  * kernBootStruct.h
        !            24:  * What the booter leaves behind for the kernel.
        !            25:  */
        !            26: 
        !            27: /* The config table has room for 13 drivers if their config files
        !            28:  * are the maximum size allowed.
        !            29:  */
        !            30: #define CONFIG_SIZE (13 * 4096)
        !            31: 
        !            32: /* Maximum number of boot drivers supported, assuming their
        !            33:  * config files fit in the bootstruct.
        !            34:  */
        !            35: #define NDRIVERS               64
        !            36: 
        !            37: typedef struct {
        !            38:     char    *address;                  // address where driver was loaded
        !            39:     int            size;                       // entry point for driver
        !            40: } driver_config_t;
        !            41: 
        !            42: typedef struct {
        !            43:     unsigned short     major_vers;     // == 0 if not present
        !            44:     unsigned short     minor_vers;
        !            45:     unsigned long      cs32_base;
        !            46:     unsigned long      cs16_base;
        !            47:     unsigned long      ds_base;
        !            48:     unsigned long      cs_length;
        !            49:     unsigned long      ds_length;
        !            50:     unsigned long      entry_offset;
        !            51:     union {
        !            52:        struct {
        !            53:            unsigned long       mode_16         :1;
        !            54:            unsigned long       mode_32         :1;
        !            55:            unsigned long       idle_slows_cpu  :1;
        !            56:            unsigned long       reserved        :29;
        !            57:        } f;
        !            58:        unsigned long data;
        !            59:     } flags;
        !            60:     unsigned long      connected;
        !            61: } APM_config_t;
        !            62: 
        !            63: typedef struct _EISA_slot_info_t {
        !            64:     union {
        !            65:        struct {
        !            66:            unsigned char       duplicateID     :4;
        !            67:            unsigned char       slotType        :1;
        !            68:            unsigned char       prodIDPresent   :1;
        !            69:            unsigned char       dupIDPresent    :1;
        !            70:        } s;
        !            71:        unsigned char d;
        !            72:     } u_ID;
        !            73:     unsigned char      configMajor;
        !            74:     unsigned char      configMinor;
        !            75:     unsigned short     checksum;
        !            76:     unsigned char      numFunctions;
        !            77:     union {
        !            78:        struct {
        !            79:            unsigned char       fnTypesPresent  :1;
        !            80:            unsigned char       memoryPresent   :1;
        !            81:            unsigned char       irqPresent      :1;
        !            82:            unsigned char       dmaPresent      :1;
        !            83:            unsigned char       portRangePresent:1;
        !            84:            unsigned char       portInitPresent :1;
        !            85:            unsigned char       freeFormPresent :1;
        !            86:            unsigned char       reserved:1;
        !            87:        } s;
        !            88:        unsigned char d;
        !            89:     } u_resources;
        !            90:     unsigned char      id[8];
        !            91: } EISA_slot_info_t;
        !            92: 
        !            93: typedef struct _EISA_func_info_t {
        !            94:     unsigned char      slot;
        !            95:     unsigned char      function;
        !            96:     unsigned char      reserved[2];
        !            97:     unsigned char      data[320];
        !            98: } EISA_func_info_t;
        !            99: 
        !           100: #define NUM_EISA_SLOTS 64
        !           101: 
        !           102: typedef struct _PCI_bus_info_t {
        !           103:     union {
        !           104:        struct {
        !           105:            unsigned char configMethod1 :1;
        !           106:            unsigned char configMethod2 :1;
        !           107:            unsigned char               :2;
        !           108:            unsigned char specialCycle1 :1;
        !           109:            unsigned char specialCycle2 :1;
        !           110:        } s;
        !           111:        unsigned char d;
        !           112:     } u_bus;
        !           113:     unsigned char maxBusNum;
        !           114:     unsigned char majorVersion;
        !           115:     unsigned char minorVersion;
        !           116:     unsigned char BIOSPresent;
        !           117: } PCI_bus_info_t;
        !           118: 
        !           119: /*
        !           120:  * Video information..
        !           121:  */
        !           122: 
        !           123: struct boot_video {
        !           124:         unsigned long   v_baseAddr;     /* Base address of video memory */
        !           125:         unsigned long   v_display;      /* Display Code (if Applicable */
        !           126:         unsigned long   v_rowBytes;     /* Number of bytes per pixel row */
        !           127:         unsigned long   v_width;        /* Width */
        !           128:         unsigned long   v_height;       /* Height */
        !           129:         unsigned long   v_depth;        /* Pixel Depth */
        !           130: };
        !           131: 
        !           132: typedef struct boot_video       boot_video;
        !           133: 
        !           134: #define BOOT_STRING_LEN                160
        !           135: 
        !           136: typedef struct {
        !           137:     short   version;
        !           138:     char    bootString[BOOT_STRING_LEN];// string we booted with
        !           139:     int            magicCookie;                // KERNBOOTMAGIC if struct valid
        !           140:     int            numIDEs;                    // how many IDE drives
        !           141:     int            rootdev;                    // booters guess as to rootdev
        !           142:     int            convmem;                    // conventional memory
        !           143:     int            extmem;                     // extended memory
        !           144:     char    boot_file[128];            // name of the kernel we booted
        !           145:     int            first_addr0;                // first address for kern convmem
        !           146:     int            diskInfo[4];                // bios info for bios dev 80-83
        !           147:     int            graphicsMode;               // did we boot in graphics mode?
        !           148:     int            kernDev;                    // device kernel was fetched from
        !           149:     int     numBootDrivers;            // number of drivers loaded by booter    
        !           150:     char    *configEnd;                        // pointer to end of config files
        !           151:     int            kaddr;                      // kernel load address
        !           152:     int     ksize;                     // size of kernel
        !           153:     void    *rld_entry;                        // entry point for standalone rld
        !           154: 
        !           155:     driver_config_t driverConfig[NDRIVERS];
        !           156:     APM_config_t apm_config;
        !           157:     
        !           158:     char   _reserved[7500];
        !           159: 
        !           160:     boot_video video;
        !           161: 
        !           162:     PCI_bus_info_t pciInfo;
        !           163:     
        !           164:     int            eisaConfigFunctions;
        !           165:     EISA_slot_info_t eisaSlotInfo[NUM_EISA_SLOTS];// EISA slot information
        !           166: 
        !           167:     char   config[CONFIG_SIZE];                // the config file contents
        !           168: } KERNBOOTSTRUCT;
        !           169: 
        !           170: #define GRAPHICS_MODE  1
        !           171: #define TEXT_MODE 0
        !           172: 
        !           173: #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *)0x11000)
        !           174: #define KERNBOOTMAGIC 0xa7a7a7a7
        !           175: 
        !           176: #ifndef EISA_CONFIG_ADDR
        !           177: #define EISA_CONFIG_ADDR       0x20000
        !           178: #define EISA_CONFIG_LEN                0x10000
        !           179: #endif
        !           180: 
        !           181: #ifndef KERNEL
        !           182: extern KERNBOOTSTRUCT *kernBootStruct;
        !           183: #endif

unix.superglobalmegacorp.com

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