Subversion Repositories Kolibri OS

Rev

Rev 1498 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1498 Rev 2216
Line 7... Line 7...
7
/******************************************************************************
7
/******************************************************************************
8
 *
8
 *
9
 * 1. Copyright Notice
9
 * 1. Copyright Notice
10
 *
10
 *
11
 * Some or all of this work - Copyright (c) 1999 - 2010, Intel Corp.
11
 * Some or all of this work - Copyright (c) 1999 - 2011, Intel Corp.
12
 * All rights reserved.
12
 * All rights reserved.
13
 *
13
 *
14
 * 2. License
14
 * 2. License
15
 *
15
 *
16
 * 2.1. This is your license from Intel Corp. under its intellectual property
16
 * 2.1. This is your license from Intel Corp. under its intellectual property
Line 137... Line 137...
137
 *              AlignOp             - Original Op for address alignment. If
137
 *              AlignOp             - Original Op for address alignment. If
138
 *                                    NULL, means "zero value for alignment is
138
 *                                    NULL, means "zero value for alignment is
139
 *                                    OK, and means 64K alignment" (for
139
 *                                    OK, and means 64K alignment" (for
140
 *                                    Memory24 descriptor)
140
 *                                    Memory24 descriptor)
141
 *
141
 *              Op                  - Parent Op for entire construct
-
 
142
 *
142
 * RETURN:      None. Adds error messages to error log if necessary
143
 * RETURN:      None. Adds error messages to error log if necessary
143
 *
144
 *
144
 * DESCRIPTION: Perform common value checks for "small" address descriptors.
145
 * DESCRIPTION: Perform common value checks for "small" address descriptors.
145
 *              Currently:
146
 *              Currently:
146
 *                  Io, Memory24, Memory32
147
 *                  Io, Memory24, Memory32
Line 156... Line 157...
156
    UINT32                  Alignment,
157
    UINT32                  Alignment,
157
    ACPI_PARSE_OBJECT       *MinOp,
158
    ACPI_PARSE_OBJECT       *MinOp,
158
    ACPI_PARSE_OBJECT       *MaxOp,
159
    ACPI_PARSE_OBJECT       *MaxOp,
159
    ACPI_PARSE_OBJECT       *LengthOp,
160
    ACPI_PARSE_OBJECT       *LengthOp,
160
    ACPI_PARSE_OBJECT       *AlignOp)
161
    ACPI_PARSE_OBJECT       *AlignOp,
161
{
162
    ACPI_PARSE_OBJECT       *Op)
-
 
163
{
162
 
164
 
Line 163... Line 165...
163
    if (Gbl_NoResourceChecking)
165
    if (Gbl_NoResourceChecking)
164
    {
166
    {
165
        return;
167
        return;
166
    }
168
    }
Line -... Line 169...
-
 
169
 
-
 
170
    /*
-
 
171
     * Check for a so-called "null descriptor". These are descriptors that are
-
 
172
     * created with most fields set to zero. The intent is that the descriptor
-
 
173
     * will be updated/completed at runtime via a BufferField.
-
 
174
     *
-
 
175
     * If the descriptor does NOT have a resource tag, it cannot be referenced
-
 
176
     * by a BufferField and we will flag this as an error. Conversely, if
-
 
177
     * the descriptor has a resource tag, we will assume that a BufferField
-
 
178
     * will be used to dynamically update it, so no error.
-
 
179
     *
-
 
180
     * A possible enhancement to this check would be to verify that in fact
-
 
181
     * a BufferField is created using the resource tag, and perhaps even
-
 
182
     * verify that a Store is performed to the BufferField.
-
 
183
     *
-
 
184
     * Note: for these descriptors, Alignment is allowed to be zero
-
 
185
     */
-
 
186
    if (!Minimum && !Maximum && !Length)
-
 
187
    {
-
 
188
        if (!Op->Asl.ExternalName)
-
 
189
        {
-
 
190
            /* No resource tag. Descriptor is fixed and is also illegal */
-
 
191
 
-
 
192
            AslError (ASL_ERROR, ASL_MSG_NULL_DESCRIPTOR, Op, NULL);
-
 
193
        }
-
 
194
 
-
 
195
        return;
-
 
196
    }
