]>
Commit | Line | Data |
---|---|---|
1c79356b A |
1 | /* |
2 | * Copyright (c) 2000 Apple Computer, Inc. All rights reserved. | |
3 | * | |
4 | * @APPLE_LICENSE_HEADER_START@ | |
5 | * | |
d7e50217 | 6 | * Copyright (c) 1999-2003 Apple Computer, Inc. All Rights Reserved. |
1c79356b | 7 | * |
d7e50217 A |
8 | * This file contains Original Code and/or Modifications of Original Code |
9 | * as defined in and that are subject to the Apple Public Source License | |
10 | * Version 2.0 (the 'License'). You may not use this file except in | |
11 | * compliance with the License. Please obtain a copy of the License at | |
12 | * http://www.opensource.apple.com/apsl/ and read it before using this | |
13 | * file. | |
14 | * | |
15 | * The Original Code and all software distributed under the License are | |
16 | * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER | |
1c79356b A |
17 | * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES, |
18 | * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, | |
d7e50217 A |
19 | * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. |
20 | * Please see the License for the specific language governing rights and | |
21 | * limitations under the License. | |
1c79356b A |
22 | * |
23 | * @APPLE_LICENSE_HEADER_END@ | |
24 | */ | |
25 | /* | |
26 | * @OSF_COPYRIGHT@ | |
27 | */ | |
28 | ||
29 | /* | |
30 | * Mach Operating System | |
31 | * Copyright (c) 1991,1990,1989 Carnegie Mellon University | |
32 | * All Rights Reserved. | |
33 | * | |
34 | * Permission to use, copy, modify and distribute this software and its | |
35 | * documentation is hereby granted, provided that both the copyright | |
36 | * notice and this permission notice appear in all copies of the | |
37 | * software, derivative works or modified versions, and any portions | |
38 | * thereof, and that both notices appear in supporting documentation. | |
39 | * | |
40 | * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS" | |
41 | * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR | |
42 | * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE. | |
43 | * | |
44 | * Carnegie Mellon requests users of this software to return to | |
45 | * | |
46 | * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU | |
47 | * School of Computer Science | |
48 | * Carnegie Mellon University | |
49 | * Pittsburgh PA 15213-3890 | |
50 | * | |
51 | * any improvements or extensions that they make and grant Carnegie Mellon | |
52 | * the rights to redistribute these changes. | |
53 | */ | |
54 | /* | |
55 | */ | |
56 | ||
57 | /* | |
58 | Copyright (c) 1988,1989 Prime Computer, Inc. Natick, MA 01760 | |
59 | All Rights Reserved. | |
60 | ||
61 | Permission to use, copy, modify, and distribute this | |
62 | software and its documentation for any purpose and | |
63 | without fee is hereby granted, provided that the above | |
64 | copyright notice appears in all copies and that both the | |
65 | copyright notice and this permission notice appear in | |
66 | supporting documentation, and that the name of Prime | |
67 | Computer, Inc. not be used in advertising or publicity | |
68 | pertaining to distribution of the software without | |
69 | specific, written prior permission. | |
70 | ||
71 | THIS SOFTWARE IS PROVIDED "AS IS", AND PRIME COMPUTER, | |
72 | INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS | |
73 | SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF | |
74 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN | |
75 | NO EVENT SHALL PRIME COMPUTER, INC. BE LIABLE FOR ANY | |
76 | SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY | |
77 | DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR | |
78 | PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR | |
79 | OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION | |
80 | WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. | |
81 | */ | |
82 | ||
83 | #ifndef _I386_PIC_H_ | |
84 | #define _I386_PIC_H_ | |
85 | ||
86 | #include <platforms.h> | |
87 | ||
88 | #define NINTR 0x10 | |
89 | #define NPICS 0x02 | |
90 | ||
91 | /* | |
92 | ** The following are definitions used to locate the PICs in the system | |
93 | */ | |
94 | ||
95 | #define ADDR_PIC_BASE 0x20 | |
96 | #define OFF_ICW 0x00 | |
97 | #define OFF_OCW 0x01 | |
98 | #define SIZE_PIC 0x80 | |
99 | ||
100 | /* | |
101 | ** The following banks of definitions ICW1, ICW2, ICW3, and ICW4 are used | |
102 | ** to define the fields of the various ICWs for initialisation of the PICs | |
103 | */ | |
104 | ||
105 | /* | |
106 | ** ICW1 | |
107 | */ | |
108 | ||
109 | #define ICW_TEMPLATE 0x10 | |
110 | ||
111 | #define LEVL_TRIGGER 0x08 | |
112 | #define EDGE_TRIGGER 0x00 | |
113 | #define ADDR_INTRVL4 0x04 | |
114 | #define ADDR_INTRVL8 0x00 | |
115 | #define SINGLE__MODE 0x02 | |
116 | #define CASCADE_MODE 0x00 | |
117 | #define ICW4__NEEDED 0x01 | |
118 | #define NO_ICW4_NEED 0x00 | |
119 | ||
120 | /* | |
121 | ** ICW2 | |
122 | */ | |
123 | ||
124 | #define PICM_VECTBASE 0x40 | |
125 | #define PICS_VECTBASE PICM_VECTBASE + 0x08 | |
126 | ||
127 | /* | |
128 | ** ICW3 | |
129 | */ | |
130 | ||
131 | #define SLAVE_ON_IR0 0x01 | |
132 | #define SLAVE_ON_IR1 0x02 | |
133 | #define SLAVE_ON_IR2 0x04 | |
134 | #define SLAVE_ON_IR3 0x08 | |
135 | #define SLAVE_ON_IR4 0x10 | |
136 | #define SLAVE_ON_IR5 0x20 | |
137 | #define SLAVE_ON_IR6 0x40 | |
138 | #define SLAVE_ON_IR7 0x80 | |
139 | ||
140 | #define I_AM_SLAVE_0 0x00 | |
141 | #define I_AM_SLAVE_1 0x01 | |
142 | #define I_AM_SLAVE_2 0x02 | |
143 | #define I_AM_SLAVE_3 0x03 | |
144 | #define I_AM_SLAVE_4 0x04 | |
145 | #define I_AM_SLAVE_5 0x05 | |
146 | #define I_AM_SLAVE_6 0x06 | |
147 | #define I_AM_SLAVE_7 0x07 | |
148 | ||
149 | /* | |
150 | ** ICW4 | |
151 | */ | |
152 | ||
153 | #define SNF_MODE_ENA 0x10 | |
154 | #define SNF_MODE_DIS 0x00 | |
155 | #define BUFFERD_MODE 0x08 | |
156 | #define NONBUFD_MODE 0x00 | |
157 | #define AUTO_EOI_MOD 0x02 | |
158 | #define NRML_EOI_MOD 0x00 | |
159 | #define I8086_EMM_MOD 0x01 | |
160 | #define SET_MCS_MODE 0x00 | |
161 | ||
162 | /* | |
163 | ** OCW1 | |
164 | */ | |
165 | #define PICM_MASK 0xFF | |
166 | #define PICS_MASK 0xFF | |
167 | /* | |
168 | ** OCW2 | |
169 | */ | |
170 | ||
171 | #define NON_SPEC_EOI 0x20 | |
172 | #define SPECIFIC_EOI 0x30 | |
173 | #define ROT_NON_SPEC 0x50 | |
174 | #define SET_ROT_AEOI 0x40 | |
175 | #define RSET_ROTAEOI 0x00 | |
176 | #define ROT_SPEC_EOI 0x70 | |
177 | #define SET_PRIORITY 0x60 | |
178 | #define NO_OPERATION 0x20 | |
179 | ||
180 | #define SEND_EOI_IR0 0x00 | |
181 | #define SEND_EOI_IR1 0x01 | |
182 | #define SEND_EOI_IR2 0x02 | |
183 | #define SEND_EOI_IR3 0x03 | |
184 | #define SEND_EOI_IR4 0x04 | |
185 | #define SEND_EOI_IR5 0x05 | |
186 | #define SEND_EOI_IR6 0x06 | |
187 | #define SEND_EOI_IR7 0x07 | |
188 | ||
189 | /* | |
190 | ** OCW3 | |
191 | */ | |
192 | ||
193 | #define OCW_TEMPLATE 0x08 | |
194 | #define SPECIAL_MASK 0x40 | |
195 | #define MASK_MDE_SET 0x20 | |
196 | #define MASK_MDE_RST 0x00 | |
197 | #define POLL_COMMAND 0x04 | |
198 | #define NO_POLL_CMND 0x00 | |
199 | #define READ_NEXT_RD 0x02 | |
200 | #define READ_IR_ONRD 0x00 | |
201 | #define READ_IS_ONRD 0x01 | |
202 | ||
203 | #endif /* _I386_PIC_H_ */ |