Rev 1498 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 1498 | Rev 2216 | ||
---|---|---|---|
Line 6... | Line 6... | ||
6 | 6 | ||
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 | * |
Line 358... | Line 358... | ||
358 | DtGetSubtableLength ( |
358 | DtGetSubtableLength ( |
359 | DT_FIELD *Field, |
359 | DT_FIELD *Field, |
360 | ACPI_DMTABLE_INFO *Info) |
360 | ACPI_DMTABLE_INFO *Info) |
361 | { |
361 | { |
362 | UINT32 ByteLength = 0; |
362 | UINT32 ByteLength = 0; |
- | 363 | UINT8 Step; |
|
- | 364 | UINT8 i; |
|
Line 363... | Line 365... | ||
363 | 365 | ||
Line 364... | Line 366... | ||
364 | 366 | ||
365 | /* Walk entire Info table; Null name terminates */ |
367 | /* Walk entire Info table; Null name terminates */ |
- | 368 | ||
- | 369 | for (; Info->Name; Info++) |
|
- | 370 | { |
|
- | 371 | if (!Field) |
|
- | 372 | { |
|
366 | 373 | goto Error; |
|
- | 374 | } |
|
- | 375 | ||
- | 376 | ByteLength += DtGetFieldLength (Field, Info); |
|
- | 377 | ||
- | 378 | switch (Info->Opcode) |
|
- | 379 | { |
|
- | 380 | case ACPI_DMT_GAS: |
|
- | 381 | Step = 5; |
|
- | 382 | break; |
|
- | 383 | ||
- | 384 | case ACPI_DMT_HESTNTFY: |
|
- | 385 | Step = 9; |
|
- | 386 | break; |
|
- | 387 | ||
- | 388 | default: |
|
- | 389 | Step = 1; |
|
- | 390 | break; |
|
- | 391 | } |
|
- | 392 | ||
- | 393 | for (i = 0; i < Step; i++) |
|
- | 394 | { |
|
- | 395 | if (!Field) |
|
- | 396 | { |
|
- | 397 | goto Error; |
|
- | 398 | } |
|
367 | for (; Info->Name; Info++) |
399 | |
Line 368... | Line 400... | ||
368 | { |
400 | Field = Field->Next; |
- | 401 | } |
|
- | 402 | } |
|
- | 403 | ||
- | 404 | return (ByteLength); |
|
- | 405 | ||
- | 406 | Error: |
|
- | 407 | if (!Field) |
|
- | 408 | { |
|
- | 409 | sprintf (MsgBuffer, "Found NULL field - Field name \"%s\" needed", |
|
- | 410 | Info->Name); |
|
369 | ByteLength += DtGetFieldLength (Field, Info); |
411 | DtFatal (ASL_MSG_COMPILER_INTERNAL, NULL, MsgBuffer); |
Line 370... | Line 412... | ||
370 | } |
412 | } |
371 | 413 |