]>
git.saurik.com Git - apple/xnu.git/blob - osfmk/i386/pic.h
2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_OSREFERENCE_LICENSE_HEADER_START@
6 * This file contains Original Code and/or Modifications of Original Code
7 * as defined in and that are subject to the Apple Public Source License
8 * Version 2.0 (the 'License'). You may not use this file except in
9 * compliance with the License. The rights granted to you under the License
10 * may not be used to create, or enable the creation or redistribution of,
11 * unlawful or unlicensed copies of an Apple operating system, or to
12 * circumvent, violate, or enable the circumvention or violation of, any
13 * terms of an Apple operating system software license agreement.
15 * Please obtain a copy of the License at
16 * http://www.opensource.apple.com/apsl/ and read it before using this file.
18 * The Original Code and all software distributed under the License are
19 * distributed on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER
20 * EXPRESS OR IMPLIED, AND APPLE HEREBY DISCLAIMS ALL SUCH WARRANTIES,
21 * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY,
22 * FITNESS FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT.
23 * Please see the License for the specific language governing rights and
24 * limitations under the License.
26 * @APPLE_OSREFERENCE_LICENSE_HEADER_END@
33 * Mach Operating System
34 * Copyright (c) 1991,1990,1989 Carnegie Mellon University
35 * All Rights Reserved.
37 * Permission to use, copy, modify and distribute this software and its
38 * documentation is hereby granted, provided that both the copyright
39 * notice and this permission notice appear in all copies of the
40 * software, derivative works or modified versions, and any portions
41 * thereof, and that both notices appear in supporting documentation.
43 * CARNEGIE MELLON ALLOWS FREE USE OF THIS SOFTWARE IN ITS "AS IS"
44 * CONDITION. CARNEGIE MELLON DISCLAIMS ANY LIABILITY OF ANY KIND FOR
45 * ANY DAMAGES WHATSOEVER RESULTING FROM THE USE OF THIS SOFTWARE.
47 * Carnegie Mellon requests users of this software to return to
49 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
50 * School of Computer Science
51 * Carnegie Mellon University
52 * Pittsburgh PA 15213-3890
54 * any improvements or extensions that they make and grant Carnegie Mellon
55 * the rights to redistribute these changes.
61 Copyright (c) 1988,1989 Prime Computer, Inc. Natick, MA 01760
64 Permission to use, copy, modify, and distribute this
65 software and its documentation for any purpose and
66 without fee is hereby granted, provided that the above
67 copyright notice appears in all copies and that both the
68 copyright notice and this permission notice appear in
69 supporting documentation, and that the name of Prime
70 Computer, Inc. not be used in advertising or publicity
71 pertaining to distribution of the software without
72 specific, written prior permission.
74 THIS SOFTWARE IS PROVIDED "AS IS", AND PRIME COMPUTER,
75 INC. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS
76 SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
77 MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN
78 NO EVENT SHALL PRIME COMPUTER, INC. BE LIABLE FOR ANY
79 SPECIAL, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY
80 DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR
81 PROFITS, WHETHER IN ACTION OF CONTRACT, NEGLIGENCE, OR
82 OTHER TORTIOUS ACTION, ARISING OUR OF OR IN CONNECTION
83 WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
89 #include <platforms.h>
95 ** The following are definitions used to locate the PICs in the system
98 #define ADDR_PIC_BASE 0x20
101 #define SIZE_PIC 0x80
104 ** The following banks of definitions ICW1, ICW2, ICW3, and ICW4 are used
105 ** to define the fields of the various ICWs for initialisation of the PICs
112 #define ICW_TEMPLATE 0x10
114 #define LEVL_TRIGGER 0x08
115 #define EDGE_TRIGGER 0x00
116 #define ADDR_INTRVL4 0x04
117 #define ADDR_INTRVL8 0x00
118 #define SINGLE__MODE 0x02
119 #define CASCADE_MODE 0x00
120 #define ICW4__NEEDED 0x01
121 #define NO_ICW4_NEED 0x00
127 #define PICM_VECTBASE 0x40
128 #define PICS_VECTBASE PICM_VECTBASE + 0x08
134 #define SLAVE_ON_IR0 0x01
135 #define SLAVE_ON_IR1 0x02
136 #define SLAVE_ON_IR2 0x04
137 #define SLAVE_ON_IR3 0x08
138 #define SLAVE_ON_IR4 0x10
139 #define SLAVE_ON_IR5 0x20
140 #define SLAVE_ON_IR6 0x40
141 #define SLAVE_ON_IR7 0x80
143 #define I_AM_SLAVE_0 0x00
144 #define I_AM_SLAVE_1 0x01
145 #define I_AM_SLAVE_2 0x02
146 #define I_AM_SLAVE_3 0x03
147 #define I_AM_SLAVE_4 0x04
148 #define I_AM_SLAVE_5 0x05
149 #define I_AM_SLAVE_6 0x06
150 #define I_AM_SLAVE_7 0x07
156 #define SNF_MODE_ENA 0x10
157 #define SNF_MODE_DIS 0x00
158 #define BUFFERD_MODE 0x08
159 #define NONBUFD_MODE 0x00
160 #define AUTO_EOI_MOD 0x02
161 #define NRML_EOI_MOD 0x00
162 #define I8086_EMM_MOD 0x01
163 #define SET_MCS_MODE 0x00
168 #define PICM_MASK 0xFF
169 #define PICS_MASK 0xFF
174 #define NON_SPEC_EOI 0x20
175 #define SPECIFIC_EOI 0x30
176 #define ROT_NON_SPEC 0x50
177 #define SET_ROT_AEOI 0x40
178 #define RSET_ROTAEOI 0x00
179 #define ROT_SPEC_EOI 0x70
180 #define SET_PRIORITY 0x60
181 #define NO_OPERATION 0x20
183 #define SEND_EOI_IR0 0x00
184 #define SEND_EOI_IR1 0x01
185 #define SEND_EOI_IR2 0x02
186 #define SEND_EOI_IR3 0x03
187 #define SEND_EOI_IR4 0x04
188 #define SEND_EOI_IR5 0x05
189 #define SEND_EOI_IR6 0x06
190 #define SEND_EOI_IR7 0x07
196 #define OCW_TEMPLATE 0x08
197 #define SPECIAL_MASK 0x40
198 #define MASK_MDE_SET 0x20
199 #define MASK_MDE_RST 0x00
200 #define POLL_COMMAND 0x04
201 #define NO_POLL_CMND 0x00
202 #define READ_NEXT_RD 0x02
203 #define READ_IR_ONRD 0x00
204 #define READ_IS_ONRD 0x01
206 #endif /* _I386_PIC_H_ */