|
|
1.1 root 1: /*
2: * Copyright (c) 1999 Apple Computer, Inc. All rights reserved.
3: *
4: * @APPLE_LICENSE_HEADER_START@
5: *
6: * Portions Copyright (c) 1999 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 1.1 (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: /*
26: * kernBootStruct.h
27: * What the booter leaves behind for the kernel.
28: */
29:
30: #define GRAPHICS_MODE 1
31: #define TEXT_MODE 0
32:
33: #define KERNBOOTMAGIC 0xa7a7a7a7
34:
35: /* The config table has room for 12 drivers if their config files
36: * are the maximum size allowed.
37: */
38: #define CONFIG_SIZE (12 * 4096)
39:
40: /* Maximum number of boot drivers supported, assuming their
41: * config files fit in the bootstruct.
42: */
43: #define NDRIVERS 64
44:
45: #ifndef __ASSEMBLER__
46:
47: typedef struct {
48: char *address; // address where driver was loaded
49: int size; // entry point for driver
50: } driver_config_t;
51:
52: typedef struct {
53: short version;
54: char bootString[160]; // string we booted with
55: int magicCookie; // KERNBOOTMAGIC if struct valid
56: int rootdev; // booters guess as to rootdev
57: int convmem; // conventional memory
58: char boot_file[128]; // name of the kernel we booted
59: int first_addr0; // first address for kern convmem
60: int graphicsMode; // did we boot in graphics mode?
61: int kernDev; // device kernel was fetched from
62: int numBootDrivers; // number of drivers loaded by booter
63: char *configEnd; // pointer to end of config files
64: int kaddr; // kernel load address
65: int ksize; // size of kernel
66: void *rld_entry; // entry point for standalone rld
67:
68: driver_config_t driverConfig[NDRIVERS]; // ??
69:
70: char _reserved[4052 - sizeof(driver_config_t) * NDRIVERS];
71:
72: char config[CONFIG_SIZE]; // the config file contents
73: } KERNBOOTSTRUCT;
74:
75: #ifdef KERNEL
76: #define static_KERNBOOTSTRUCT (*KERNSTRUCT_ADDR)
77: extern KERNBOOTSTRUCT *KERNSTRUCT_ADDR;
78: #else
79: /* The assumption is that the booter is the only other consumer of this */
80: extern KERNBOOTSTRUCT *kernBootStruct;
81: #undef KERNSTRUCT_ADDR
82: // #define KERNSTRUCT_ADDR ((KERNBOOTSTRUCT *) BOOTSTRUCT_ADDR)
83: #endif
84:
85: #endif /* __ASSEMBLER__ */
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.