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