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