Skip to content

Commit

Permalink
Interpreter: Fix wrong conditions for AcpiEvInstallRegionHandlers() i…
Browse files Browse the repository at this point in the history
…nvocation

The condition checks for AcpiEvInstallRegionHandlers() invocations are
wrong.

Since we actually needn't the one invoked the AcpiEnableSubsystem(), this
patch corrects the issue by just removing it. And since AE_ALREADY_EXISTS
has already been converted to AE_OK in AcpiEvInstallRegionHandlers(), this
patch also simplies a return value check. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Mar 11, 2016
1 parent 5798cd6 commit 9a6ecc9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 26 deletions.
11 changes: 4 additions & 7 deletions source/components/tables/tbxfload.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,14 +159,11 @@ AcpiLoadTables (
* between AcpiInitializeSubsystem() and AcpiLoadTables() to use
* their customized default region handlers.
*/
if (AcpiGbl_GroupModuleLevelCode)
Status = AcpiEvInstallRegionHandlers ();
if (ACPI_FAILURE (Status))
{
Status = AcpiEvInstallRegionHandlers ();
if (ACPI_FAILURE (Status) && Status != AE_ALREADY_EXISTS)
{
ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
return_ACPI_STATUS (Status);
}
ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
return_ACPI_STATUS (Status);
}

/* Load the namespace from the tables */
Expand Down
19 changes: 0 additions & 19 deletions source/components/utilities/utxfinit.c
Original file line number Diff line number Diff line change
Expand Up @@ -240,25 +240,6 @@ AcpiEnableSubsystem (
*/
AcpiGbl_EarlyInitialization = FALSE;

/*
* Install the default operation region handlers. These are the
* handlers that are defined by the ACPI specification to be
* "always accessible" -- namely, SystemMemory, SystemIO, and
* PCI_Config. This also means that no _REG methods need to be
* run for these address spaces. We need to have these handlers
* installed before any AML code can be executed, especially any
* module-level code (11/2015).
*/
if (!AcpiGbl_GroupModuleLevelCode)
{
Status = AcpiEvInstallRegionHandlers ();
if (ACPI_FAILURE (Status))
{
ACPI_EXCEPTION ((AE_INFO, Status, "During Region initialization"));
return_ACPI_STATUS (Status);
}
}

#if (!ACPI_REDUCED_HARDWARE)

/* Enable ACPI mode */
Expand Down

0 comments on commit 9a6ecc9

Please sign in to comment.