2 * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Portions Copyright (c) 1999 Apple Computer, Inc. All Rights
7 * Reserved. This file contains Original Code and/or Modifications of
8 * Original Code as defined in and that are subject to the Apple Public
9 * Source License Version 1.1 (the "License"). You may not use this file
10 * except in compliance with the License. Please obtain a copy of the
11 * License at http://www.apple.com/publicsource and read it before using
14 * The Original Code and all software distributed under the License are
15 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
16 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
17 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
18 * FITNESS FOR A PARTICULAR PURPOSE OR NON- INFRINGEMENT. Please see the
19 * License for the specific language governing rights and limitations
22 * @APPLE_LICENSE_HEADER_END@
26 * What the booter leaves behind for the kernel.
29 #ifndef __BOOT_KERNBOOTSTRUCT_H
30 #define __BOOT_KERNBOOTSTRUCT_H
32 /* The config table has room for 13 drivers if their config files
33 * are the maximum size allowed.
35 #define CONFIG_SIZE (13 * 4096)
37 /* Maximum number of boot drivers supported, assuming their
38 * config files fit in the bootstruct.
43 char * address
; // address where driver was loaded
44 int size
; // entry point for driver
48 unsigned short major_vers
; // == 0 if not present
49 unsigned short minor_vers
;
50 unsigned long cs32_base
;
51 unsigned long cs16_base
;
52 unsigned long ds_base
;
53 unsigned long cs_length
;
54 unsigned long ds_length
;
55 unsigned long entry_offset
;
58 unsigned long mode_16
:1;
59 unsigned long mode_32
:1;
60 unsigned long idle_slows_cpu
:1;
61 unsigned long reserved
:29;
65 unsigned long connected
;
68 typedef struct _EISA_slot_info_t
{
71 unsigned char duplicateID
:4;
72 unsigned char slotType
:1;
73 unsigned char prodIDPresent
:1;
74 unsigned char dupIDPresent
:1;
78 unsigned char configMajor
;
79 unsigned char configMinor
;
80 unsigned short checksum
;
81 unsigned char numFunctions
;
84 unsigned char fnTypesPresent
:1;
85 unsigned char memoryPresent
:1;
86 unsigned char irqPresent
:1;
87 unsigned char dmaPresent
:1;
88 unsigned char portRangePresent
:1;
89 unsigned char portInitPresent
:1;
90 unsigned char freeFormPresent
:1;
91 unsigned char reserved
:1;
98 typedef struct _EISA_func_info_t
{
100 unsigned char function
;
101 unsigned char reserved
[2];
102 unsigned char data
[320];
105 #define NUM_EISA_SLOTS 64
107 typedef struct _PCI_bus_info_t
{
110 unsigned char configMethod1
:1;
111 unsigned char configMethod2
:1;
113 unsigned char specialCycle1
:1;
114 unsigned char specialCycle2
:1;
118 unsigned char maxBusNum
;
119 unsigned char majorVersion
;
120 unsigned char minorVersion
;
121 unsigned char BIOSPresent
;
125 * Video information..
128 unsigned long v_baseAddr
; /* Base address of video memory */
129 unsigned long v_display
; /* Display Code (if Applicable */
130 unsigned long v_rowBytes
; /* Number of bytes per pixel row */
131 unsigned long v_width
; /* Width */
132 unsigned long v_height
; /* Height */
133 unsigned long v_depth
; /* Pixel Depth */
136 typedef struct boot_video boot_video
;
138 #define BOOT_STRING_LEN 160
142 char bootString
[BOOT_STRING_LEN
]; // string we booted with
143 int magicCookie
; // KERNBOOTMAGIC if struct valid
144 int numIDEs
; // how many IDE drives
145 int rootdev
; // booters guess as to rootdev
146 int convmem
; // conventional memory
147 int extmem
; // extended memory
148 char boot_file
[128]; // name of the kernel we booted
149 int first_addr0
; // first address for kern convmem
150 int diskInfo
[4]; // bios info for bios dev 80-83
151 int graphicsMode
; // did we boot in graphics mode?
152 int kernDev
; // device kernel was fetched from
153 int numBootDrivers
; // number of drivers loaded by booter
154 char * configEnd
; // pointer to end of config files
155 int kaddr
; // kernel load address
156 int ksize
; // size of kernel
157 void * rld_entry
; // entry point for standalone rld
159 driver_config_t driverConfig
[NDRIVERS
];
160 APM_config_t apm_config
;
162 char _reserved
[7500];
166 PCI_bus_info_t pciInfo
;
168 int eisaConfigFunctions
;
169 EISA_slot_info_t eisaSlotInfo
[NUM_EISA_SLOTS
];
171 char config
[CONFIG_SIZE
]; // the config file contents
174 #define GRAPHICS_MODE 1
177 #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) 0x11000)
178 #define KERNBOOTMAGIC 0xa7a7a7a7
181 #ifndef EISA_CONFIG_ADDR
182 #define EISA_CONFIG_ADDR 0x20000
183 #define EISA_CONFIG_LEN 0x10000
188 extern KERNBOOTSTRUCT
* kernBootStruct
;
191 #endif /* !__BOOT_KERNBOOTSTRUCT_H */