diff options
Diffstat (limited to 'source/compiler/dtutils.c')
-rw-r--r-- | source/compiler/dtutils.c | 153 |
1 files changed, 2 insertions, 151 deletions
diff --git a/source/compiler/dtutils.c b/source/compiler/dtutils.c index c6c89eaa7d20..1e8f9b243a5a 100644 --- a/source/compiler/dtutils.c +++ b/source/compiler/dtutils.c @@ -150,7 +150,6 @@ *****************************************************************************/ #include "aslcompiler.h" -#include "dtcompiler.h" #include "actables.h" #define _COMPONENT DT_COMPILER @@ -570,6 +569,7 @@ DtGetFieldLength ( case ACPI_DMT_PCCT: case ACPI_DMT_PMTT: case ACPI_DMT_PPTT: + case ACPI_DMT_SDEV: case ACPI_DMT_SRAT: case ACPI_DMT_ASF: case ACPI_DMT_HESTNTYP: @@ -602,6 +602,7 @@ DtGetFieldLength ( case ACPI_DMT_NAME4: case ACPI_DMT_SIG: case ACPI_DMT_LPIT: + case ACPI_DMT_TPM2: ByteLength = 4; break; @@ -920,153 +921,3 @@ DtWalkTableTree ( } } } - - -/******************************************************************************* - * - * FUNCTION: UtSubtableCacheCalloc - * - * PARAMETERS: None - * - * RETURN: Pointer to the buffer. Aborts on allocation failure - * - * DESCRIPTION: Allocate a subtable object buffer. Bypass the local - * dynamic memory manager for performance reasons (This has a - * major impact on the speed of the compiler.) - * - ******************************************************************************/ - -DT_SUBTABLE * -UtSubtableCacheCalloc ( - void) -{ - ASL_CACHE_INFO *Cache; - - - if (Gbl_SubtableCacheNext >= Gbl_SubtableCacheLast) - { - /* Allocate a new buffer */ - - Cache = UtLocalCalloc (sizeof (Cache->Next) + - (sizeof (DT_SUBTABLE) * ASL_SUBTABLE_CACHE_SIZE)); - - /* Link new cache buffer to head of list */ - - Cache->Next = Gbl_SubtableCacheList; - Gbl_SubtableCacheList = Cache; - - /* Setup cache management pointers */ - - Gbl_SubtableCacheNext = ACPI_CAST_PTR (DT_SUBTABLE, Cache->Buffer); - Gbl_SubtableCacheLast = Gbl_SubtableCacheNext + ASL_SUBTABLE_CACHE_SIZE; - } - - Gbl_SubtableCount++; - return (Gbl_SubtableCacheNext++); -} - - -/******************************************************************************* - * - * FUNCTION: UtFieldCacheCalloc - * - * PARAMETERS: None - * - * RETURN: Pointer to the buffer. Aborts on allocation failure - * - * DESCRIPTION: Allocate a field object buffer. Bypass the local - * dynamic memory manager for performance reasons (This has a - * major impact on the speed of the compiler.) - * - ******************************************************************************/ - -DT_FIELD * -UtFieldCacheCalloc ( - void) -{ - ASL_CACHE_INFO *Cache; - - - if (Gbl_FieldCacheNext >= Gbl_FieldCacheLast) - { - /* Allocate a new buffer */ - - Cache = UtLocalCalloc (sizeof (Cache->Next) + - (sizeof (DT_FIELD) * ASL_FIELD_CACHE_SIZE)); - - /* Link new cache buffer to head of list */ - - Cache->Next = Gbl_FieldCacheList; - Gbl_FieldCacheList = Cache; - - /* Setup cache management pointers */ - - Gbl_FieldCacheNext = ACPI_CAST_PTR (DT_FIELD, Cache->Buffer); - Gbl_FieldCacheLast = Gbl_FieldCacheNext + ASL_FIELD_CACHE_SIZE; - } - - Gbl_FieldCount++; - return (Gbl_FieldCacheNext++); -} - - -/******************************************************************************* - * - * FUNCTION: DtDeleteCaches - * - * PARAMETERS: None - * - * RETURN: None - * - * DESCRIPTION: Delete all local cache buffer blocks - * - ******************************************************************************/ - -void -DtDeleteCaches ( - void) -{ - UINT32 BufferCount; - ASL_CACHE_INFO *Next; - - - /* Field cache */ - - BufferCount = 0; - while (Gbl_FieldCacheList) - { - Next = Gbl_FieldCacheList->Next; - ACPI_FREE (Gbl_FieldCacheList); - Gbl_FieldCacheList = Next; - BufferCount++; - } - - DbgPrint (ASL_DEBUG_OUTPUT, - "%u Fields, Buffer size: %u fields (%u bytes), %u Buffers\n", - Gbl_FieldCount, ASL_FIELD_CACHE_SIZE, - (sizeof (DT_FIELD) * ASL_FIELD_CACHE_SIZE), BufferCount); - - Gbl_FieldCount = 0; - Gbl_FieldCacheNext = NULL; - Gbl_FieldCacheLast = NULL; - - /* Subtable cache */ - - BufferCount = 0; - while (Gbl_SubtableCacheList) - { - Next = Gbl_SubtableCacheList->Next; - ACPI_FREE (Gbl_SubtableCacheList); - Gbl_SubtableCacheList = Next; - BufferCount++; - } - - DbgPrint (ASL_DEBUG_OUTPUT, - "%u Subtables, Buffer size: %u subtables (%u bytes), %u Buffers\n", - Gbl_SubtableCount, ASL_SUBTABLE_CACHE_SIZE, - (sizeof (DT_SUBTABLE) * ASL_SUBTABLE_CACHE_SIZE), BufferCount); - - Gbl_SubtableCount = 0; - Gbl_SubtableCacheNext = NULL; - Gbl_SubtableCacheLast = NULL; -} |