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@
22 #ifndef _PEXPERT_I386_BOOT_H
23 #define _PEXPERT_I386_BOOT_H
28 * What the booter leaves behind for the kernel.
32 * Types of boot driver that may be loaded by the booter.
35 kBootDriverTypeInvalid
= 0,
36 kBootDriverTypeKEXT
= 1,
37 kBootDriverTypeMKEXT
= 2
44 uint32_t v_baseAddr
; // Base address of video memory
45 uint32_t v_display
; // Display Code
46 uint32_t v_rowBytes
; // Number of bytes per pixel row
47 uint32_t v_width
; // Width
48 uint32_t v_height
; // Height
49 uint32_t v_depth
; // Pixel Depth
52 typedef struct boot_video boot_video
;
54 /* Values for v_display */
56 #define VGA_TEXT_MODE 0
57 #define GRAPHICS_MODE 1
58 #define FB_TEXT_MODE 2
62 kEfiReservedMemoryType
= 0,
65 kEfiBootServicesCode
= 3,
66 kEfiBootServicesData
= 4,
67 kEfiRuntimeServicesCode
= 5,
68 kEfiRuntimeServicesData
= 6,
69 kEfiConventionalMemory
= 7,
70 kEfiUnusableMemory
= 8,
71 kEfiACPIReclaimMemory
= 9,
72 kEfiACPIMemoryNVS
= 10,
73 kEfiMemoryMappedIO
= 11,
74 kEfiMemoryMappedIOPortSpace
= 12,
76 kEfiMaxMemoryType
= 14
80 * Memory range descriptor.
82 typedef struct EfiMemoryRange
{
85 uint64_t PhysicalStart
;
86 uint64_t VirtualStart
;
87 uint64_t NumberOfPages
;
91 #define BOOT_LINE_LENGTH 1024
92 #define BOOT_STRING_LEN BOOT_LINE_LENGTH
99 uint32_t v_baseAddr
; /* Base address of video memory */
100 uint32_t v_display
; /* Display Code (if Applicable */
101 uint32_t v_rowBytes
; /* Number of bytes per pixel row */
102 uint32_t v_width
; /* Width */
103 uint32_t v_height
; /* Height */
104 uint32_t v_depth
; /* Pixel Depth */
105 } __attribute__((aligned(4)));
107 typedef struct Boot_Video Boot_Video
;
110 /* Boot argument structure - passed into Mach kernel at boot time.
112 #define kBootArgsRevision 4
113 #define kBootArgsVersion 1
115 #define kBootArgsEfiMode32 32
116 #define kBootArgsEfiMode64 64
118 typedef struct boot_args
{
119 uint16_t Revision
; /* Revision of boot_args structure */
120 uint16_t Version
; /* Version of boot_args structure */
122 char CommandLine
[BOOT_LINE_LENGTH
]; /* Passed in command line */
125 uint32_t MemoryMapSize
;
126 uint32_t MemoryMapDescriptorSize
;
127 uint32_t MemoryMapDescriptorVersion
;
129 Boot_Video Video
; /* Video Information */
131 uint32_t deviceTreeP
; /* Base of flattened device tree */
132 uint32_t deviceTreeLength
;/* Length of flattened tree */
137 uint32_t efiRuntimeServicesPageStart
;
138 uint32_t efiRuntimeServicesPageCount
;
139 uint32_t efiSystemTable
;
141 uint8_t efiMode
; /* 32 = 32-bit, 64 = 64-bit */
142 uint8_t __reserved1
[3];
143 uint32_t __reserved2
[7];
145 } __attribute__((aligned(4))) boot_args
;
147 #endif /* _PEXPERT_I386_BOOT_H */