mirror of https://github.com/acpica/acpica/
EFI: Add table OSL supports for acpiexec
This patch implements table OSLs for acpiexec in EFI environment: 1. Adds AcpiOsTableOverride() to use acpiexec loaded xSDT tables. 2. Adds a stub AcpiOsPhysicalTableOverride(). Note that currently we only support emulator mode acpiexec in EFI environment, thus all table overrides, RSDP location are implemented in the same way as its windows/unix versions. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
parent
feba919da4
commit
43cb45b8e1
|
@ -121,8 +121,17 @@
|
|||
ACPI_MODULE_NAME ("osefixf")
|
||||
|
||||
|
||||
/* Upcalls to AcpiExec */
|
||||
|
||||
void
|
||||
AeTableOverride (
|
||||
ACPI_TABLE_HEADER *ExistingTable,
|
||||
ACPI_TABLE_HEADER **NewTable);
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
#ifndef ACPI_USE_NATIVE_RSDP_POINTER
|
||||
|
||||
static BOOLEAN
|
||||
AcpiEfiCompareGuid (
|
||||
EFI_GUID *Guid1,
|
||||
|
@ -232,6 +241,74 @@ AcpiOsGetRootPointer (
|
|||
return (Address);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiOsTableOverride
|
||||
*
|
||||
* PARAMETERS: ExistingTable - Header of current table (probably
|
||||
* firmware)
|
||||
* NewTable - Where an entire new table is returned.
|
||||
*
|
||||
* RETURN: Status, pointer to new table. Null pointer returned if no
|
||||
* table is available to override
|
||||
*
|
||||
* DESCRIPTION: Return a different version of a table if one is available
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiOsTableOverride (
|
||||
ACPI_TABLE_HEADER *ExistingTable,
|
||||
ACPI_TABLE_HEADER **NewTable)
|
||||
{
|
||||
|
||||
if (!ExistingTable || !NewTable)
|
||||
{
|
||||
return (AE_BAD_PARAMETER);
|
||||
}
|
||||
|
||||
*NewTable = NULL;
|
||||
|
||||
#ifdef ACPI_EXEC_APP
|
||||
|
||||
AeTableOverride (ExistingTable, NewTable);
|
||||
return (AE_OK);
|
||||
#else
|
||||
|
||||
return (AE_NO_ACPI_TABLES);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiOsPhysicalTableOverride
|
||||
*
|
||||
* PARAMETERS: ExistingTable - Header of current table (probably firmware)
|
||||
* NewAddress - Where new table address is returned
|
||||
* (Physical address)
|
||||
* NewTableLength - Where new table length is returned
|
||||
*
|
||||
* RETURN: Status, address/length of new table. Null pointer returned
|
||||
* if no table is available to override.
|
||||
*
|
||||
* DESCRIPTION: Returns AE_SUPPORT, function not used in user space.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiOsPhysicalTableOverride (
|
||||
ACPI_TABLE_HEADER *ExistingTable,
|
||||
ACPI_PHYSICAL_ADDRESS *NewAddress,
|
||||
UINT32 *NewTableLength)
|
||||
{
|
||||
|
||||
return (AE_SUPPORT);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue