diff options
author | Lv Zheng <lv.zheng@intel.com> | 2016-05-23 23:54:43 +0800 |
---|---|---|
committer | Lv Zheng <lv.zheng@intel.com> | 2016-06-06 12:58:33 +0800 |
commit | 43cb45b8e190959e1a519df9a1b73122b3b69d16 (patch) | |
tree | 1e9c0ceba894ca3f834d0c1d03869035b9051c79 | |
parent | feba919da450b9cf6a3caad0b5260b19d1ad9e41 (diff) | |
download | acpica-43cb45b8e190959e1a519df9a1b73122b3b69d16.tar.gz |
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>
-rw-r--r-- | source/os_specific/service_layers/osefixf.c | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/source/os_specific/service_layers/osefixf.c b/source/os_specific/service_layers/osefixf.c index 193381d00..6ba45bb21 100644 --- a/source/os_specific/service_layers/osefixf.c +++ b/source/os_specific/service_layers/osefixf.c @@ -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); +} + /****************************************************************************** * |