Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenmps.h
Go to the documentation of this file.
00001 #pragma once 00002 00003 /* 00004 * FIXME: This does not work if we have more than 24 IRQs (ie. more than one 00005 * I/O APIC) 00006 */ 00007 #define IRQL2VECTOR(irql) (IRQ2VECTOR(PROFILE_LEVEL - (irql))) 00008 00009 #define IRQL2TPR(irql) ((irql) >= IPI_LEVEL ? IPI_VECTOR : ((irql) >= PROFILE_LEVEL ? LOCAL_TIMER_VECTOR : ((irql) > DISPATCH_LEVEL ? IRQL2VECTOR(irql) : 0))) 00010 00011 typedef struct _KIRQ_TRAPFRAME 00012 { 00013 ULONG Magic; 00014 ULONG Gs; 00015 ULONG Fs; 00016 ULONG Es; 00017 ULONG Ds; 00018 ULONG Eax; 00019 ULONG Ecx; 00020 ULONG Edx; 00021 ULONG Ebx; 00022 ULONG Esp; 00023 ULONG Ebp; 00024 ULONG Esi; 00025 ULONG Edi; 00026 ULONG Eip; 00027 ULONG Cs; 00028 ULONG Eflags; 00029 } KIRQ_TRAPFRAME, *PKIRQ_TRAPFRAME; 00030 00031 #if 0 00032 /* This values are defined in halirql.h */ 00033 #define FIRST_DEVICE_VECTOR 0x30 00034 #define FIRST_SYSTEM_VECTOR 0xEF 00035 #endif 00036 00037 #define NUMBER_DEVICE_VECTORS (FIRST_SYSTEM_VECTOR - FIRST_DEVICE_VECTOR) 00038 00039 00040 /* MP Floating Pointer Structure */ 00041 #define MPF_SIGNATURE (('_' << 24) | ('P' << 16) | ('M' << 8) | '_') 00042 00043 #include <pshpack1.h> 00044 typedef struct _MP_FLOATING_POINTER 00045 { 00046 ULONG Signature; /* _MP_ */ 00047 ULONG Address; /* Physical Address Pointer (0 means no configuration table exist) */ 00048 UCHAR Length; /* Structure length in 16-byte paragraphs */ 00049 UCHAR Specification; /* Specification revision */ 00050 UCHAR Checksum; /* Checksum */ 00051 UCHAR Feature1; /* MP System Configuration Type */ 00052 UCHAR Feature2; /* Bit 7 set for IMCR|PIC */ 00053 UCHAR Feature3; /* Unused (0) */ 00054 UCHAR Feature4; /* Unused (0) */ 00055 UCHAR Feature5; /* Unused (0) */ 00056 } MP_FLOATING_POINTER, *PMP_FLOATING_POINTER; 00057 00058 00059 #define FEATURE2_IMCRP 0x80 00060 00061 /* MP Configuration Table Header */ 00062 #define MPC_SIGNATURE (('P' << 24) | ('M' << 16) | ('C' << 8) | 'P') 00063 00064 typedef struct _MP_CONFIGURATION_TABLE 00065 { 00066 ULONG Signature; /* PCMP */ 00067 USHORT Length; /* Size of configuration table */ 00068 CHAR Specification; /* Specification Revision */ 00069 CHAR Checksum; /* Checksum */ 00070 CHAR Oem[8]; /* OEM ID */ 00071 CHAR ProductId[12]; /* Product ID */ 00072 ULONG OemTable; /* 0 if not present */ 00073 USHORT OemTableSize; /* 0 if not present */ 00074 USHORT EntryCount; /* Number of entries */ 00075 ULONG LocalAPICAddress; /* Local APIC address */ 00076 USHORT ExtTableLength; /* Extended Table Length */ 00077 UCHAR ExtTableChecksum; /* Extended Table Checksum */ 00078 UCHAR Reserved; /* Reserved */ 00079 } MP_CONFIGURATION_TABLE, *PMP_CONFIGURATION_TABLE; 00080 00081 /* MP Configuration Table Entries */ 00082 #define MPCTE_PROCESSOR 0 /* One entry per processor */ 00083 #define MPCTE_BUS 1 /* One entry per bus */ 00084 #define MPCTE_IOAPIC 2 /* One entry per I/O APIC */ 00085 #define MPCTE_INTSRC 3 /* One entry per bus interrupt source */ 00086 #define MPCTE_LINTSRC 4 /* One entry per system interrupt source */ 00087 00088 00089 typedef struct _MP_CONFIGURATION_PROCESSOR 00090 { 00091 UCHAR Type; /* 0 */ 00092 UCHAR ApicId; /* Local APIC ID for the processor */ 00093 UCHAR ApicVersion; /* Local APIC version */ 00094 UCHAR CpuFlags; /* CPU flags */ 00095 ULONG CpuSignature; /* CPU signature */ 00096 ULONG FeatureFlags; /* CPUID feature value */ 00097 ULONG Reserved[2]; /* Reserved (0) */ 00098 } MP_CONFIGURATION_PROCESSOR, *PMP_CONFIGURATION_PROCESSOR; 00099 00100 00101 00102 typedef struct _MP_CONFIGURATION_BUS 00103 { 00104 UCHAR Type; /* 1 */ 00105 UCHAR BusId; /* Bus ID */ 00106 CHAR BusType[6]; /* Bus type */ 00107 } MP_CONFIGURATION_BUS, *PMP_CONFIGURATION_BUS; 00108 00109 #define MAX_BUS 32 00110 00111 #define MP_BUS_ISA 1 00112 #define MP_BUS_EISA 2 00113 #define MP_BUS_PCI 3 00114 #define MP_BUS_MCA 4 00115 00116 #define BUSTYPE_EISA "EISA" 00117 #define BUSTYPE_ISA "ISA" 00118 #define BUSTYPE_INTERN "INTERN" /* Internal BUS */ 00119 #define BUSTYPE_MCA "MCA" 00120 #define BUSTYPE_VL "VL" /* Local bus */ 00121 #define BUSTYPE_PCI "PCI" 00122 #define BUSTYPE_PCMCIA "PCMCIA" 00123 #define BUSTYPE_CBUS "CBUS" 00124 #define BUSTYPE_CBUSII "CBUSII" 00125 #define BUSTYPE_FUTURE "FUTURE" 00126 #define BUSTYPE_MBI "MBI" 00127 #define BUSTYPE_MBII "MBII" 00128 #define BUSTYPE_MPI "MPI" 00129 #define BUSTYPE_MPSA "MPSA" 00130 #define BUSTYPE_NUBUS "NUBUS" 00131 #define BUSTYPE_TC "TC" 00132 #define BUSTYPE_VME "VME" 00133 #define BUSTYPE_XPRESS "XPRESS" 00134 00135 00136 typedef struct _MP_CONFIGURATION_IOAPIC 00137 { 00138 UCHAR Type; /* 2 */ 00139 UCHAR ApicId; /* I/O APIC ID */ 00140 UCHAR ApicVersion; /* I/O APIC version */ 00141 UCHAR ApicFlags; /* I/O APIC flags */ 00142 ULONG ApicAddress; /* I/O APIC base address */ 00143 } MP_CONFIGURATION_IOAPIC, *PMP_CONFIGURATION_IOAPIC; 00144 00145 #define MAX_IOAPIC 2 00146 00147 #define MP_IOAPIC_USABLE 0x01 00148 00149 00150 typedef struct _MP_CONFIGURATION_INTSRC 00151 { 00152 UCHAR Type; /* 3 */ 00153 UCHAR IrqType; /* Interrupt type */ 00154 USHORT IrqFlag; /* Interrupt flags */ 00155 UCHAR SrcBusId; /* Source bus ID */ 00156 UCHAR SrcBusIrq; /* Source bus interrupt */ 00157 UCHAR DstApicId; /* Destination APIC ID */ 00158 UCHAR DstApicInt; /* Destination interrupt */ 00159 } MP_CONFIGURATION_INTSRC, *PMP_CONFIGURATION_INTSRC; 00160 00161 #define MAX_IRQ_SOURCE 128 00162 00163 #define INT_VECTORED 0 00164 #define INT_NMI 1 00165 #define INT_SMI 2 00166 #define INT_EXTINT 3 00167 00168 #define IRQDIR_DEFAULT 0 00169 #define IRQDIR_HIGH 1 00170 #define IRQDIR_LOW 3 00171 00172 00173 typedef struct _MP_CONFIGURATION_INTLOCAL 00174 { 00175 UCHAR Type; /* 4 */ 00176 UCHAR IrqType; /* Interrupt type */ 00177 USHORT IrqFlag; /* Interrupt flags */ 00178 UCHAR SrcBusId; /* Source bus ID */ 00179 UCHAR SrcBusIrq; /* Source bus interrupt */ 00180 UCHAR DstApicId; /* Destination local APIC ID */ 00181 UCHAR DstApicLInt; /* Destination local APIC interrupt */ 00182 } MP_CONFIGURATION_INTLOCAL, *PMP_CONFIGURATION_INTLOCAL; 00183 #include <poppack.h> 00184 00185 #define MP_APIC_ALL 0xFF 00186 00187 #define CPU_FLAG_ENABLED 1 /* Processor is available */ 00188 #define CPU_FLAG_BSP 2 /* Processor is the bootstrap processor */ 00189 00190 #define CPU_STEPPING_MASK 0x0F 00191 #define CPU_MODEL_MASK 0xF0 00192 #define CPU_FAMILY_MASK 0xF00 00193 00194 #define PIC_IRQS 16 00195 00196 /* Prototypes */ 00197 00198 VOID HalpInitMPS(VOID); 00199 00200 /* EOF */ Generated on Fri May 25 2012 04:26:57 for ReactOS by
1.7.6.1
|