xref: /xv6-public/mp.h (revision 74c77da6)
199b11b6cSrsc // See MultiProcessor Specification Version 1.[14]
221a88fd4Skaashoek 
3f5527388Srsc struct mp {             // floating pointer
4f5527388Srsc   uchar signature[4];           // "_MP_"
50cfc7290Srsc   void *physaddr;               // phys addr of MP config table
6f5527388Srsc   uchar length;                 // 1
7f5527388Srsc   uchar specrev;                // [14]
8f5527388Srsc   uchar checksum;               // all bytes must add up to 0
90cfc7290Srsc   uchar type;                   // MP system config type
1029270816Srtm   uchar imcrp;
1129270816Srtm   uchar reserved[3];
127baa34a4Skaashoek };
137baa34a4Skaashoek 
1499b11b6cSrsc struct mpconf {         // configuration table header
15f5527388Srsc   uchar signature[4];           // "PCMP"
16f5527388Srsc   ushort length;                // total table length
17f5527388Srsc   uchar version;                // [14]
18f5527388Srsc   uchar checksum;               // all bytes must add up to 0
19f5527388Srsc   uchar product[20];            // product id
20f5527388Srsc   uint *oemtable;               // OEM table pointer
21f5527388Srsc   ushort oemlength;             // OEM table length
22f5527388Srsc   ushort entry;                 // entry count
23f5527388Srsc   uint *lapicaddr;              // address of local APIC
24f5527388Srsc   ushort xlength;               // extended table length
25f5527388Srsc   uchar xchecksum;              // extended table checksum
2629270816Srtm   uchar reserved;
277baa34a4Skaashoek };
287baa34a4Skaashoek 
2999b11b6cSrsc struct mpproc {         // processor table entry
30f5527388Srsc   uchar type;                   // entry type (0)
31f5527388Srsc   uchar apicid;                 // local APIC id
32f5527388Srsc   uchar version;                // local APIC verison
33f5527388Srsc   uchar flags;                  // CPU flags
3499b11b6cSrsc     #define MPBOOT 0x02           // This proc is the bootstrap processor.
35f5527388Srsc   uchar signature[4];           // CPU signature
36f5527388Srsc   uint feature;                 // feature flags from CPUID instruction
3729270816Srtm   uchar reserved[8];
387baa34a4Skaashoek };
397baa34a4Skaashoek 
40f5527388Srsc struct mpioapic {       // I/O APIC table entry
41f5527388Srsc   uchar type;                   // entry type (2)
42f5527388Srsc   uchar apicno;                 // I/O APIC id
43f5527388Srsc   uchar version;                // I/O APIC version
44f5527388Srsc   uchar flags;                  // I/O APIC flags
45f5527388Srsc   uint *addr;                  // I/O APIC address
467baa34a4Skaashoek };
477baa34a4Skaashoek 
4899b11b6cSrsc // Table entry types
4999b11b6cSrsc #define MPPROC    0x00  // One per processor
5099b11b6cSrsc #define MPBUS     0x01  // One per bus
5199b11b6cSrsc #define MPIOAPIC  0x02  // One per I/O APIC
5299b11b6cSrsc #define MPIOINTR  0x03  // One per bus interrupt source
5399b11b6cSrsc #define MPLINTR   0x04  // One per system interrupt source
547baa34a4Skaashoek 
55*74c77da6SFrans Kaashoek //PAGEBREAK!
56*74c77da6SFrans Kaashoek // Blank page.
57