xref: /titanic_50/usr/src/uts/intel/io/pci/mps_table.h (revision 174bc6499d233e329ecd3d98a880a7b07df16bfa)
1 /*
2  * CDDL HEADER START
3  *
4  * The contents of this file are subject to the terms of the
5  * Common Development and Distribution License, Version 1.0 only
6  * (the "License").  You may not use this file except in compliance
7  * with the License.
8  *
9  * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
10  * or http://www.opensolaris.org/os/licensing.
11  * See the License for the specific language governing permissions
12  * and limitations under the License.
13  *
14  * When distributing Covered Code, include this CDDL HEADER in each
15  * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
16  * If applicable, add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your own identifying
18  * information: Portions Copyright [yyyy] [name of copyright owner]
19  *
20  * CDDL HEADER END
21  */
22 /*
23  * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
24  * Use is subject to license terms.
25  *
26  * mps_table.h -- MP Specification table definitions
27  */
28 
29 #ifndef	_MPS_TABLE_H
30 #define	_MPS_TABLE_H
31 
32 #pragma ident	"%Z%%M%	%I%	%E% SMI"
33 
34 #ifdef	__cplusplus
35 extern "C" {
36 #endif
37 
38 
39 struct mps_fps_hdr {		/* MP Floating Pointer Structure	*/
40 	uint32_t fps_sig;	/* _MP_ (0x5F4D505F)			*/
41 	uint32_t fps_mpct_paddr; /* paddr of MP Configuration Table	*/
42 	uchar_t	fps_len;	/* in paragraph (16-bytes units)	*/
43 	uchar_t	fps_spec_rev;	/* MP Spec. version no.			*/
44 	uchar_t	fps_cksum;	/* checksum of complete structure	*/
45 	uchar_t	fps_featinfo1;	/* mp feature info byte 1 		*/
46 	uchar_t	fps_featinfo2;	/* mp feature info byte 2		*/
47 	uchar_t	fps_featinfo3;	/* mp feature info byte 3		*/
48 	uchar_t	fps_featinfo4;	/* mp feature info byte 4		*/
49 	uchar_t	fps_featinfo5;	/* mp feature info byte 5		*/
50 };
51 
52 struct mps_ct_hdr {		/* MP Configuration Table Header	*/
53 	uint32_t ct_sig;	/* "PCMP"				*/
54 	uint16_t ct_len;	/* base configuration in bytes 		*/
55 	uchar_t	ct_spec_rev;	/* MP Spec. version no.			*/
56 	uchar_t	ct_cksum;	/* base configuration table checksum	*/
57 	char	ct_oem_id[8];	/* string identifies the manufacturer	*/
58 	char	ct_prod_id[12]; /* string identifies the product	*/
59 	uint32_t ct_oem_ptr;	/* paddr to an OEM-defined table	*/
60 	uint16_t ct_oem_tbl_len; /* size of base OEM table in bytes	*/
61 	uint16_t ct_entry_cnt;	/* no. of entries in the base table	*/
62 	uint32_t ct_local_apic;	/* paddr of local APIC			*/
63 	uint16_t ct_ext_tbl_len; /* extended table in bytes 		*/
64 	uchar_t	ct_ext_cksum;	/* checksum for the extended table	*/
65 };
66 
67 /* Base MP Configuration Table entry type definitions */
68 #define	CPU_TYPE	0
69 #define	BUS_TYPE	1
70 #define	IO_APIC_TYPE	2
71 #define	IO_INTR_TYPE	3
72 #define	LOCAL_INTR_TYPE	4
73 
74 /* Base MP Configuration Table entry size definitions */
75 #define	CPU_SIZE	20
76 #define	BUS_SIZE	8
77 #define	IO_APIC_SIZE	8
78 #define	IO_INTR_SIZE	8
79 #define	LOCAL_INTR_SIZE	8
80 
81 /* Extended MP Configuration Table entry type definitions */
82 #define	SYS_AS_MAPPING		128
83 #define	BUS_HIERARCHY_DESC	129
84 #define	COMP_BUS_AS_MODIFIER	130
85 
86 /* Extended MP Configuration Table entry size definitions */
87 #define	SYS_AS_MAPPING_SIZE		20
88 #define	BUS_HIERARCHY_DESC_SIZE		8
89 #define	COMP_BUS_AS_MODIFIER_SIZE	8
90 
91 struct sasm {			/* System Address Space Mapping Entry	*/
92 	uchar_t sasm_type;	/* type 128				*/
93 	uchar_t sasm_len;	/* entry length in bytes (20)		*/
94 	uchar_t sasm_bus_id;	/* bus id where this is mapped		*/
95 	uchar_t sasm_as_type;	/* system address type			*/
96 /* system address type definitions */
97 #define	IO_TYPE		0
98 #define	MEM_TYPE	1
99 #define	PREFETCH_TYPE	2
100 #define	BUSRANGE_TYPE	3
101 	uint32_t sasm_as_base;	/* starting address			*/
102 	uint32_t sasm_as_base_hi;
103 	uint32_t sasm_as_len;	/* no. of addresses visiblie to the bus	*/
104 	uint32_t sasm_as_len_hi;
105 };
106 
107 struct bhd {			/* Bus Hierarchy Descriptor Entry	*/
108 	uchar_t bhd_type;	/* type 129				*/
109 	uchar_t bhd_len;	/* entry length in bytes (8)		*/
110 	uchar_t bhd_bus_id;	/* bus id of this bus			*/
111 	uchar_t bhd_bus_info;	/* bus information			*/
112 /* Bus Information bit definition */
113 #define	BHD_BUS_INFO_SD	1	/* Subtractive Decode Bus		*/
114 	uchar_t bhd_parent;
115 };
116 
117 struct cbasm {	/* Compatibility Bus Address Space Modifier Entry */
118 	uchar_t cbasm_type;	/* type 130				*/
119 	uchar_t cbasm_len;	/* entry length in bytes (8)		*/
120 	uchar_t cbasm_bus_id;	/* bus to be modified			*/
121 	uchar_t cbasm_addr_mod;	/* address modifier			*/
122 /* Address Modifier bit definiton */
123 #define	CBASM_ADDR_MOD_PR	1	/* 1 = subtracted, 0 = added */
124 	uint32_t cbasm_pr_list;	/* identify list of predefined address ranges */
125 };
126 
127 #ifdef	__cplusplus
128 }
129 #endif
130 
131 #endif	/* _MPS_TABLE_H */
132