Print this page
update to acpica-unix2-20140114
acpica-unix2-20130823
PANKOVs restructure
Split |
Close |
Expand all |
Collapse all |
--- old/usr/src/uts/intel/io/acpica/resources/rsmemory.c
+++ new/usr/src/common/acpica/components/resources/rsmemory.c
1 1 /*******************************************************************************
2 2 *
3 3 * Module Name: rsmem24 - Memory resource descriptors
4 4 *
5 5 ******************************************************************************/
6 6
7 7 /*
8 - * Copyright (C) 2000 - 2011, Intel Corp.
8 + * Copyright (C) 2000 - 2014, Intel Corp.
9 9 * All rights reserved.
10 10 *
11 11 * Redistribution and use in source and binary forms, with or without
12 12 * modification, are permitted provided that the following conditions
13 13 * are met:
14 14 * 1. Redistributions of source code must retain the above copyright
15 15 * notice, this list of conditions, and the following disclaimer,
16 16 * without modification.
17 17 * 2. Redistributions in binary form must reproduce at minimum a disclaimer
18 18 * substantially similar to the "NO WARRANTY" disclaimer below
19 19 * ("Disclaimer") and any redistribution must be conditioned upon
20 20 * including a substantially similar Disclaimer requirement for further
21 21 * binary redistribution.
22 22 * 3. Neither the names of the above-listed copyright holders nor the names
23 23 * of any contributors may be used to endorse or promote products derived
24 24 * from this software without specific prior written permission.
25 25 *
26 26 * Alternatively, this software may be distributed under the terms of the
27 27 * GNU General Public License ("GPL") version 2 as published by the Free
28 28 * Software Foundation.
29 29 *
30 30 * NO WARRANTY
31 31 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
32 32 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
33 33 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
34 34 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
35 35 * HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
36 36 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
37 37 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
38 38 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
39 39 * STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
40 40 * IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
41 41 * POSSIBILITY OF SUCH DAMAGES.
42 42 */
43 43
44 44 #define __RSMEMORY_C__
45 45
46 46 #include "acpi.h"
47 47 #include "accommon.h"
48 48 #include "acresrc.h"
49 49
50 50 #define _COMPONENT ACPI_RESOURCES
51 51 ACPI_MODULE_NAME ("rsmemory")
52 52
53 53
54 54 /*******************************************************************************
55 55 *
56 56 * AcpiRsConvertMemory24
57 57 *
58 58 ******************************************************************************/
59 59
60 60 ACPI_RSCONVERT_INFO AcpiRsConvertMemory24[4] =
61 61 {
62 62 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY24,
63 63 ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY24),
64 64 ACPI_RSC_TABLE_SIZE (AcpiRsConvertMemory24)},
65 65
66 66 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY24,
67 67 sizeof (AML_RESOURCE_MEMORY24),
68 68 0},
69 69
70 70 /* Read/Write bit */
71 71
72 72 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Memory24.WriteProtect),
73 73 AML_OFFSET (Memory24.Flags),
74 74 0},
75 75 /*
76 76 * These fields are contiguous in both the source and destination:
77 77 * Minimum Base Address
78 78 * Maximum Base Address
79 79 * Address Base Alignment
80 80 * Range Length
81 81 */
82 82 {ACPI_RSC_MOVE16, ACPI_RS_OFFSET (Data.Memory24.Minimum),
83 83 AML_OFFSET (Memory24.Minimum),
84 84 4}
85 85 };
86 86
87 87
88 88 /*******************************************************************************
89 89 *
90 90 * AcpiRsConvertMemory32
91 91 *
92 92 ******************************************************************************/
93 93
94 94 ACPI_RSCONVERT_INFO AcpiRsConvertMemory32[4] =
95 95 {
96 96 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_MEMORY32,
97 97 ACPI_RS_SIZE (ACPI_RESOURCE_MEMORY32),
98 98 ACPI_RSC_TABLE_SIZE (AcpiRsConvertMemory32)},
99 99
100 100 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_MEMORY32,
101 101 sizeof (AML_RESOURCE_MEMORY32),
102 102 0},
103 103
104 104 /* Read/Write bit */
105 105
106 106 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.Memory32.WriteProtect),
107 107 AML_OFFSET (Memory32.Flags),
108 108 0},
109 109 /*
110 110 * These fields are contiguous in both the source and destination:
111 111 * Minimum Base Address
112 112 * Maximum Base Address
113 113 * Address Base Alignment
114 114 * Range Length
115 115 */
116 116 {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.Memory32.Minimum),
117 117 AML_OFFSET (Memory32.Minimum),
118 118 4}
119 119 };
120 120
121 121
122 122 /*******************************************************************************
123 123 *
124 124 * AcpiRsConvertFixedMemory32
125 125 *
126 126 ******************************************************************************/
127 127
128 128 ACPI_RSCONVERT_INFO AcpiRsConvertFixedMemory32[4] =
129 129 {
130 130 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_FIXED_MEMORY32,
131 131 ACPI_RS_SIZE (ACPI_RESOURCE_FIXED_MEMORY32),
132 132 ACPI_RSC_TABLE_SIZE (AcpiRsConvertFixedMemory32)},
133 133
134 134 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_FIXED_MEMORY32,
135 135 sizeof (AML_RESOURCE_FIXED_MEMORY32),
136 136 0},
137 137
138 138 /* Read/Write bit */
139 139
140 140 {ACPI_RSC_1BITFLAG, ACPI_RS_OFFSET (Data.FixedMemory32.WriteProtect),
141 141 AML_OFFSET (FixedMemory32.Flags),
142 142 0},
143 143 /*
144 144 * These fields are contiguous in both the source and destination:
145 145 * Base Address
146 146 * Range Length
147 147 */
148 148 {ACPI_RSC_MOVE32, ACPI_RS_OFFSET (Data.FixedMemory32.Address),
149 149 AML_OFFSET (FixedMemory32.Address),
150 150 2}
151 151 };
152 152
153 153
154 154 /*******************************************************************************
155 155 *
156 156 * AcpiRsGetVendorSmall
157 157 *
158 158 ******************************************************************************/
159 159
160 160 ACPI_RSCONVERT_INFO AcpiRsGetVendorSmall[3] =
161 161 {
162 162 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_VENDOR,
163 163 ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR),
164 164 ACPI_RSC_TABLE_SIZE (AcpiRsGetVendorSmall)},
165 165
166 166 /* Length of the vendor data (byte count) */
167 167
168 168 {ACPI_RSC_COUNT16, ACPI_RS_OFFSET (Data.Vendor.ByteLength),
169 169 0,
170 170 sizeof (UINT8)},
171 171
172 172 /* Vendor data */
173 173
174 174 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Vendor.ByteData[0]),
175 175 sizeof (AML_RESOURCE_SMALL_HEADER),
176 176 0}
177 177 };
178 178
179 179
180 180 /*******************************************************************************
181 181 *
182 182 * AcpiRsGetVendorLarge
183 183 *
184 184 ******************************************************************************/
185 185
186 186 ACPI_RSCONVERT_INFO AcpiRsGetVendorLarge[3] =
187 187 {
188 188 {ACPI_RSC_INITGET, ACPI_RESOURCE_TYPE_VENDOR,
189 189 ACPI_RS_SIZE (ACPI_RESOURCE_VENDOR),
190 190 ACPI_RSC_TABLE_SIZE (AcpiRsGetVendorLarge)},
191 191
192 192 /* Length of the vendor data (byte count) */
193 193
194 194 {ACPI_RSC_COUNT16, ACPI_RS_OFFSET (Data.Vendor.ByteLength),
195 195 0,
196 196 sizeof (UINT8)},
197 197
198 198 /* Vendor data */
199 199
200 200 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Vendor.ByteData[0]),
201 201 sizeof (AML_RESOURCE_LARGE_HEADER),
202 202 0}
203 203 };
204 204
205 205
206 206 /*******************************************************************************
207 207 *
208 208 * AcpiRsSetVendor
209 209 *
210 210 ******************************************************************************/
211 211
212 212 ACPI_RSCONVERT_INFO AcpiRsSetVendor[7] =
213 213 {
214 214 /* Default is a small vendor descriptor */
215 215
216 216 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_VENDOR_SMALL,
217 217 sizeof (AML_RESOURCE_SMALL_HEADER),
218 218 ACPI_RSC_TABLE_SIZE (AcpiRsSetVendor)},
219 219
220 220 /* Get the length and copy the data */
221 221
222 222 {ACPI_RSC_COUNT16, ACPI_RS_OFFSET (Data.Vendor.ByteLength),
223 223 0,
224 224 0},
225 225
226 226 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Vendor.ByteData[0]),
227 227 sizeof (AML_RESOURCE_SMALL_HEADER),
228 228 0},
229 229
230 230 /*
231 231 * All done if the Vendor byte length is 7 or less, meaning that it will
232 232 * fit within a small descriptor
233 233 */
234 234 {ACPI_RSC_EXIT_LE, 0, 0, 7},
235 235
236 236 /* Must create a large vendor descriptor */
237 237
238 238 {ACPI_RSC_INITSET, ACPI_RESOURCE_NAME_VENDOR_LARGE,
239 239 sizeof (AML_RESOURCE_LARGE_HEADER),
↓ open down ↓ |
221 lines elided |
↑ open up ↑ |
240 240 0},
241 241
242 242 {ACPI_RSC_COUNT16, ACPI_RS_OFFSET (Data.Vendor.ByteLength),
243 243 0,
244 244 0},
245 245
246 246 {ACPI_RSC_MOVE8, ACPI_RS_OFFSET (Data.Vendor.ByteData[0]),
247 247 sizeof (AML_RESOURCE_LARGE_HEADER),
248 248 0}
249 249 };
250 -
251 -
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX