Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/libsaio/bootstruct.h

1/*
2 * Copyright (c) 2002-2003 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * Portions Copyright (c) 2002-2003 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 2.0 (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
12 * this file.
13 *
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
20 * under the License.
21 *
22 * @APPLE_LICENSE_HEADER_END@
23 */
24
25#ifndef __BOOTSTRUCT_H
26#define __BOOTSTRUCT_H
27
28#include "bootXnu.h"
29#include "saio_types.h"
30#include "bios.h"
31#include "device_tree.h"
32/*!
33 Kernel boot args global also used by booter for its own data.
34 */
35extern boot_args_legacy *bootArgsLegacy;
36extern boot_args *bootArgs;
37
38#define VGA_TEXT_MODE 0
39
40#if 0
41/*
42 * Maximum number of boot drivers that can be loaded.
43 */
44#define NDRIVERS 500
45
46#define CONFIG_SIZE (40 * 4096)
47#endif
48
49#define kMemoryMapCountMax 40
50
51#if UNUSED
52
53/*
54 * PCI bus information.
55 */
56typedef struct _PCI_bus_info_t {
57 union {
58 struct {
59 unsigned char configMethod1 :1;
60 unsigned char configMethod2 :1;
61 unsigned char :2;
62 unsigned char specialCycle1 :1;
63 unsigned char specialCycle2 :1;
64 } s;
65 unsigned char d;
66 } u_bus;
67 unsigned char maxBusNum;
68 unsigned char majorVersion;
69 unsigned char minorVersion;
70 unsigned char BIOSPresent;
71} PCI_bus_info_t;
72
73typedef struct {
74 unsigned long address; // address where driver was loaded
75 unsigned long size; // number of bytes
76 unsigned long type; // driver type
77} driver_config_t;
78#endif
79
80/*
81 * INT15, E820h - Query System Address Map.
82 *
83 * Documented in ACPI Specification Rev 2.0,
84 * Chapter 15 (System Address Map Interfaces).
85 */
86
87/*
88 * ACPI defined memory range types.
89 */
90enum {
91 kMemoryRangeUsable = 1, // RAM usable by the OS.
92 kMemoryRangeReserved = 2, // Reserved. (Do not use)
93 kMemoryRangeACPI = 3, // ACPI tables. Can be reclaimed.
94 kMemoryRangeNVS = 4, // ACPI NVS memory. (Do not use)
95
96 /* Undefined types should be treated as kMemoryRangeReserved */
97};
98
99/*!
100 PrivateBootInfo has fields used by the booter that used to be part of
101 KernelBootArgs_t *bootArgs. When the switch was made to EFI the structure
102 completely changed to boot_args *bootArgs. This (new to boot-132) structure
103 contains the fields the kernel no longer cares about but the booter still
104 uses internally. Some fields (e.g. the video information) remain interesting
105 to the kernel and are thus located in bootArgs although with different field names.
106 */
107typedef struct PrivateBootInfo {
108
109 char bootFile[128]; // kernel file name
110
111 config_file_t bootConfig; // the booter boot.plist
112 config_file_t overrideConfig; // additional boot.plist which can override bootConfig keys
113
114config_file_t SystemConfig; // system confing found in /Library/Preferences/SystemConfiguration/com.apple.Boot.plist
115
116
117 config_file_t smbiosConfig; // smbios.plist
118 config_file_t helperConfig; // boot helper partition's boot.plist
119
120char uuidStr[64+1];//boot device uuid
121
122} PrivateBootInfo_t;
123
124#define DEFAULT_BOOT_CONFIG (config_file_t*)0
125#define DEFAULT_SYSTEM_CONFIG (config_file_t*)1
126#define DEFAULT_OVERRIDE_CONFIG (config_file_t*)2
127#define DEFAULT_SMBIOS_CONFIG (config_file_t*)3
128#define DEFAULT_HELPER_CONFIG (config_file_t*)4
129
130extern PrivateBootInfo_t *bootInfo;
131
132#endif /* __BOOTSTRUCT_H */
133

Archive Download this file

Revision: 2006