Chameleon

Chameleon Svn Source Tree

Root/branches/slice/trunkM/i386/include/IOKit/ndrvsupport/IONDRVSupport.h

1/*
2 * Copyright (c) 1998-2000 Apple Computer, Inc. All rights reserved.
3 *
4 * @APPLE_LICENSE_HEADER_START@
5 *
6 * The contents of this file constitute Original Code as defined in and
7 * are subject to the Apple Public Source License Version 1.1 (the
8 * "License"). You may not use this file except in compliance with the
9 * License. Please obtain a copy of the License at
10 * http://www.apple.com/publicsource and read it before using this file.
11 *
12 * This Original Code and all software distributed under the License are
13 * distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY KIND, EITHER
14 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
15 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT. Please see the
17 * License for the specific language governing rights and limitations
18 * under the License.
19 *
20 * @APPLE_LICENSE_HEADER_END@
21 */
22
23#ifndef __IONDRVSUPPORT__
24#define __IONDRVSUPPORT__
25
26#include <libkern/OSTypes.h>
27
28#ifndef __LP64__
29#pragma options align=mac68k
30#endif
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
36#define kIONDRVIgnoreKey "AAPL,iokit-ignore-ndrv"
37#define kIONDRVForXKey "AAPL,iokit-ndrv"
38
39struct IOTVector {
40 void * pc;
41 UInt32 toc;
42};
43typedef struct IOTVector IOTVector;
44
45struct IONDRVInterruptSetMember {
46 void * setID;
47 UInt32 member;
48};
49typedef struct IONDRVInterruptSetMember IONDRVInterruptSetMember;
50
51typedef SInt32 (*IONDRVInterruptHandler)( IONDRVInterruptSetMember setMember, void *refCon, UInt32 theIntCount);
52typedef void (*IONDRVInterruptEnabler)( IONDRVInterruptSetMember setMember, void *refCon);
53typedef Boolean (*IONDRVInterruptDisabler)( IONDRVInterruptSetMember setMember, void *refCon);
54
55enum {
56 kIONDRVFirstMemberNumber = 1,
57 kIONDRVIsrIsComplete = 0,
58 kIONDRVIsrIsNotComplete = -1,
59 kIONDRVMemberNumberParent = -2
60};
61
62enum {
63 kIONDRVReturnToParentWhenComplete = 0x00000001,
64 kIONDRVReturnToParentWhenNotComplete = 0x00000002
65};
66
67enum {
68 kIONDRVISTChipInterruptSource = 0,
69 kIONDRVISTOutputDMAInterruptSource = 1,
70 kIONDRVISTInputDMAInterruptSource = 2,
71 kIONDRVISTPropertyMemberCount = 3
72};
73
74#define kIONDRVISTPropertyName "driver-ist"
75
76IOReturn
77IONDRVInstallInterruptFunctions(void * setID,
78 UInt32 member,
79 void * refCon,
80 IOTVector * handler,
81 IOTVector * enabler,
82 IOTVector * disabler );
83
84typedef const IOTVector * (*IONDRVUndefinedSymbolHandler)( void * self,
85 const char * libraryName, const char * symbolName );
86
87#ifndef __LP64__
88#pragma options align=reset
89#endif
90
91#ifdef __cplusplus
92}
93#endif
94
95#endif /* __IONDRVSUPPORT__ */
96

Archive Download this file

Revision: 1171