mach_mpparse.h 5.1 KB

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