| 
									
										
										
										
											2008-10-22 22:26:29 -07:00
										 |  |  | #ifndef _ASM_X86_MPSPEC_DEF_H
 | 
					
						
							|  |  |  | #define _ASM_X86_MPSPEC_DEF_H
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * Structure definitions for SMP machines following the | 
					
						
							|  |  |  |  * Intel Multiprocessing Specification 1.1 and 1.4. | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  * This tag identifies where the SMP configuration | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  |  * information is. | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  |  */ | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-03-23 01:02:48 -07:00
										 |  |  | #define SMP_MAGIC_IDENT	(('_'<<24) | ('P'<<16) | ('M'<<8) | '_')
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #ifdef CONFIG_X86_32
 | 
					
						
							|  |  |  | # define MAX_MPC_ENTRY 1024
 | 
					
						
							|  |  |  | #endif
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-08 15:42:46 +05:30
										 |  |  | /* Intel MP Floating Pointer Structure */ | 
					
						
							|  |  |  | struct mpf_intel { | 
					
						
							| 
									
										
										
										
											2009-01-08 15:43:26 +05:30
										 |  |  | 	char signature[4];		/* "_MP_"			*/ | 
					
						
							|  |  |  | 	unsigned int physptr;		/* Configuration table address	*/ | 
					
						
							|  |  |  | 	unsigned char length;		/* Our length (paragraphs)	*/ | 
					
						
							|  |  |  | 	unsigned char specification;	/* Specification version	*/ | 
					
						
							|  |  |  | 	unsigned char checksum;		/* Checksum (makes sum 0)	*/ | 
					
						
							|  |  |  | 	unsigned char feature1;		/* Standard or configuration ?	*/ | 
					
						
							|  |  |  | 	unsigned char feature2;		/* Bit7 set for IMCR|PIC	*/ | 
					
						
							|  |  |  | 	unsigned char feature3;		/* Unused (0)			*/ | 
					
						
							|  |  |  | 	unsigned char feature4;		/* Unused (0)			*/ | 
					
						
							|  |  |  | 	unsigned char feature5;		/* Unused (0)			*/ | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #define MPC_SIGNATURE "PCMP"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:46:57 +05:30
										 |  |  | struct mpc_table { | 
					
						
							| 
									
										
										
										
											2009-01-04 22:22:56 +05:30
										 |  |  | 	char signature[4]; | 
					
						
							|  |  |  | 	unsigned short length;		/* Size of table */ | 
					
						
							|  |  |  | 	char spec;			/* 0x01 */ | 
					
						
							|  |  |  | 	char checksum; | 
					
						
							|  |  |  | 	char oem[8]; | 
					
						
							|  |  |  | 	char productid[12]; | 
					
						
							|  |  |  | 	unsigned int oemptr;		/* 0 if not present */ | 
					
						
							|  |  |  | 	unsigned short oemsize;		/* 0 if not present */ | 
					
						
							|  |  |  | 	unsigned short oemcount; | 
					
						
							|  |  |  | 	unsigned int lapic;		/* APIC address */ | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | 	unsigned int reserved; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* Followed by entries */ | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #define	MP_PROCESSOR		0
 | 
					
						
							|  |  |  | #define	MP_BUS			1
 | 
					
						
							|  |  |  | #define	MP_IOAPIC		2
 | 
					
						
							|  |  |  | #define	MP_INTSRC		3
 | 
					
						
							|  |  |  | #define	MP_LINTSRC		4
 | 
					
						
							|  |  |  | /* Used by IBM NUMA-Q to describe node locality */ | 
					
						
							|  |  |  | #define	MP_TRANSLATION		192
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define CPU_ENABLED		1	/* Processor is available */
 | 
					
						
							|  |  |  | #define CPU_BOOTPROCESSOR	2	/* Processor is the BP */
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define CPU_STEPPING_MASK	0x000F
 | 
					
						
							|  |  |  | #define CPU_MODEL_MASK		0x00F0
 | 
					
						
							|  |  |  | #define CPU_FAMILY_MASK		0x0F00
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:48:52 +05:30
										 |  |  | struct mpc_cpu { | 
					
						
							| 
									
										
										
										
											2009-01-04 21:58:25 +05:30
										 |  |  | 	unsigned char type; | 
					
						
							|  |  |  | 	unsigned char apicid;		/* Local APIC number */ | 
					
						
							|  |  |  | 	unsigned char apicver;		/* Its versions */ | 
					
						
							|  |  |  | 	unsigned char cpuflag; | 
					
						
							|  |  |  | 	unsigned int cpufeature; | 
					
						
							|  |  |  | 	unsigned int featureflag;	/* CPUID feature value */ | 
					
						
							|  |  |  | 	unsigned int reserved[2]; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:47:32 +05:30
										 |  |  | struct mpc_bus { | 
					
						
							| 
									
										
										
										
											2009-01-04 21:59:26 +05:30
										 |  |  | 	unsigned char type; | 
					
						
							|  |  |  | 	unsigned char busid; | 
					
						
							|  |  |  | 	unsigned char bustype[6]; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /* List of Bus Type string values, Intel MP Spec. */ | 
					
						
							|  |  |  | #define BUSTYPE_EISA	"EISA"
 | 
					
						
							|  |  |  | #define BUSTYPE_ISA	"ISA"
 | 
					
						
							|  |  |  | #define BUSTYPE_INTERN	"INTERN"	/* Internal BUS */
 | 
					
						
							| 
									
										
										
										
											2012-05-17 19:06:13 -04:00
										 |  |  | #define BUSTYPE_MCA	"MCA"		/* Obsolete */
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | #define BUSTYPE_VL	"VL"		/* Local bus */
 | 
					
						
							|  |  |  | #define BUSTYPE_PCI	"PCI"
 | 
					
						
							|  |  |  | #define BUSTYPE_PCMCIA	"PCMCIA"
 | 
					
						
							|  |  |  | #define BUSTYPE_CBUS	"CBUS"
 | 
					
						
							|  |  |  | #define BUSTYPE_CBUSII	"CBUSII"
 | 
					
						
							|  |  |  | #define BUSTYPE_FUTURE	"FUTURE"
 | 
					
						
							|  |  |  | #define BUSTYPE_MBI	"MBI"
 | 
					
						
							|  |  |  | #define BUSTYPE_MBII	"MBII"
 | 
					
						
							|  |  |  | #define BUSTYPE_MPI	"MPI"
 | 
					
						
							|  |  |  | #define BUSTYPE_MPSA	"MPSA"
 | 
					
						
							|  |  |  | #define BUSTYPE_NUBUS	"NUBUS"
 | 
					
						
							|  |  |  | #define BUSTYPE_TC	"TC"
 | 
					
						
							|  |  |  | #define BUSTYPE_VME	"VME"
 | 
					
						
							|  |  |  | #define BUSTYPE_XPRESS	"XPRESS"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #define MPC_APIC_USABLE		0x01
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:49:57 +05:30
										 |  |  | struct mpc_ioapic { | 
					
						
							| 
									
										
										
										
											2009-01-04 21:54:39 +05:30
										 |  |  | 	unsigned char type; | 
					
						
							|  |  |  | 	unsigned char apicid; | 
					
						
							|  |  |  | 	unsigned char apicver; | 
					
						
							|  |  |  | 	unsigned char flags; | 
					
						
							|  |  |  | 	unsigned int apicaddr; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:50:52 +05:30
										 |  |  | struct mpc_intsrc { | 
					
						
							| 
									
										
										
										
											2009-01-04 21:56:44 +05:30
										 |  |  | 	unsigned char type; | 
					
						
							|  |  |  | 	unsigned char irqtype; | 
					
						
							|  |  |  | 	unsigned short irqflag; | 
					
						
							|  |  |  | 	unsigned char srcbus; | 
					
						
							|  |  |  | 	unsigned char srcbusirq; | 
					
						
							|  |  |  | 	unsigned char dstapic; | 
					
						
							|  |  |  | 	unsigned char dstirq; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum mp_irq_source_types { | 
					
						
							|  |  |  | 	mp_INT = 0, | 
					
						
							|  |  |  | 	mp_NMI = 1, | 
					
						
							|  |  |  | 	mp_SMI = 2, | 
					
						
							|  |  |  | 	mp_ExtINT = 3 | 
					
						
							|  |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | #define MP_IRQDIR_DEFAULT	0
 | 
					
						
							|  |  |  | #define MP_IRQDIR_HIGH		1
 | 
					
						
							|  |  |  | #define MP_IRQDIR_LOW		3
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #define MP_APIC_ALL	0xFF
 | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:51:54 +05:30
										 |  |  | struct mpc_lintsrc { | 
					
						
							| 
									
										
										
										
											2009-01-04 21:55:53 +05:30
										 |  |  | 	unsigned char type; | 
					
						
							|  |  |  | 	unsigned char irqtype; | 
					
						
							|  |  |  | 	unsigned short irqflag; | 
					
						
							|  |  |  | 	unsigned char srcbusid; | 
					
						
							|  |  |  | 	unsigned char srcbusirq; | 
					
						
							|  |  |  | 	unsigned char destapic; | 
					
						
							|  |  |  | 	unsigned char destapiclint; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2008-01-30 13:30:35 +01:00
										 |  |  | #define MPC_OEM_SIGNATURE "_OEM"
 | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2009-01-03 15:52:54 +05:30
										 |  |  | struct mpc_oemtable { | 
					
						
							| 
									
										
										
										
											2009-01-04 22:00:46 +05:30
										 |  |  | 	char signature[4]; | 
					
						
							|  |  |  | 	unsigned short length;		/* Size of table */ | 
					
						
							|  |  |  | 	char  rev;			/* 0x01 */ | 
					
						
							|  |  |  | 	char  checksum; | 
					
						
							|  |  |  | 	char  mpc[8]; | 
					
						
							| 
									
										
										
										
											2005-04-16 15:20:36 -07:00
										 |  |  | }; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | /*
 | 
					
						
							|  |  |  |  *	Default configurations | 
					
						
							|  |  |  |  * | 
					
						
							|  |  |  |  *	1	2 CPU ISA 82489DX | 
					
						
							|  |  |  |  *	2	2 CPU EISA 82489DX neither IRQ 0 timer nor IRQ 13 DMA chaining | 
					
						
							|  |  |  |  *	3	2 CPU EISA 82489DX | 
					
						
							|  |  |  |  *	4	2 CPU MCA 82489DX | 
					
						
							|  |  |  |  *	5	2 CPU ISA+PCI | 
					
						
							|  |  |  |  *	6	2 CPU EISA+PCI | 
					
						
							|  |  |  |  *	7	2 CPU MCA+PCI | 
					
						
							|  |  |  |  */ | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | enum mp_bustype { | 
					
						
							|  |  |  | 	MP_BUS_ISA = 1, | 
					
						
							|  |  |  | 	MP_BUS_EISA, | 
					
						
							|  |  |  | 	MP_BUS_PCI, | 
					
						
							|  |  |  | }; | 
					
						
							| 
									
										
										
										
											2008-10-22 22:26:29 -07:00
										 |  |  | #endif /* _ASM_X86_MPSPEC_DEF_H */
 |