1 | /*␊ |
2 | * Copyright (c) 1999-2003 Apple Computer, Inc. All rights reserved.␊ |
3 | *␊ |
4 | * @APPLE_LICENSE_HEADER_START@␊ |
5 | * ␊ |
6 | * Portions Copyright (c) 1999-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 | * drivers.h - Driver Loading Functions.␊ |
26 | *␊ |
27 | * Copyright (c) 2000 Apple Computer, Inc.␊ |
28 | *␊ |
29 | * DRI: Josh de Cesare␊ |
30 | */␊ |
31 | #ifndef _BOOT2_DRIVERS_H␊ |
32 | #define _BOOT2_DRIVERS_H␊ |
33 | ␊ |
34 | #include <mach-o/fat.h>␊ |
35 | #include <libkern/OSByteOrder.h>␊ |
36 | #include <mach/machine.h>␊ |
37 | ␊ |
38 | #include "sl.h"␊ |
39 | #include "boot.h"␊ |
40 | #include "bootstruct.h"␊ |
41 | #include "xml.h"␊ |
42 | #include "ramdisk.h"␊ |
43 | #include "modules.h"␊ |
44 | ␊ |
45 | struct Module { ␊ |
46 | ␉struct Module *nextModule;␊ |
47 | ␉long willLoad;␊ |
48 | ␉TagPtr dict;␊ |
49 | ␉char *plistAddr;␊ |
50 | ␉long plistLength;␊ |
51 | ␉char *executablePath;␊ |
52 | ␉char *bundlePath;␊ |
53 | ␉long bundlePathLength;␊ |
54 | };␊ |
55 | typedef struct Module Module, *ModulePtr;␊ |
56 | ␊ |
57 | struct DriverInfo {␊ |
58 | ␉char *plistAddr;␊ |
59 | ␉long plistLength;␊ |
60 | ␉void *executableAddr;␊ |
61 | ␉long executableLength;␊ |
62 | ␉void *bundlePathAddr;␊ |
63 | ␉long bundlePathLength;␊ |
64 | };␊ |
65 | typedef struct DriverInfo DriverInfo, *DriverInfoPtr;␊ |
66 | ␊ |
67 | #define kDriverPackageSignature1 'MKXT'␊ |
68 | #define kDriverPackageSignature2 'MOSX'␊ |
69 | ␊ |
70 | struct DriversPackage {␊ |
71 | ␉unsigned long signature1;␊ |
72 | ␉unsigned long signature2;␊ |
73 | ␉unsigned long length;␊ |
74 | ␉unsigned long alder32;␊ |
75 | ␉unsigned long version;␊ |
76 | ␉unsigned long numDrivers;␊ |
77 | ␉unsigned long reserved1;␊ |
78 | ␉unsigned long reserved2;␊ |
79 | };␊ |
80 | typedef struct DriversPackage DriversPackage;␊ |
81 | ␊ |
82 | enum {␊ |
83 | ␉kCFBundleType2,␊ |
84 | ␉kCFBundleType3␊ |
85 | };␊ |
86 | ␊ |
87 | ␊ |
88 | #ifndef OPTION_ROM␊ |
89 | extern long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p);␊ |
90 | #endif␊ |
91 | ␊ |
92 | long LoadDrivers( char * dirSpec );␊ |
93 | long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize);␊ |
94 | ␊ |
95 | #endif /* _BOOT2_DRIVERS_H */ |