mpparse.h 5.1 KB

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