]>
Commit | Line | Data |
---|---|---|
1c79356b A |
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 | * Copyright (c) 1998 Apple Computer, Inc. All rights reserved. | |
24 | * | |
25 | * HISTORY | |
26 | * | |
27 | */ | |
28 | ||
29 | ||
30 | #ifndef _IOKIT_APPLEI386PCI_H | |
31 | #define _IOKIT_APPLEI386PCI_H | |
32 | ||
33 | #include <IOKit/pci/IOPCIBridge.h> | |
34 | ||
35 | class AppleI386PCI : public IOPCIBridge | |
36 | { | |
37 | OSDeclareDefaultStructors(AppleI386PCI) | |
38 | ||
39 | IOSimpleLock * lock; | |
40 | IODeviceMemory * ioMemory; | |
41 | ||
42 | UInt8 maxBusNum; /* Highest valid Bus Number */ | |
43 | UInt8 maxDevNum; /* Highest valid Device Number */ | |
44 | bool BIOS16Present; /* booter found PCI BIOS 16 */ | |
45 | bool configMethod1; /* host bridge supports CM1 */ | |
46 | bool configMethod2; /* host bridge supports CM2 */ | |
47 | bool specialCycle1; /* host bridge supports SC1 */ | |
48 | bool specialCycle2; /* host bridge supports SC2 */ | |
49 | bool BIOS32Present; /* init found PCI BIOS 32 */ | |
50 | void *BIOS32Entry; /* Points to 32 bit PCI entry pt */ | |
51 | int majorVersion; /* Packed BCD Major Rev#: 0x02 */ | |
52 | int minorVersion; /* Packed BCD Minor Rev#: 0x00 */ | |
53 | ||
54 | private: | |
55 | virtual UInt32 configRead32Method1( IOPCIAddressSpace space, | |
56 | UInt8 offset ); | |
57 | virtual void configWrite32Method1( IOPCIAddressSpace space, | |
58 | UInt8 offset, UInt32 data ); | |
59 | virtual UInt16 configRead16Method1( IOPCIAddressSpace space, | |
60 | UInt8 offset ); | |
61 | virtual void configWrite16Method1( IOPCIAddressSpace space, | |
62 | UInt8 offset, UInt16 data ); | |
63 | virtual UInt8 configRead8Method1( IOPCIAddressSpace space, | |
64 | UInt8 offset ); | |
65 | virtual void configWrite8Method1( IOPCIAddressSpace space, | |
66 | UInt8 offset, UInt8 data ); | |
67 | ||
68 | virtual UInt32 configRead32Method2( IOPCIAddressSpace space, | |
69 | UInt8 offset ); | |
70 | virtual void configWrite32Method2( IOPCIAddressSpace space, | |
71 | UInt8 offset, UInt32 data ); | |
72 | virtual UInt16 configRead16Method2( IOPCIAddressSpace space, | |
73 | UInt8 offset ); | |
74 | virtual void configWrite16Method2( IOPCIAddressSpace space, | |
75 | UInt8 offset, UInt16 data ); | |
76 | virtual UInt8 configRead8Method2( IOPCIAddressSpace space, | |
77 | UInt8 offset ); | |
78 | virtual void configWrite8Method2( IOPCIAddressSpace space, | |
79 | UInt8 offset, UInt8 data ); | |
80 | ||
81 | virtual IOPCIAddressSpace getBridgeSpace( void ); | |
82 | ||
83 | protected: | |
84 | virtual UInt8 firstBusNum( void ); | |
85 | virtual UInt8 lastBusNum( void ); | |
86 | ||
87 | public: | |
88 | virtual bool start( IOService * provider ); | |
89 | virtual bool configure( IOService * provider ); | |
90 | ||
91 | virtual void free(); | |
92 | virtual IODeviceMemory * ioDeviceMemory( void ); | |
93 | ||
94 | virtual UInt32 configRead32( IOPCIAddressSpace space, UInt8 offset ); | |
95 | virtual void configWrite32( IOPCIAddressSpace space, | |
96 | UInt8 offset, UInt32 data ); | |
97 | virtual UInt16 configRead16( IOPCIAddressSpace space, UInt8 offset ); | |
98 | virtual void configWrite16( IOPCIAddressSpace space, | |
99 | UInt8 offset, UInt16 data ); | |
100 | virtual UInt8 configRead8( IOPCIAddressSpace space, UInt8 offset ); | |
101 | virtual void configWrite8( IOPCIAddressSpace space, | |
102 | UInt8 offset, UInt8 data ); | |
103 | }; | |
104 | ||
105 | #endif /* ! _IOKIT_APPLEI386PCI_H */ | |
106 |