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 "bootstruct.h"
40#include "xml.h"
41#include "modules.h"
42
43#define DEFAULT_DRIVER_SPEC_SIZE 4096
44
45struct compressed_kernel_header {
46 u_int32_t signature;
47 u_int32_t compress_type;
48 u_int32_t adler32;
49 u_int32_t uncompressed_size;
50 u_int32_t compressed_size;
51 u_int32_t reserved[11];
52 char platform_name[PLATFORM_NAME_LEN];
53 char root_path[ROOT_PATH_LEN];
54 u_int8_t data[0];
55};
56typedef struct compressed_kernel_header compressed_kernel_header;
57
58extern long LoadDrivers( char * dirSpec );
59extern long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize);
60extern long InitDriverSupport(void);
61extern long FileLoadDrivers(char *dirSpec, long size,long plugin);
62extern long LoadDriverMKext(char *fileSpec);
63extern long LoadDriverPList(char *dirSpec, char *name, long bundleType);
64extern long LoadMatchedModules(void);
65extern long MatchLibraries(void);
66#if UNUSED
67extern long MatchPersonalities(void);
68#endif
69#ifdef NBP_SUPPORT
70extern long NetLoadDrivers(char *dirSpec);
71#endif
72
73typedef long (*FileLoadDrivers_t)(char *dirSpec, long size, long plugin);
74
75#endif /* _BOOT2_DRIVERS_H */

Archive Download this file

Revision: 2044