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

Archive Download this file

Revision: HEAD