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.
28 * Maximum number of boot drivers that can be loaded.
33 * Types of boot driver that may be loaded by the booter.
36 kBootDriverTypeInvalid
= 0,
37 kBootDriverTypeKEXT
= 1,
38 kBootDriverTypeMKEXT
= 2
42 unsigned long address
; // address where driver was loaded
43 unsigned long size
; // number of bytes
44 unsigned long type
; // driver type
48 * APM BIOS information.
51 unsigned short major_vers
; // == 0 if not present
52 unsigned short minor_vers
;
53 unsigned long cs32_base
;
54 unsigned long cs16_base
;
55 unsigned long ds_base
;
56 unsigned long cs_length
;
57 unsigned long ds_length
;
58 unsigned long entry_offset
;
61 unsigned long mode_16
:1;
62 unsigned long mode_32
:1;
63 unsigned long idle_slows_cpu
:1;
64 unsigned long reserved
:29;
68 unsigned long connected
;
72 * PCI bus information.
74 typedef struct _PCI_bus_info_t
{
77 unsigned char configMethod1
:1;
78 unsigned char configMethod2
:1;
80 unsigned char specialCycle1
:1;
81 unsigned char specialCycle2
:1;
85 unsigned char maxBusNum
;
86 unsigned char majorVersion
;
87 unsigned char minorVersion
;
88 unsigned char BIOSPresent
;
95 unsigned long v_baseAddr
; // Base address of video memory
96 unsigned long v_display
; // Display Code (if Applicable
97 unsigned long v_rowBytes
; // Number of bytes per pixel row
98 unsigned long v_width
; // Width
99 unsigned long v_height
; // Height
100 unsigned long v_depth
; // Pixel Depth
103 typedef struct boot_video boot_video
;
105 #define GRAPHICS_MODE 1
108 #define BOOT_STRING_LEN 160
109 #define CONFIG_SIZE (12 * 4096)
113 char bootString
[BOOT_STRING_LEN
]; // boot arguments
114 int magicCookie
; // KERNBOOTMAGIC
115 int numIDEs
; // number of IDE drives
116 int rootdev
; // root device
117 int convmem
; // conventional memory
118 int extmem
; // extended memory
119 char bootFile
[128]; // kernel file name
120 int firstAddr0
; // first address for kern convmem
121 int diskInfo
[4]; // info for bios dev 80-83
122 int graphicsMode
; // booted in graphics mode?
123 int kernDev
; // device kernel was fetched from
124 int numBootDrivers
; // number of drivers loaded
125 char * configEnd
; // pointer to end of config files
126 int kaddr
; // kernel load address
127 int ksize
; // size of kernel
128 driver_config_t driverConfig
[NDRIVERS
];
129 char _reserved
[2052];
131 PCI_bus_info_t pciInfo
;
132 APM_config_t apmConfig
;
133 char config
[CONFIG_SIZE
];
136 #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) 0x11000)
137 #define KERNBOOTMAGIC 0xa7a7a7a7
140 extern KERNBOOTSTRUCT
* kernBootStruct
;