6 #define MPPTR_IDENT ('_'|('M'<<8)|('P'<<16)|('_'<<24))
7 #define MPTABLE_IDENT ('P'|('C'<<8)|('M'<<16)|('P'<<24))
9 typedef struct sMPInfo {
15 Uint8 Features[5]; // 2-4 are unused
18 typedef union uMPTable_Ent {
24 Uint8 CPUFlags; // bit 0: Enabled, bit 1: Boot Processor
25 Uint32 CPUSignature; // Stepping, Model, Family
28 } __attribute__((packed)) Proc; // 0x00
33 } __attribute__((packed)) Bus; // 0x01
38 Uint8 Flags; // bit 0: Enabled
40 } __attribute__((packed)) IOAPIC; // 0x02
44 Uint16 Flags; // 0,1: Polarity, 2,3: Trigger Mode
49 } __attribute__((packed)) IOInt;
53 Uint16 Flags; // 0,1: Polarity, 2,3: Trigger Mode
56 Uint8 DestLocalAPICID;
57 Uint8 DestLocalAPICIRQ;
58 } __attribute__((packed)) LocalInt;
59 } __attribute__((packed)) tMPTable_Ent;
61 typedef struct sMPTable {
63 Uint16 BaseTableLength;
74 Uint32 LocalAPICMemMap; //!< Address used to access the local APIC
75 Uint16 ExtendedTableLen;
76 Uint8 ExtendedTableChecksum;
79 tMPTable_Ent Entries[];
82 typedef volatile struct {
98 typedef volatile struct {
103 tReg TPR; // Task Priority Register
104 tReg APR; // Arbitration Priority Register (RO)
105 tReg PPR; // Processor Priority Register (RO)
106 tReg EOI; // EOI Register (Write Only)
108 tReg LogDest; // Logical Destination Register
109 tReg DestFmt; // Destination Format Register (0-27: RO, 28-31: RW)
110 tReg SIV; // Spurious Interrupt Vector Register (0-8: RW, 9-31: RO)
111 tReg ISR[8]; // In-Service Register - Total 256 Bits (RO)
112 tReg TMR[8]; // Trigger Mode Register - Total 256 Bits (RO)
113 tReg IRR[8]; // Interrupt Request Register - Total 256 Bits (RO)
114 tReg ErrorStatus; // Error Status Register (RO)
116 tReg LVTCMI; // LVT CMI Registers
118 tReg ICR[2]; // Interrupt Command Register (RW)
119 // LVT Registers (Controls Local Vector Table)
121 // 0-7: Vector - IDT Vector for the interrupt
122 // 12: Delivery Status (0: Idle, 1: Send Pending)
123 // 16: Mask (0: Enabled, 1: Disabled)
125 tReg LVTTimer; // LVT Timer Register (RW)
126 tReg LVTThermalSensor; // LVT Thermal Sensor Register (RW)
127 tReg LVTPerfMonCounters; // LVT Performance Monitor Counters Register (RW)
128 tReg LVTLInt0; // LVT Local Interrupt (LINT) #0 Register (RW);
129 tReg LVTLInt1; // LVT Local Interrupt (LINT) #1 Register (RW);
130 tReg LVTError; // LVT Error Register (RW);
132 tReg InitialCount; // Initial Count Register (Used for the timer) (RW)
133 tReg CurrentCount; // Current Count Register (Used for the timer) (RW)
136 tReg DivideConifg; // Divide Configuration Register (RW)