]> git.saurik.com Git - apple/bootx.git/blob - bootx.tproj/include.subproj/boot_args.h
BootX-55.1.tar.gz
[apple/bootx.git] / bootx.tproj / include.subproj / boot_args.h
1 /*
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved.
7 *
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
13 * file.
14 *
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.
22 *
23 * @APPLE_LICENSE_HEADER_END@
24 */
25 /*
26 * boot_args.h - Data stuctures for the information passed to the kernel.
27 *
28 * Copyright (c) 1998-2003 Apple Computer, Inc.
29 *
30 * DRI: Josh de Cesare
31 */
32
33 #ifndef _BOOTX_BOOT_ARGS_H_
34 #define _BOOTX_BOOT_ARGS_H_
35
36 // Video information..
37
38 struct Boot_Video {
39 unsigned long v_baseAddr; /* Base address of video memory */
40 unsigned long v_display; /* Display Code (if Applicable */
41 unsigned long v_rowBytes; /* Number of bytes per pixel row */
42 unsigned long v_width; /* Width */
43 unsigned long v_height; /* Height */
44 unsigned long v_depth; /* Pixel Depth */
45 };
46 typedef struct Boot_Video Boot_Video, *Boot_Video_Ptr;
47
48
49 // DRAM Bank definitions - describes physical memory layout.
50 #define kMaxDRAMBanks (26) /* maximum number of DRAM banks */
51
52 struct DRAMBank {
53 unsigned long base; /* physical base of DRAM bank */
54 unsigned long size; /* size of bank */
55 };
56 typedef struct DRAMBank DRAMBank, *DRAMBankPtr;
57
58
59 // Boot argument structure - passed into kernel at boot time.
60
61 #define kBootArgsRevision (1)
62 #define kBootArgsVersion1 (1)
63 #define kBootArgsVersion2 (2)
64
65 #define BOOT_LINE_LENGTH (256)
66
67 struct boot_args {
68 unsigned short Revision; /* Revision of boot_args structure */
69 unsigned short Version; /* Version of boot_args structure */
70 char CommandLine[BOOT_LINE_LENGTH]; /* Passed in command line */
71 DRAMBank PhysicalDRAM[kMaxDRAMBanks]; /* base/range pairs for the 26 DRAM banks */
72 Boot_Video Video; /* Video Information */
73 unsigned long machineType; /* Machine Type (gestalt) */
74 void *deviceTreeP; /* Base of flattened device tree */
75 unsigned long deviceTreeLength; /* Length of flattened tree */
76 unsigned long topOfKernelData; /* Last address of kernel data area*/
77 };
78 typedef struct boot_args boot_args, *boot_args_ptr;
79
80 #endif /* ! _BOOTX_BOOT_ARGS_H_ */