Chameleon

Chameleon Svn Source Tree

Root/branches/cparm/i386/boot2/drivers.h

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 "modules.h"
43
44struct Module {
45struct Module *nextModule;
46long willLoad;
47TagPtr dict;
48char *plistAddr;
49long plistLength;
50char *executablePath;
51char *bundlePath;
52long bundlePathLength;
53};
54typedef struct Module Module, *ModulePtr;
55
56struct DriverInfo {
57char *plistAddr;
58long plistLength;
59void *executableAddr;
60long executableLength;
61void *bundlePathAddr;
62long bundlePathLength;
63};
64typedef struct DriverInfo DriverInfo, *DriverInfoPtr;
65
66#define kDriverPackageSignature1 'MKXT'
67#define kDriverPackageSignature2 'MOSX'
68
69struct DriversPackage {
70unsigned long signature1;
71unsigned long signature2;
72unsigned long length;
73unsigned long alder32;
74unsigned long version;
75unsigned long numDrivers;
76unsigned long reserved1;
77unsigned long reserved2;
78};
79typedef struct DriversPackage DriversPackage;
80
81enum {
82kCFBundleType2,
83kCFBundleType3
84};
85
86long LoadDrivers( char * dirSpec );
87long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize);
88
89#endif /* _BOOT2_DRIVERS_H */

Archive Download this file

Revision: 1804