mpspec_def.h 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186
  1. #ifndef __ASM_MPSPEC_DEF_H
  2. #define __ASM_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. #define MAX_MPC_ENTRY 1024
  13. #define MAX_APICS 256
  14. struct intel_mp_floating
  15. {
  16. char mpf_signature[4]; /* "_MP_" */
  17. unsigned long mpf_physptr; /* Configuration table address */
  18. unsigned char mpf_length; /* Our length (paragraphs) */
  19. unsigned char mpf_specification;/* Specification version */
  20. unsigned char mpf_checksum; /* Checksum (makes sum 0) */
  21. unsigned char mpf_feature1; /* Standard or configuration ? */
  22. unsigned char mpf_feature2; /* Bit7 set for IMCR|PIC */
  23. unsigned char mpf_feature3; /* Unused (0) */
  24. unsigned char mpf_feature4; /* Unused (0) */
  25. unsigned char mpf_feature5; /* Unused (0) */
  26. };
  27. struct mp_config_table
  28. {
  29. char mpc_signature[4];
  30. #define MPC_SIGNATURE "PCMP"
  31. unsigned short mpc_length; /* Size of table */
  32. char mpc_spec; /* 0x01 */
  33. char mpc_checksum;
  34. char mpc_oem[8];
  35. char mpc_productid[12];
  36. unsigned long mpc_oemptr; /* 0 if not present */
  37. unsigned short mpc_oemsize; /* 0 if not present */
  38. unsigned short mpc_oemcount;
  39. unsigned long mpc_lapic; /* APIC address */
  40. unsigned long 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. #define MP_TRANSLATION 192 /* Used by IBM NUMA-Q to describe node locality */
  49. struct mpc_config_processor
  50. {
  51. unsigned char mpc_type;
  52. unsigned char mpc_apicid; /* Local APIC number */
  53. unsigned char mpc_apicver; /* Its versions */
  54. unsigned char mpc_cpuflag;
  55. #define CPU_ENABLED 1 /* Processor is available */
  56. #define CPU_BOOTPROCESSOR 2 /* Processor is the BP */
  57. unsigned long mpc_cpufeature;
  58. #define CPU_STEPPING_MASK 0x0F
  59. #define CPU_MODEL_MASK 0xF0
  60. #define CPU_FAMILY_MASK 0xF00
  61. unsigned long mpc_featureflag; /* CPUID feature value */
  62. unsigned long mpc_reserved[2];
  63. };
  64. struct mpc_config_bus
  65. {
  66. unsigned char mpc_type;
  67. unsigned char mpc_busid;
  68. unsigned char mpc_bustype[6];
  69. };
  70. /* List of Bus Type string values, Intel MP Spec. */
  71. #define BUSTYPE_EISA "EISA"
  72. #define BUSTYPE_ISA "ISA"
  73. #define BUSTYPE_INTERN "INTERN" /* Internal BUS */
  74. #define BUSTYPE_MCA "MCA"
  75. #define BUSTYPE_VL "VL" /* Local bus */
  76. #define BUSTYPE_PCI "PCI"
  77. #define BUSTYPE_PCMCIA "PCMCIA"
  78. #define BUSTYPE_CBUS "CBUS"
  79. #define BUSTYPE_CBUSII "CBUSII"
  80. #define BUSTYPE_FUTURE "FUTURE"
  81. #define BUSTYPE_MBI "MBI"
  82. #define BUSTYPE_MBII "MBII"
  83. #define BUSTYPE_MPI "MPI"
  84. #define BUSTYPE_MPSA "MPSA"
  85. #define BUSTYPE_NUBUS "NUBUS"
  86. #define BUSTYPE_TC "TC"
  87. #define BUSTYPE_VME "VME"
  88. #define BUSTYPE_XPRESS "XPRESS"
  89. struct mpc_config_ioapic
  90. {
  91. unsigned char mpc_type;
  92. unsigned char mpc_apicid;
  93. unsigned char mpc_apicver;
  94. unsigned char mpc_flags;
  95. #define MPC_APIC_USABLE 0x01
  96. unsigned long mpc_apicaddr;
  97. };
  98. struct mpc_config_intsrc
  99. {
  100. unsigned char mpc_type;
  101. unsigned char mpc_irqtype;
  102. unsigned short mpc_irqflag;
  103. unsigned char mpc_srcbus;
  104. unsigned char mpc_srcbusirq;
  105. unsigned char mpc_dstapic;
  106. unsigned char mpc_dstirq;
  107. };
  108. enum mp_irq_source_types {
  109. mp_INT = 0,
  110. mp_NMI = 1,
  111. mp_SMI = 2,
  112. mp_ExtINT = 3
  113. };
  114. #define MP_IRQDIR_DEFAULT 0
  115. #define MP_IRQDIR_HIGH 1
  116. #define MP_IRQDIR_LOW 3
  117. struct mpc_config_lintsrc
  118. {
  119. unsigned char mpc_type;
  120. unsigned char mpc_irqtype;
  121. unsigned short mpc_irqflag;
  122. unsigned char mpc_srcbusid;
  123. unsigned char mpc_srcbusirq;
  124. unsigned char mpc_destapic;
  125. #define MP_APIC_ALL 0xFF
  126. unsigned char mpc_destapiclint;
  127. };
  128. struct mp_config_oemtable
  129. {
  130. char oem_signature[4];
  131. #define MPC_OEM_SIGNATURE "_OEM"
  132. unsigned short oem_length; /* Size of table */
  133. char oem_rev; /* 0x01 */
  134. char oem_checksum;
  135. char mpc_oem[8];
  136. };
  137. struct mpc_config_translation
  138. {
  139. unsigned char mpc_type;
  140. unsigned char trans_len;
  141. unsigned char trans_type;
  142. unsigned char trans_quad;
  143. unsigned char trans_global;
  144. unsigned char trans_local;
  145. unsigned short trans_reserved;
  146. };
  147. /*
  148. * Default configurations
  149. *
  150. * 1 2 CPU ISA 82489DX
  151. * 2 2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining
  152. * 3 2 CPU EISA 82489DX
  153. * 4 2 CPU MCA 82489DX
  154. * 5 2 CPU ISA+PCI
  155. * 6 2 CPU EISA+PCI
  156. * 7 2 CPU MCA+PCI
  157. */
  158. enum mp_bustype {
  159. MP_BUS_ISA = 1,
  160. MP_BUS_EISA,
  161. MP_BUS_PCI,
  162. MP_BUS_MCA,
  163. };
  164. #endif