167
 
197
 
Line 168... Line 198...
168
    /* Special case for Memory24, values are compressed */
198
    /* Special case for Memory24, values are compressed */
169
 
199
 
170
    if (Type == ACPI_RESOURCE_NAME_MEMORY24)
200
    if (Type == ACPI_RESOURCE_NAME_MEMORY24)
Line 228... Line 258...
228
 *              MinOp               - Original Op for Address Min
258
 *              MinOp               - Original Op for Address Min
229
 *              MaxOp               - Original Op for Address Max
259
 *              MaxOp               - Original Op for Address Max
230
 *              LengthOp            - Original Op for address range
260
 *              LengthOp            - Original Op for address range
231
 *              GranOp              - Original Op for address granularity
261
 *              GranOp              - Original Op for address granularity
232
 *
262
 *              Op                  - Parent Op for entire construct
-
 
263
 *
233
 * RETURN:      None. Adds error messages to error log if necessary
264
 * RETURN:      None. Adds error messages to error log if necessary
234
 *
265
 *
235
 * DESCRIPTION: Perform common value checks for "large" address descriptors.
266
 * DESCRIPTION: Perform common value checks for "large" address descriptors.
236
 *              Currently:
267
 *              Currently:
237
 *                  WordIo,     WordBusNumber,  WordSpace
268
 *                  WordIo,     WordBusNumber,  WordSpace
Line 257... Line 288...
257
    UINT8                   Flags,
288
    UINT8                   Flags,
258
    ACPI_PARSE_OBJECT       *MinOp,
289
    ACPI_PARSE_OBJECT       *MinOp,
259
    ACPI_PARSE_OBJECT       *MaxOp,
290
    ACPI_PARSE_OBJECT       *MaxOp,
260
    ACPI_PARSE_OBJECT       *LengthOp,
291
    ACPI_PARSE_OBJECT       *LengthOp,
261
    ACPI_PARSE_OBJECT       *GranOp)
292
    ACPI_PARSE_OBJECT       *GranOp,
262
{
293
    ACPI_PARSE_OBJECT       *Op)
-
 
294
{
263
 
295
 
Line 264... Line 296...
264
    if (Gbl_NoResourceChecking)
296
    if (Gbl_NoResourceChecking)
265
    {
297
    {
266
        return;
298
        return;
267
    }
299
    }
Line -... Line 300...
-
 
300
 
-
 
301
    /*
-
 
302
     * Check for a so-called "null descriptor". These are descriptors that are
-
 
303
     * created with most fields set to zero. The intent is that the descriptor
-
 
304
     * will be updated/completed at runtime via a BufferField.
-
 
305
     *
-
 
306
     * If the descriptor does NOT have a resource tag, it cannot be referenced
-
 
307
     * by a BufferField and we will flag this as an error. Conversely, if
-
 
308
     * the descriptor has a resource tag, we will assume that a BufferField
-
 
309
     * will be used to dynamically update it, so no error.
-
 
310
     *
-
 
311
     * A possible enhancement to this check would be to verify that in fact
-
 
312
     * a BufferField is created using the resource tag, and perhaps even
-
 
313
     * verify that a Store is performed to the BufferField.
-
 
314
     */
-
 
315
    if (!Minimum && !Maximum && !Length && !Granularity)
-
 
316
    {
-
 
317
        if (!Op->Asl.ExternalName)
-
 
318
        {
-
 
319
            /* No resource tag. Descriptor is fixed and is also illegal */
-
 
320
 
-
 
321
            AslError (ASL_ERROR, ASL_MSG_NULL_DESCRIPTOR, Op, NULL);
-
 
322
        }
-
 
323
 
-
 
324
        return;
-
 
325
    }
268
 
326
 
Line 269... Line 327...
269
    /* Basic checks on Min/Max/Length */
327
    /* Basic checks on Min/Max/Length */
270
 
328
 
271
    if (Minimum > Maximum)
329
    if (Minimum > Maximum)