]> git.saurik.com Git - apple/xnu.git/blame - osfmk/i386/AT386/mp/mp_v1_1.h
xnu-344.12.2.tar.gz
[apple/xnu.git] / osfmk / i386 / AT386 / mp / mp_v1_1.h
CommitLineData
1c79356b
A
1/*
2 * Copyright (c) 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 * @OSF_COPYRIGHT@
24 */
25
26#ifndef _MP_MP_V1_1_H_
27#define _MP_MP_V1_1_H_
28
29#include <mach/mach_types.h>
30#include <i386/apic.h>
31#include <kern/lock.h>
32
33struct 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];
41};
42
43/* Entry types */
44
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 */
50
51struct MP_Config_EntryB {
52 unsigned char Entry_Type;
53 unsigned char Bus_Id;
54 char Ident[6];
55};
56
57struct 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;
63};
64
65struct 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;
73};
74struct 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;
82};
83
84struct MP_FPS_struct {
85 unsigned int Signature;
86 vm_offset_t Config_Ptr;
87 unsigned char Length;
88 unsigned char Spec_Rev;
89 unsigned char CheckSum;
90 unsigned char Feature[5];
91};
92
93struct MP_Config_Table {
94 unsigned int Signature;
95 unsigned short Length;
96 unsigned char Spec_Rev;
97 unsigned char CheckSum;
98 char OEM[8];
99 char PROD[12];
100 vm_offset_t OEM_Ptr;
101 unsigned short OEM_Size;
102 unsigned short Entries;
103 vm_offset_t Local_Apic;
104 unsigned int Reserved;
105};
106
107#define IMCR_ADDRESS 0x22
108#define IMCR_DATA 0x23
109#define IMCR_SELECT 0x70
110#define IMCR_APIC_ENABLE 0x01
111
112#if 0
113extern boolean_t mp_v1_1_take_irq(int pic,
114 int unit,
115 int spl,
116 i386_intr_t intr);
117
118extern boolean_t mp_v1_1_reset_irq(int pic,
119 int *unit,
120 int *spl,
121 i386_intr_t *intr);
122
123#endif
124
125void mp_v1_1_init(void);
126boolean_t mp_v1_1_io_lock(int, struct processor **);
127void mp_v1_1_io_unlock(struct processor *);
128
129/* Intel default Configurations */
130
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
139
140#if NCPUS > 1
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 */
145
146#endif /* _MP_MP_V1_1_H_ */