2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
28 #ifndef _PEXPERT_I386_BOOT_H
29 #define _PEXPERT_I386_BOOT_H
34 * What the booter leaves behind for the kernel.
38 * Types of boot driver that may be loaded by the booter.
41 kBootDriverTypeInvalid
= 0,
42 kBootDriverTypeKEXT
= 1,
43 kBootDriverTypeMKEXT
= 2
50 uint32_t v_baseAddr
; // Base address of video memory
51 uint32_t v_display
; // Display Code
52 uint32_t v_rowBytes
; // Number of bytes per pixel row
53 uint32_t v_width
; // Width
54 uint32_t v_height
; // Height
55 uint32_t v_depth
; // Pixel Depth
58 typedef struct boot_video boot_video
;
60 /* Values for v_display */
62 #define VGA_TEXT_MODE 0
63 #define GRAPHICS_MODE 1
64 #define FB_TEXT_MODE 2
68 kEfiReservedMemoryType
= 0,
71 kEfiBootServicesCode
= 3,
72 kEfiBootServicesData
= 4,
73 kEfiRuntimeServicesCode
= 5,
74 kEfiRuntimeServicesData
= 6,
75 kEfiConventionalMemory
= 7,
76 kEfiUnusableMemory
= 8,
77 kEfiACPIReclaimMemory
= 9,
78 kEfiACPIMemoryNVS
= 10,
79 kEfiMemoryMappedIO
= 11,
80 kEfiMemoryMappedIOPortSpace
= 12,
82 kEfiMaxMemoryType
= 14
86 * Memory range descriptor.
88 typedef struct EfiMemoryRange
{
91 uint64_t PhysicalStart
;
92 uint64_t VirtualStart
;
93 uint64_t NumberOfPages
;
97 #define BOOT_LINE_LENGTH 1024
98 #define BOOT_STRING_LEN BOOT_LINE_LENGTH
101 * Video information..
105 uint32_t v_baseAddr
; /* Base address of video memory */
106 uint32_t v_display
; /* Display Code (if Applicable */
107 uint32_t v_rowBytes
; /* Number of bytes per pixel row */
108 uint32_t v_width
; /* Width */
109 uint32_t v_height
; /* Height */
110 uint32_t v_depth
; /* Pixel Depth */
111 } __attribute__((aligned(4)));
113 typedef struct Boot_Video Boot_Video
;
116 /* Boot argument structure - passed into Mach kernel at boot time.
118 #define kBootArgsRevision 4
119 #define kBootArgsVersion 1
121 #define kBootArgsEfiMode32 32
122 #define kBootArgsEfiMode64 64
124 typedef struct boot_args
{
125 uint16_t Revision
; /* Revision of boot_args structure */
126 uint16_t Version
; /* Version of boot_args structure */
128 char CommandLine
[BOOT_LINE_LENGTH
]; /* Passed in command line */
131 uint32_t MemoryMapSize
;
132 uint32_t MemoryMapDescriptorSize
;
133 uint32_t MemoryMapDescriptorVersion
;
135 Boot_Video Video
; /* Video Information */
137 uint32_t deviceTreeP
; /* Base of flattened device tree */
138 uint32_t deviceTreeLength
;/* Length of flattened tree */
143 uint32_t efiRuntimeServicesPageStart
;
144 uint32_t efiRuntimeServicesPageCount
;
145 uint32_t efiSystemTable
;
147 uint8_t efiMode
; /* 32 = 32-bit, 64 = 64-bit */
148 uint8_t __reserved1
[3];
149 uint32_t __reserved2
[7];
151 } __attribute__((aligned(4))) boot_args
;
153 #endif /* _PEXPERT_I386_BOOT_H */