2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
24 * What the booter leaves behind for the kernel.
27 /* The config table has room for 13 drivers if their config files
28 * are the maximum size allowed.
30 #define CONFIG_SIZE (13 * 4096)
32 /* Maximum number of boot drivers supported, assuming their
33 * config files fit in the bootstruct.
38 char *address
; // address where driver was loaded
39 int size
; // entry point for driver
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
;
53 unsigned long mode_16
:1;
54 unsigned long mode_32
:1;
55 unsigned long idle_slows_cpu
:1;
56 unsigned long reserved
:29;
60 unsigned long connected
;
63 typedef struct _EISA_slot_info_t
{
66 unsigned char duplicateID
:4;
67 unsigned char slotType
:1;
68 unsigned char prodIDPresent
:1;
69 unsigned char dupIDPresent
:1;
73 unsigned char configMajor
;
74 unsigned char configMinor
;
75 unsigned short checksum
;
76 unsigned char numFunctions
;
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;
93 typedef struct _EISA_func_info_t
{
95 unsigned char function
;
96 unsigned char reserved
[2];
97 unsigned char data
[320];
100 #define NUM_EISA_SLOTS 64
102 typedef struct _PCI_bus_info_t
{
105 unsigned char configMethod1
:1;
106 unsigned char configMethod2
:1;
108 unsigned char specialCycle1
:1;
109 unsigned char specialCycle2
:1;
113 unsigned char maxBusNum
;
114 unsigned char majorVersion
;
115 unsigned char minorVersion
;
116 unsigned char BIOSPresent
;
120 * Video information..
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 */
132 typedef struct boot_video boot_video
;
134 #define BOOT_STRING_LEN 160
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
155 driver_config_t driverConfig
[NDRIVERS
];
156 APM_config_t apm_config
;
158 char _reserved
[7500];
162 PCI_bus_info_t pciInfo
;
164 int eisaConfigFunctions
;
165 EISA_slot_info_t eisaSlotInfo
[NUM_EISA_SLOTS
];// EISA slot information
167 char config
[CONFIG_SIZE
]; // the config file contents
170 #define GRAPHICS_MODE 1
173 #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *)0x11000)
174 #define KERNBOOTMAGIC 0xa7a7a7a7
176 #ifndef EISA_CONFIG_ADDR
177 #define EISA_CONFIG_ADDR 0x20000
178 #define EISA_CONFIG_LEN 0x10000
182 extern KERNBOOTSTRUCT
*kernBootStruct
;