Chameleon

Chameleon Svn Source Tree

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

Source at commit 1158 created 13 years 15 days ago.
By azimutz, Match nvidia.c with the one on my branch (Chazi) adding dev id's from issue 99 and Asus G74SX (0DF4, 1251).
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
45struct Module {
46struct Module *nextModule;
47long willLoad;
48TagPtr dict;
49char *plistAddr;
50long plistLength;
51char *executablePath;
52char *bundlePath;
53long bundlePathLength;
54};
55typedef struct Module Module, *ModulePtr;
56
57struct DriverInfo {
58char *plistAddr;
59long plistLength;
60void *executableAddr;
61long executableLength;
62void *bundlePathAddr;
63long bundlePathLength;
64};
65typedef struct DriverInfo DriverInfo, *DriverInfoPtr;
66
67#define kDriverPackageSignature1 'MKXT'
68#define kDriverPackageSignature2 'MOSX'
69
70struct DriversPackage {
71unsigned long signature1;
72unsigned long signature2;
73unsigned long length;
74unsigned long adler32;
75unsigned long version;
76unsigned long numDrivers;
77unsigned long reserved1;
78unsigned long reserved2;
79};
80typedef struct DriversPackage DriversPackage;
81
82enum {
83kCFBundleType2,
84kCFBundleType3
85};
86
87
88#ifndef OPTION_ROM
89extern long (*LoadExtraDrivers_p)(FileLoadDrivers_t FileLoadDrivers_p);
90#endif
91
92long LoadDrivers( char * dirSpec );
93long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize);
94
95#endif /* _BOOT2_DRIVERS_H */

Archive Download this file

Revision: 1158