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
43struct compressed_kernel_header {
44 u_int32_t signature;
45 u_int32_t compress_type;
46 u_int32_t adler32;
47 u_int32_t uncompressed_size;
48 u_int32_t compressed_size;
49 u_int32_t reserved[11];
50 char platform_name[PLATFORM_NAME_LEN];
51 char root_path[ROOT_PATH_LEN];
52 u_int8_t data[0];
53};
54typedef struct compressed_kernel_header compressed_kernel_header;
55
56extern long LoadDrivers(char * dirSpec);
57extern long DecodeKernel(void *binary, entry_t *rentry, char **raddr, int *rsize);
58
59typedef long (*FileLoadDrivers_t)(char *dirSpec, long plugin);
60
61#endif /* _BOOT2_DRIVERS_H */

Archive Download this file

Revision: 1972