xref: /illumos-gate/usr/src/uts/i86pc/io/pci/mps_table.h (revision cd0d4b40)
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 #ifdef	__cplusplus
33 extern "C" {
34 #endif
35 
36 
37 struct mps_fps_hdr {		/* MP Floating Pointer Structure	*/
38 	uint32_t fps_sig;	/* _MP_ (0x5F4D505F)			*/
39 	uint32_t fps_mpct_paddr; /* paddr of MP Configuration Table	*/
40 	uchar_t	fps_len;	/* in paragraph (16-bytes units)	*/
41 	uchar_t	fps_spec_rev;	/* MP Spec. version no.			*/
42 	uchar_t	fps_cksum;	/* checksum of complete structure	*/
43 	uchar_t	fps_featinfo1;	/* mp feature info byte 1		*/
44 	uchar_t	fps_featinfo2;	/* mp feature info byte 2		*/
45 	uchar_t	fps_featinfo3;	/* mp feature info byte 3		*/
46 	uchar_t	fps_featinfo4;	/* mp feature info byte 4		*/
47 	uchar_t	fps_featinfo5;	/* mp feature info byte 5		*/
48 };
49 
50 struct mps_ct_hdr {		/* MP Configuration Table Header	*/
51 	uint32_t ct_sig;	/* "PCMP"				*/
52 	uint16_t ct_len;	/* base configuration in bytes		*/
53 	uchar_t	ct_spec_rev;	/* MP Spec. version no.			*/
54 	uchar_t	ct_cksum;	/* base configuration table checksum	*/
55 	char	ct_oem_id[8];	/* string identifies the manufacturer	*/
56 	char	ct_prod_id[12]; /* string identifies the product	*/
57 	uint32_t ct_oem_ptr;	/* paddr to an OEM-defined table	*/
58 	uint16_t ct_oem_tbl_len; /* size of base OEM table in bytes	*/
59 	uint16_t ct_entry_cnt;	/* no. of entries in the base table	*/
60 	uint32_t ct_local_apic;	/* paddr of local APIC			*/
61 	uint16_t ct_ext_tbl_len; /* extended table in bytes		*/
62 	uchar_t	ct_ext_cksum;	/* checksum for the extended table	*/
63 };
64 
65 /* Base MP Configuration Table entry type definitions */
66 #define	CPU_TYPE	0
67 #define	BUS_TYPE	1
68 #define	IO_APIC_TYPE	2
69 #define	IO_INTR_TYPE	3
70 #define	LOCAL_INTR_TYPE	4
71 
72 /* Base MP Configuration Table entry size definitions */
73 #define	CPU_SIZE	20
74 #define	BUS_SIZE	8
75 #define	IO_APIC_SIZE	8
76 #define	IO_INTR_SIZE	8
77 #define	LOCAL_INTR_SIZE	8
78 
79 /* Extended MP Configuration Table entry type definitions */
80 #define	SYS_AS_MAPPING		128
81 #define	BUS_HIERARCHY_DESC	129
82 #define	COMP_BUS_AS_MODIFIER	130
83 
84 /* Extended MP Configuration Table entry size definitions */
85 #define	SYS_AS_MAPPING_SIZE		20
86 #define	BUS_HIERARCHY_DESC_SIZE		8
87 #define	COMP_BUS_AS_MODIFIER_SIZE	8
88 
89 struct sasm {			/* System Address Space Mapping Entry	*/
90 	uchar_t sasm_type;	/* type 128				*/
91 	uchar_t sasm_len;	/* entry length in bytes (20)		*/
92 	uchar_t sasm_bus_id;	/* bus id where this is mapped		*/
93 	uchar_t sasm_as_type;	/* system address type			*/
94 /* system address type definitions */
95 #define	IO_TYPE		0
96 #define	MEM_TYPE	1
97 #define	PREFETCH_TYPE	2
98 #define	BUSRANGE_TYPE	3
99 	uint32_t sasm_as_base;	/* starting address			*/
100 	uint32_t sasm_as_base_hi;
101 	uint32_t sasm_as_len;	/* no. of addresses visiblie to the bus	*/
102 	uint32_t sasm_as_len_hi;
103 };
104 
105 struct bhd {			/* Bus Hierarchy Descriptor Entry	*/
106 	uchar_t bhd_type;	/* type 129				*/
107 	uchar_t bhd_len;	/* entry length in bytes (8)		*/
108 	uchar_t bhd_bus_id;	/* bus id of this bus			*/
109 	uchar_t bhd_bus_info;	/* bus information			*/
110 /* Bus Information bit definition */
111 #define	BHD_BUS_INFO_SD	1	/* Subtractive Decode Bus		*/
112 	uchar_t bhd_parent;
113 };
114 
115 struct cbasm {	/* Compatibility Bus Address Space Modifier Entry */
116 	uchar_t cbasm_type;	/* type 130				*/
117 	uchar_t cbasm_len;	/* entry length in bytes (8)		*/
118 	uchar_t cbasm_bus_id;	/* bus to be modified			*/
119 	uchar_t cbasm_addr_mod;	/* address modifier			*/
120 /* Address Modifier bit definiton */
121 #define	CBASM_ADDR_MOD_PR	1	/* 1 = subtracted, 0 = added */
122 	uint32_t cbasm_pr_list;	/* identify list of predefined address ranges */
123 };
124 
125 #ifdef	__cplusplus
126 }
127 #endif
128 
129 #endif	/* _MPS_TABLE_H */
130