mpspec_def.h 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. #ifndef _ASM_X86_MPSPEC_DEF_H
  2. #define _ASM_X86_MPSPEC_DEF_H
  3. /*
  4. * Structure definitions for SMP machines following the
  5. * Intel Multiprocessing Specification 1.1 and 1.4.
  6. */
  7. /*
  8. * This tag identifies where the SMP configuration
  9. * information is.
  10. */
  11. #define SMP_MAGIC_IDENT (('_'<<24) | ('P'<<16) | ('M'<<8) | '_')
  12. #ifdef CONFIG_X86_32
  13. # define MAX_MPC_ENTRY 1024
  14. #endif
  15. /* Intel MP Floating Pointer Structure */
  16. struct mpf_intel {
  17. char signature[4]; /* "_MP_" */
  18. unsigned int physptr; /* Configuration table address */
  19. unsigned char length; /* Our length (paragraphs) */
  20. unsigned char specification; /* Specification version */
  21. unsigned char checksum; /* Checksum (makes sum 0) */
  22. unsigned char feature1; /* Standard or configuration ? */
  23. unsigned char feature2; /* Bit7 set for IMCR|PIC */
  24. unsigned char feature3; /* Unused (0) */
  25. unsigned char feature4; /* Unused (0) */
  26. unsigned char feature5; /* Unused (0) */
  27. };
  28. #define MPC_SIGNATURE "PCMP"
  29. struct mpc_table {
  30. char signature[4];
  31. unsigned short length; /* Size of table */
  32. char spec; /* 0x01 */
  33. char checksum;
  34. char oem[8];
  35. char productid[12];
  36. unsigned int oemptr; /* 0 if not present */
  37. unsigned short oemsize; /* 0 if not present */
  38. unsigned short oemcount;
  39. unsigned int lapic; /* APIC address */
  40. unsigned int reserved;
  41. };
  42. /* Followed by entries */
  43. #define MP_PROCESSOR 0
  44. #define MP_BUS 1
  45. #define MP_IOAPIC 2
  46. #define MP_INTSRC 3
  47. #define MP_LINTSRC 4
  48. /* Used by IBM NUMA-Q to describe node locality */
  49. #define MP_TRANSLATION 192
  50. #define CPU_ENABLED 1 /* Processor is available */
  51. #define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
  52. #define CPU_STEPPING_MASK 0x000F
  53. #define CPU_MODEL_MASK 0x00F0
  54. #define CPU_FAMILY_MASK 0x0F00
  55. struct mpc_cpu {
  56. unsigned char type;
  57. unsigned char apicid; /* Local APIC number */
  58. unsigned char apicver; /* Its versions */
  59. unsigned char cpuflag;
  60. unsigned int cpufeature;
  61. unsigned int featureflag; /* CPUID feature value */
  62. unsigned int reserved[2];
  63. };
  64. struct mpc_bus {
  65. unsigned char type;
  66. unsigned char busid;
  67. unsigned char bustype[6];
  68. };
  69. /* List of Bus Type string values, Intel MP Spec. */
  70. #define BUSTYPE_EISA "EISA"
  71. #define BUSTYPE_ISA "ISA"
  72. #define BUSTYPE_INTERN "INTERN" /* Internal BUS */
  73. #define BUSTYPE_MCA "MCA"
  74. #define BUSTYPE_VL "VL" /* Local bus */
  75. #define BUSTYPE_PCI "PCI"
  76. #define BUSTYPE_PCMCIA "PCMCIA"
  77. #define BUSTYPE_CBUS "CBUS"
  78. #define BUSTYPE_CBUSII "CBUSII"
  79. #define BUSTYPE_FUTURE "FUTURE"
  80. #define BUSTYPE_MBI "MBI"
  81. #define BUSTYPE_MBII "MBII"
  82. #define BUSTYPE_MPI "MPI"
  83. #define BUSTYPE_MPSA "MPSA"
  84. #define BUSTYPE_NUBUS "NUBUS"
  85. #define BUSTYPE_TC "TC"
  86. #define BUSTYPE_VME "VME"
  87. #define BUSTYPE_XPRESS "XPRESS"
  88. #define MPC_APIC_USABLE 0x01
  89. struct mpc_ioapic {
  90. unsigned char type;
  91. unsigned char apicid;
  92. unsigned char apicver;
  93. unsigned char flags;
  94. unsigned int apicaddr;
  95. };
  96. struct mpc_intsrc {
  97. unsigned char type;
  98. unsigned char irqtype;
  99. unsigned short irqflag;
  100. unsigned char srcbus;
  101. unsigned char srcbusirq;
  102. unsigned char dstapic;
  103. unsigned char dstirq;
  104. };
  105. enum mp_irq_source_types {
  106. mp_INT = 0,
  107. mp_NMI = 1,
  108. mp_SMI = 2,
  109. mp_ExtINT = 3
  110. };
  111. #define MP_IRQDIR_DEFAULT 0
  112. #define MP_IRQDIR_HIGH 1
  113. #define MP_IRQDIR_LOW 3
  114. #define MP_APIC_ALL 0xFF
  115. struct mpc_lintsrc {
  116. unsigned char type;
  117. unsigned char irqtype;
  118. unsigned short irqflag;
  119. unsigned char srcbusid;
  120. unsigned char srcbusirq;
  121. unsigned char destapic;
  122. unsigned char destapiclint;
  123. };
  124. #define MPC_OEM_SIGNATURE "_OEM"
  125. struct mpc_oemtable {
  126. char signature[4];
  127. unsigned short length; /* Size of table */
  128. char rev; /* 0x01 */
  129. char checksum;
  130. char mpc[8];
  131. };
  132. /*
  133. * Default configurations
  134. *
  135. * 1 2 CPU ISA 82489DX
  136. * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
  137. * 3 2 CPU EISA 82489DX
  138. * 4 2 CPU MCA 82489DX
  139. * 5 2 CPU ISA+PCI
  140. * 6 2 CPU EISA+PCI
  141. * 7 2 CPU MCA+PCI
  142. */
  143. enum mp_bustype {
  144. MP_BUS_ISA = 1,
  145. MP_BUS_EISA,
  146. MP_BUS_PCI,
  147. MP_BUS_MCA,
  148. };
  149. #endif /* _ASM_X86_MPSPEC_DEF_H */