mach_mpparse.h 5.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121
  1. #ifndef __ASM_MACH_MPPARSE_H
  2. #define __ASM_MACH_MPPARSE_H
  3. #include <mach_apic.h>
  4. #include <asm/tsc.h>
  5. extern int use_cyclone;
  6. #ifdef CONFIG_X86_SUMMIT_NUMA
  7. extern void setup_summit(void);
  8. #else
  9. #define setup_summit() {}
  10. #endif
  11. static inline void mpc_oem_bus_info(struct mpc_config_bus *m, char *name,
  12. struct mpc_config_translation *translation)
  13. {
  14. Dprintk("Bus #%d is %s\n", m->mpc_busid, name);
  15. }
  16. static inline void mpc_oem_pci_bus(struct mpc_config_bus *m,
  17. struct mpc_config_translation *translation)
  18. {
  19. }
  20. static inline int mps_oem_check(struct mp_config_table *mpc, char *oem,
  21. char *productid)
  22. {
  23. if (!strncmp(oem, "IBM ENSW", 8) &&
  24. (!strncmp(productid, "VIGIL SMP", 9)
  25. || !strncmp(productid, "EXA", 3)
  26. || !strncmp(productid, "RUTHLESS SMP", 12))){
  27. mark_tsc_unstable();
  28. use_cyclone = 1; /*enable cyclone-timer*/
  29. setup_summit();
  30. return 1;
  31. }
  32. return 0;
  33. }
  34. /* Hook from generic ACPI tables.c */
  35. static inline int acpi_madt_oem_check(char *oem_id, char *oem_table_id)
  36. {
  37. if (!strncmp(oem_id, "IBM", 3) &&
  38. (!strncmp(oem_table_id, "SERVIGIL", 8)
  39. || !strncmp(oem_table_id, "EXA", 3))){
  40. mark_tsc_unstable();
  41. use_cyclone = 1; /*enable cyclone-timer*/
  42. setup_summit();
  43. return 1;
  44. }
  45. return 0;
  46. }
  47. struct rio_table_hdr {
  48. unsigned char version; /* Version number of this data structure */
  49. /* Version 3 adds chassis_num & WP_index */
  50. unsigned char num_scal_dev; /* # of Scalability devices (Twisters for Vigil) */
  51. unsigned char num_rio_dev; /* # of RIO I/O devices (Cyclones and Winnipegs) */
  52. } __attribute__((packed));
  53. struct scal_detail {
  54. unsigned char node_id; /* Scalability Node ID */
  55. unsigned long CBAR; /* Address of 1MB register space */
  56. unsigned char port0node; /* Node ID port connected to: 0xFF=None */
  57. unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
  58. unsigned char port1node; /* Node ID port connected to: 0xFF = None */
  59. unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
  60. unsigned char port2node; /* Node ID port connected to: 0xFF = None */
  61. unsigned char port2port; /* Port num port connected to: 0,1,2, or 0xFF=None */
  62. unsigned char chassis_num; /* 1 based Chassis number (1 = boot node) */
  63. } __attribute__((packed));
  64. struct rio_detail {
  65. unsigned char node_id; /* RIO Node ID */
  66. unsigned long BBAR; /* Address of 1MB register space */
  67. unsigned char type; /* Type of device */
  68. unsigned char owner_id; /* For WPEG: Node ID of Cyclone that owns this WPEG*/
  69. /* For CYC: Node ID of Twister that owns this CYC */
  70. unsigned char port0node; /* Node ID port connected to: 0xFF=None */
  71. unsigned char port0port; /* Port num port connected to: 0,1,2, or 0xFF=None */
  72. unsigned char port1node; /* Node ID port connected to: 0xFF=None */
  73. unsigned char port1port; /* Port num port connected to: 0,1,2, or 0xFF=None */
  74. unsigned char first_slot; /* For WPEG: Lowest slot number below this WPEG */
  75. /* For CYC: 0 */
  76. unsigned char status; /* For WPEG: Bit 0 = 1 : the XAPIC is used */
  77. /* = 0 : the XAPIC is not used, ie:*/
  78. /* ints fwded to another XAPIC */
  79. /* Bits1:7 Reserved */
  80. /* For CYC: Bits0:7 Reserved */
  81. unsigned char WP_index; /* For WPEG: WPEG instance index - lower ones have */
  82. /* lower slot numbers/PCI bus numbers */
  83. /* For CYC: No meaning */
  84. unsigned char chassis_num; /* 1 based Chassis number */
  85. /* For LookOut WPEGs this field indicates the */
  86. /* Expansion Chassis #, enumerated from Boot */
  87. /* Node WPEG external port, then Boot Node CYC */
  88. /* external port, then Next Vigil chassis WPEG */
  89. /* external port, etc. */
  90. /* Shared Lookouts have only 1 chassis number (the */
  91. /* first one assigned) */
  92. } __attribute__((packed));
  93. typedef enum {
  94. CompatTwister = 0, /* Compatibility Twister */
  95. AltTwister = 1, /* Alternate Twister of internal 8-way */
  96. CompatCyclone = 2, /* Compatibility Cyclone */
  97. AltCyclone = 3, /* Alternate Cyclone of internal 8-way */
  98. CompatWPEG = 4, /* Compatibility WPEG */
  99. AltWPEG = 5, /* Second Planar WPEG */
  100. LookOutAWPEG = 6, /* LookOut WPEG */
  101. LookOutBWPEG = 7, /* LookOut WPEG */
  102. } node_type;
  103. static inline int is_WPEG(struct rio_detail *rio){
  104. return (rio->type == CompatWPEG || rio->type == AltWPEG ||
  105. rio->type == LookOutAWPEG || rio->type == LookOutBWPEG);
  106. }
  107. #endif /* __ASM_MACH_MPPARSE_H */