From 13bcd53123e29d9361b5d2954810ebb4254caf81 Mon Sep 17 00:00:00 2001 From: rmoore1 Date: Wed, 6 Sep 2006 21:32:22 +0000 Subject: [PATCH] ACPICA: Update iASL for new Table Manger. Required new table init interface since iASL does not use RSDP/XSDT. --- source/compiler/aslmain.c | 11 +++++++++- source/compiler/aslstubs.c | 4 ++-- source/components/tables/tbxface.c | 33 +++++++++++++++++++++++++----- source/include/actables.h | 6 +++++- 4 files changed, 45 insertions(+), 9 deletions(-) diff --git a/source/compiler/aslmain.c b/source/compiler/aslmain.c index 3c705785d..6b0c87bca 100644 --- a/source/compiler/aslmain.c +++ b/source/compiler/aslmain.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslmain - compiler main and utilities - * $Revision: 1.93 $ + * $Revision: 1.94 $ * *****************************************************************************/ @@ -120,6 +120,7 @@ #include "aslcompiler.h" #include "acnamesp.h" +#include "actables.h" #include "acapps.h" #ifdef _DEBUG @@ -794,6 +795,14 @@ main ( return -1; } + Status = AcpiAllocateRootTable (4); + if (ACPI_FAILURE (Status)) + { + AcpiOsPrintf ("Could not initialize ACPI Table Manager, %s\n", + AcpiFormatException (Status)); + return -1; + } + /* This is where the disassembly happens */ AcpiGbl_DbOpt_disasm = TRUE; diff --git a/source/compiler/aslstubs.c b/source/compiler/aslstubs.c index cac5d725b..3ec4ab736 100644 --- a/source/compiler/aslstubs.c +++ b/source/compiler/aslstubs.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: aslstubs - Stubs used to link to Aml interpreter - * $Revision: 1.18 $ + * $Revision: 1.19 $ * *****************************************************************************/ @@ -133,7 +133,7 @@ ACPI_PHYSICAL_ADDRESS AeLocalGetRootPointer ( void) { - return AE_ERROR; + return 0; } ACPI_STATUS diff --git a/source/components/tables/tbxface.c b/source/components/tables/tbxface.c index 79a3f739f..9bb527dc9 100644 --- a/source/components/tables/tbxface.c +++ b/source/components/tables/tbxface.c @@ -2,7 +2,7 @@ * * Module Name: tbxface - Public interfaces to the ACPI subsystem * ACPI table oriented interfaces - * $Revision: 1.82 $ + * $Revision: 1.83 $ * *****************************************************************************/ @@ -131,6 +131,32 @@ AcpiTbLoadNamespace ( void); +/******************************************************************************* + * + * FUNCTION: AcpiAllocateRootTable + * + * PARAMETERS: InitialTableCount - Size of InitialTableArray, in number of + * ACPI_TABLE_DESC structures + * + * RETURN: Status + * + * DESCRIPTION: Allocate a root table array. Used by iASL compiler and + * AcpiInitializeTables. + * + ******************************************************************************/ + +ACPI_STATUS +AcpiAllocateRootTable ( + UINT32 InitialTableCount) +{ + + AcpiGbl_RootTableList.Size = InitialTableCount; + AcpiGbl_RootTableList.Flags = ACPI_ROOT_ALLOW_RESIZE; + + return (AcpiTbResizeRootTableList ()); +} + + /******************************************************************************* * * FUNCTION: AcpiInitializeTables @@ -176,10 +202,7 @@ AcpiInitializeTables ( */ if (!InitialTableArray) { - AcpiGbl_RootTableList.Size = InitialTableCount; - AcpiGbl_RootTableList.Flags = ACPI_ROOT_ALLOW_RESIZE; - - Status = AcpiTbResizeRootTableList (); + Status = AcpiAllocateRootTable (InitialTableCount); if (ACPI_FAILURE (Status)) { return_ACPI_STATUS (Status); diff --git a/source/include/actables.h b/source/include/actables.h index b97c06761..8647d9b52 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actables.h - ACPI table management - * $Revision: 1.58 $ + * $Revision: 1.59 $ * *****************************************************************************/ @@ -118,6 +118,10 @@ #define __ACTABLES_H__ +ACPI_STATUS +AcpiAllocateRootTable ( + UINT32 InitialTableCount); + /* * tbfadt - FADT parse/convert/validate */