1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
|
#ifndef __VideoDriverPrototypes_H__
#define __VideoDriverPrototypes_H__
#include <PCI.h>
#include "logger.h"
/*
* The Driver Manager calls DoDriverIO to perform I/O.
*/
OSStatus
DoDriverIO( AddressSpaceID addressSpaceID,
IOCommandID ioCommandID,
IOCommandContents ioCommandContents,
IOCommandCode ioCommandCode,
IOCommandKind ioCommandKind);
#include "MacDriverUtils.h"
/*
* Prototypes for the specific driver handlers. These do real work.
*/
OSStatus
DriverInitializeCmd( AddressSpaceID addressSpaceID,
DriverInitInfoPtr driverInitInfoPtr);
OSStatus
DriverFinalizeCmd( DriverFinalInfoPtr driverFinalInfoPtr);
OSStatus
DriverSupersededCmd( DriverSupersededInfoPtr driverSupersededInfoPtr,
Boolean calledFromFinalize);
OSStatus
DriverReplaceCmd( AddressSpaceID addressSpaceID,
DriverReplaceInfoPtr driverReplaceInfoPtr);
OSStatus
DriverOpenCmd( AddressSpaceID addressSpaceID,
ParmBlkPtr pb);
OSStatus
DriverCloseCmd( ParmBlkPtr pb);
OSStatus
DriverControlCmd( AddressSpaceID addressSpaceID,
IOCommandID ioCommandID,
IOCommandKind ioCommandKind,
CntrlParam *pb);
OSStatus
DriverStatusCmd( IOCommandID ioCommandID,
IOCommandKind ioCommandKind,
CntrlParam *pb);
OSStatus
DriverKillIOCmd( ParmBlkPtr pb);
OSStatus
DriverReadCmd(
AddressSpaceID addressSpaceID,
IOCommandID ioCommandID,
IOCommandKind ioCommandKind,
ParmBlkPtr pb);
OSStatus
DriverWriteCmd( AddressSpaceID addressSpaceID,
IOCommandID ioCommandID,
IOCommandKind ioCommandKind,
ParmBlkPtr pb);
/* .___________________________________________________________________________________.
| Driver Gestalt handler -- called from the PBStatus handler. |
.___________________________________________________________________________________.
*/
OSStatus
DriverGestaltHandler( CntrlParam* pb);
/* .___________________________________________________________________________________.
| Utitlity function to clear a block of memory. |
.___________________________________________________________________________________.
*/
#ifndef CLEAR
#define CLEAR(what) BlockZero((char*)&what, sizeof what)
#endif
/*
* This uses the ANSI-C string concatenate and "stringize" operations.
*/
#define Trace(what) lprintf("Trace: %s\n", #what)
#if 0
static void
CheckStatus( OSStatus value,
char* message)
{}
#endif
#endif
|