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