Skip to content

Commit

Permalink
Tables: Remove AcpiTbInstallFixedTable()
Browse files Browse the repository at this point in the history
AcpiTbInstallFixedTable() is now redundant as we've removed the fixed
table indexing mechanism. This patch cleans up the code accordingly.
No functional change. Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
  • Loading branch information
Lv Zheng committed Aug 16, 2016
1 parent 2ba5d3f commit 42c7b84
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 82 deletions.
18 changes: 12 additions & 6 deletions source/components/tables/tbfadt.c
Original file line number Diff line number Diff line change
Expand Up @@ -447,22 +447,28 @@ AcpiTbParseFadt (

/* Obtain the DSDT and FACS tables via their addresses within the FADT */

AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
ACPI_SIG_DSDT, &AcpiGbl_DsdtIndex);
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
&AcpiGbl_DsdtIndex);

/* If Hardware Reduced flag is set, there is no FACS */

if (!AcpiGbl_ReducedHardware)
{
if (AcpiGbl_FADT.Facs)
{
AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
ACPI_SIG_FACS, &AcpiGbl_FacsIndex);
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
&AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallFixedTable ((ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
ACPI_SIG_FACS, &AcpiGbl_XFacsIndex);
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
&AcpiGbl_XFacsIndex);
}
}
}
Expand Down
71 changes: 1 addition & 70 deletions source/components/tables/tbinstal.c
Original file line number Diff line number Diff line change
Expand Up @@ -239,74 +239,6 @@ AcpiTbInstallTableWithOverride (
}


/*******************************************************************************
*
* FUNCTION: AcpiTbInstallFixedTable
*
* PARAMETERS: Address - Physical address of DSDT or FACS
* Signature - Table signature, NULL if no need to
* match
* TableIndex - Where the table index is returned
*
* RETURN: Status
*
* DESCRIPTION: Install a fixed ACPI table (DSDT/FACS) into the global data
* structure.
*
******************************************************************************/

ACPI_STATUS
AcpiTbInstallFixedTable (
ACPI_PHYSICAL_ADDRESS Address,
char *Signature,
UINT32 *TableIndex)
{
ACPI_TABLE_DESC NewTableDesc;
ACPI_STATUS Status;


ACPI_FUNCTION_TRACE (TbInstallFixedTable);


if (!Address)
{
ACPI_ERROR ((AE_INFO, "Null physical address for ACPI table [%s]",
Signature));
return (AE_NO_MEMORY);
}

/* Fill a table descriptor for validation */

Status = AcpiTbAcquireTempTable (&NewTableDesc, Address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO, "Could not acquire table length at %8.8X%8.8X",
ACPI_FORMAT_UINT64 (Address)));
return_ACPI_STATUS (Status);
}

/* Validate and verify a table before installation */

Status = AcpiTbVerifyTempTable (&NewTableDesc, Signature);
if (ACPI_FAILURE (Status))
{
goto ReleaseAndExit;
}

/* Add the table to the global root table list */

AcpiTbInstallTableWithOverride (&NewTableDesc, TRUE, TableIndex);

ReleaseAndExit:

/* Release the temporary table descriptor */

AcpiTbReleaseTempTable (&NewTableDesc);
return_ACPI_STATUS (Status);
}


/*******************************************************************************
*
* FUNCTION: AcpiTbInstallStandardTable
Expand All @@ -320,8 +252,7 @@ AcpiTbInstallFixedTable (
*
* RETURN: Status
*
* DESCRIPTION: This function is called to install an ACPI table that is
* neither DSDT nor FACS (a "standard" table.)
* DESCRIPTION: This function is called to verify and install an ACPI table.
* When this function is called by "Load" or "LoadTable" opcodes,
* or by AcpiLoadTable() API, the "Reload" parameter is set.
* After sucessfully returning from this function, table is
Expand Down
6 changes: 0 additions & 6 deletions source/include/actables.h
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,6 @@ AcpiTbInstallTableWithOverride (
UINT32 *TableIndex);

ACPI_STATUS
AcpiTbInstallFixedTable (
ACPI_PHYSICAL_ADDRESS Address,
char *Signature,
UINT32 *TableIndex);

ACPI_STATUS ACPI_INIT_FUNCTION
AcpiTbParseRootTable (
ACPI_PHYSICAL_ADDRESS RsdpAddress);

Expand Down

0 comments on commit 42c7b84

Please sign in to comment.