2 * Copyright (c) 2000 Apple Computer, Inc. All rights reserved.
4 * @APPLE_LICENSE_HEADER_START@
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.
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
20 * @APPLE_LICENSE_HEADER_END@
26 #ifndef _MP_MP_V1_1_H_
27 #define _MP_MP_V1_1_H_
29 #include <mach/mach_types.h>
30 #include <i386/apic.h>
31 #include <kern/lock.h>
33 struct MP_Config_EntryP
{
34 unsigned char Entry_Type
;
35 unsigned char Local_Apic_Id
;
36 unsigned char Local_Apic_Version
;
37 unsigned char CPU_Flags
;
38 unsigned int CPU_Signature
;
39 unsigned int Feature_Flags
;
40 unsigned int Reserved
[2];
45 #define MP_CPU_ENTRY 0 /* Processor entry */
46 #define MP_BUS_ENTRY 1 /* bus entry */
47 #define MP_IO_APIC_ENTRY 2 /* I/O APIC entry */
48 #define MP_IO_INT_ENTRY 3 /* I/O Interrupt assignment */
49 #define MP_LOC_INT_ENTRY 4 /* Local Interrupt assignment */
51 struct MP_Config_EntryB
{
52 unsigned char Entry_Type
;
57 struct MP_Config_EntryA
{
58 unsigned char Entry_Type
;
59 unsigned char IO_Apic_Id
;
60 unsigned char IO_Apic_Version
;
61 unsigned char IO_Apic_Flags
;
62 vm_offset_t IO_Apic_Address
;
65 struct MP_Config_EntryI
{
66 unsigned char Entry_Type
;
67 unsigned char Int_Type
;
68 unsigned short Int_Flag
;
69 unsigned char Source_Bus
;
70 unsigned char Source_IRQ
;
71 unsigned char Dest_IO_Apic
;
72 unsigned char Dest_INTIN
;
74 struct MP_Config_EntryL
{
75 unsigned char Entry_Type
;
76 unsigned char Int_Type
;
77 unsigned short Int_Flag
;
78 unsigned char Source_Bus
;
79 unsigned char Source_IRQ
;
80 unsigned char Dest_Local_Apic
;
81 unsigned char Dest_INTIN
;
84 struct MP_FPS_struct
{
85 unsigned int Signature
;
86 vm_offset_t Config_Ptr
;
88 unsigned char Spec_Rev
;
89 unsigned char CheckSum
;
90 unsigned char Feature
[5];
93 struct MP_Config_Table
{
94 unsigned int Signature
;
95 unsigned short Length
;
96 unsigned char Spec_Rev
;
97 unsigned char CheckSum
;
101 unsigned short OEM_Size
;
102 unsigned short Entries
;
103 vm_offset_t Local_Apic
;
104 unsigned int Reserved
;
107 #define IMCR_ADDRESS 0x22
108 #define IMCR_DATA 0x23
109 #define IMCR_SELECT 0x70
110 #define IMCR_APIC_ENABLE 0x01
113 extern boolean_t
mp_v1_1_take_irq(int pic
,
118 extern boolean_t
mp_v1_1_reset_irq(int pic
,
125 void mp_v1_1_init(void);
126 boolean_t
mp_v1_1_io_lock(int, struct processor
**);
127 void mp_v1_1_io_unlock(struct processor
*);
129 /* Intel default Configurations */
131 #define MP_PROPRIETARY_CONF 0
132 #define MP_ISA_CONF 1
133 #define MP_EISA_1_CONF 2
134 #define MP_EISA_2_CONF 3
135 #define MP_MCA_CONF 4
136 #define MP_ISA_PCI_CONF 5
137 #define MP_EISA_PCI_CONF 6
138 #define MP_MCA_PCI_CONF 7
141 #define at386_io_lock_state() panic("at386_io_lock_state called")
142 #define at386_io_lock(x) panic("at386_io_lock called");
143 #define at386_io_unlock() panic("at386_io_unlock")
144 #endif /* NCPUS > 1 */
146 #endif /* _MP_MP_V1_1_H_ */