2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
8 * This file contains Original Code and/or Modifications of Original Code
9 * as defined in and that are subject to the Apple Public Source License
10 * Version 2.0 (the 'License'). You may not use this file except in
11 * compliance with the License. Please obtain a copy of the License at
12 * http://www.opensource.apple.com/apsl/ and read it before using this
15 * The Original Code and all software distributed under the License are
16 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
17 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
18 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
19 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
20 * Please see the License for the specific language governing rights and
21 * limitations under the License.
23 * @APPLE_LICENSE_HEADER_END@
27 * What the booter leaves behind for the kernel.
31 * Maximum number of boot drivers that can be loaded.
36 * Types of boot driver that may be loaded by the booter.
39 kBootDriverTypeInvalid
= 0,
40 kBootDriverTypeKEXT
= 1,
41 kBootDriverTypeMKEXT
= 2
45 unsigned long address
; // address where driver was loaded
46 unsigned long size
; // number of bytes
47 unsigned long type
; // driver type
51 * APM BIOS information.
54 unsigned short major_vers
; // == 0 if not present
55 unsigned short minor_vers
;
56 unsigned long cs32_base
;
57 unsigned long cs16_base
;
58 unsigned long ds_base
;
59 unsigned long cs_length
;
60 unsigned long ds_length
;
61 unsigned long entry_offset
;
64 unsigned long mode_16
:1;
65 unsigned long mode_32
:1;
66 unsigned long idle_slows_cpu
:1;
67 unsigned long reserved
:29;
71 unsigned long connected
;
75 * PCI bus information.
77 typedef struct _PCI_bus_info_t
{
80 unsigned char configMethod1
:1;
81 unsigned char configMethod2
:1;
83 unsigned char specialCycle1
:1;
84 unsigned char specialCycle2
:1;
88 unsigned char maxBusNum
;
89 unsigned char majorVersion
;
90 unsigned char minorVersion
;
91 unsigned char BIOSPresent
;
98 unsigned long v_baseAddr
; // Base address of video memory
99 unsigned long v_display
; // Display Code (if Applicable
100 unsigned long v_rowBytes
; // Number of bytes per pixel row
101 unsigned long v_width
; // Width
102 unsigned long v_height
; // Height
103 unsigned long v_depth
; // Pixel Depth
106 typedef struct boot_video boot_video
;
108 #define GRAPHICS_MODE 1
111 #define BOOT_STRING_LEN 160
112 #define CONFIG_SIZE (12 * 4096)
116 char bootString
[BOOT_STRING_LEN
]; // boot arguments
117 int magicCookie
; // KERNBOOTMAGIC
118 int numIDEs
; // number of IDE drives
119 int rootdev
; // root device
120 int convmem
; // conventional memory
121 int extmem
; // extended memory
122 char bootFile
[128]; // kernel file name
123 int firstAddr0
; // first address for kern convmem
124 int diskInfo
[4]; // info for bios dev 80-83
125 int graphicsMode
; // booted in graphics mode?
126 int kernDev
; // device kernel was fetched from
127 int numBootDrivers
; // number of drivers loaded
128 char * configEnd
; // pointer to end of config files
129 int kaddr
; // kernel load address
130 int ksize
; // size of kernel
131 driver_config_t driverConfig
[NDRIVERS
];
132 char _reserved
[2052];
134 PCI_bus_info_t pciInfo
;
135 APM_config_t apmConfig
;
136 char config
[CONFIG_SIZE
];
139 #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) 0x11000)
140 #define KERNBOOTMAGIC 0xa7a7a7a7
143 extern KERNBOOTSTRUCT
* kernBootStruct
;