mpspec_def.h 4.4 KB

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