mpspec_def.h 4.2 KB

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