2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Structure definitions for SMP machines following the Intel Multiprocessing Specification 1.1 and 1.4.
9 #ifndef __AROS_CPU_MPSPEC_H__
10 #define __AROS_CPU_MPSPEC_H__
12 #ifndef __AROS_CPU_H__
16 /* ADJUSTABLE SETTINGS --------------- */
18 #define MAX_MPC_ENTRY 1024
20 /* a maximum of 16 APICs with the current APIC ID architecture. */
24 /* ----------------------------------- */
27 This tag identifies where the SMP configuration
31 #define SMP_MAGIC_IDENT (('_'<<24)|('P'<<16)|('M'<<8)|'_')
33 struct intel_mp_confblock
35 char mpcf_signature
[4]; /* "_MP_" */
36 unsigned int mpcf_physptr
; /* Configuration table address */
37 unsigned char mpcf_length
; /* Our length (paragraphs) */
38 unsigned char mpcf_specification
; /* Specification version */
39 unsigned char mpcf_checksum
; /* Checksum (makes sum 0) */
40 unsigned char mpcf_feature1
; /* Standard or configuration ? */
41 unsigned char mpcf_feature2
; /* Bit7 set for IMCR|PIC */
42 unsigned char mpcf_feature3
; /* Unused (0) */
43 unsigned char mpcf_feature4
; /* Unused (0) */
44 unsigned char mpcf_feature5
; /* Unused (0) */
47 struct mp_config_table
49 char mpc_signature
[4];
50 unsigned short mpc_length
; /* Size of table */
51 char mpc_spec
; /* 0x01 */
54 char mpc_productid
[12];
55 unsigned int mpc_oemptr
; /* 0 if not present */
56 unsigned short mpc_oemsize
; /* 0 if not present */
57 unsigned short mpc_oemcount
;
58 unsigned int mpc_lapic
; /* APIC address */
59 unsigned int reserved
;
62 #define MPC_SIGNATURE "PCMP"
64 /* Followed by entries */
66 #define MP_PROCESSOR 0
71 #define MP_TRANSLATION 192 /* Used by IBM NUMA-Q to describe node locality */
73 struct mpc_config_processor
75 unsigned char mpc_type
;
76 unsigned char mpc_apicid
; /* Local APIC number */
77 unsigned char mpc_apicver
; /* Its versions */
78 unsigned char mpc_cpuflag
;
79 unsigned int mpc_cpufeature
;
80 unsigned int mpc_featureflag
; /* CPUID feature value */
81 unsigned int mpc_reserved
[2];
84 #define CPU_ENABLED 1 /* Processor is available */
85 #define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
87 #define CPU_STEPPING_MASK 0x0F
88 #define CPU_MODEL_MASK 0xF0
89 #define CPU_FAMILY_MASK 0xF00
93 unsigned char mpc_type
;
94 unsigned char mpc_busid
;
95 unsigned char mpc_bustype
[6] __attribute((packed
));
98 /* List of Bus Type string values, Intel MP Spec. */
100 #define BUSTYPE_EISA "EISA"
101 #define BUSTYPE_ISA "ISA"
102 #define BUSTYPE_INTERN "INTERN" /* Internal BUS */
103 #define BUSTYPE_MCA "MCA"
104 #define BUSTYPE_VL "VL" /* Local bus */
105 #define BUSTYPE_PCI "PCI"
106 #define BUSTYPE_PCMCIA "PCMCIA"
107 #define BUSTYPE_CBUS "CBUS"
108 #define BUSTYPE_CBUSII "CBUSII"
109 #define BUSTYPE_FUTURE "FUTURE"
110 #define BUSTYPE_MBI "MBI"
111 #define BUSTYPE_MBII "MBII"
112 #define BUSTYPE_MPI "MPI"
113 #define BUSTYPE_MPSA "MPSA"
114 #define BUSTYPE_NUBUS "NUBUS"
115 #define BUSTYPE_TC "TC"
116 #define BUSTYPE_VME "VME"
117 #define BUSTYPE_XPRESS "XPRESS"
118 #define BUSTYPE_NEC98 "NEC98"
120 struct mpc_config_ioapic
122 unsigned char mpc_type
;
123 unsigned char mpc_apicid
;
124 unsigned char mpc_apicver
;
125 unsigned char mpc_flags
;
126 unsigned int mpc_apicaddr
;
129 #define MPC_APIC_USABLE 0x01
131 struct mpc_config_intsrc
133 unsigned char mpc_type
;
134 unsigned char mpc_irqtype
;
135 unsigned short mpc_irqflag
;
136 unsigned char mpc_srcbus
;
137 unsigned char mpc_srcbusirq
;
138 unsigned char mpc_dstapic
;
139 unsigned char mpc_dstirq
;
142 enum mp_irq_source_types
{
149 #define MP_IRQDIR_DEFAULT 0
150 #define MP_IRQDIR_HIGH 1
151 #define MP_IRQDIR_LOW 3
154 struct mpc_config_lintsrc
156 unsigned char mpc_type
;
157 unsigned char mpc_irqtype
;
158 unsigned short mpc_irqflag
;
159 unsigned char mpc_srcbusid
;
160 unsigned char mpc_srcbusirq
;
161 unsigned char mpc_destapic
;
162 unsigned char mpc_destapiclint
;
165 #define MP_APIC_ALL 0xFF
167 struct mp_config_oemtable
169 char oem_signature
[4];
170 unsigned short oem_length
; /* Size of table */
171 char oem_rev
; /* 0x01 */
176 #define MPC_OEM_SIGNATURE "_OEM"
178 struct mpc_config_translation
180 unsigned char mpc_type
;
181 unsigned char trans_len
;
182 unsigned char trans_type
;
183 unsigned char trans_quad
;
184 unsigned char trans_global
;
185 unsigned char trans_local
;
186 unsigned short trans_reserved
;
189 #define MAX_IRQ_SOURCES 256
190 #define MAX_MP_BUSSES 32
193 Default configurations
196 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
212 #endif /* __AROS_CPU_MPSPEC_H__ */