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