EFI: Add stubs for multi-threading OSLs to make EFI ported applications running

This patch only adds stub supports for multi-threading OSLs to make
EFI ported application running.

In order to fully support acpiexec in a non multi-threading environment,
ACPICA core itself need to be upgraded to contain full asynchrnous support.
Lv Zheng.

Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
Lv Zheng 2017-07-12 17:44:44 +08:00 committed by Zheng
parent 45bb76a55a
commit 06eafca73d
2 changed files with 66 additions and 1 deletions

View File

@ -152,6 +152,14 @@
#ifndef __ACEFI_H__
#define __ACEFI_H__
/*
* Single threaded environment where Mutex/Event/Sleep are fake. This model is
* sufficient for pre-boot AcpiExec.
*/
#ifndef DEBUGGER_THREADING
#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED
#endif /* !DEBUGGER_THREADING */
/* EDK2 EFI environemnt */
#if defined(_EDK2_EFI)

View File

@ -352,7 +352,7 @@ AcpiOsUnmapMemory (
/******************************************************************************
*
* FUNCTION: Spinlock interfaces
* FUNCTION: Single threaded stub interfaces
*
* DESCRIPTION: No-op on single threaded BIOS
*
@ -385,6 +385,63 @@ AcpiOsReleaseLock (
{
}
ACPI_STATUS
AcpiOsCreateSemaphore (
UINT32 MaxUnits,
UINT32 InitialUnits,
ACPI_HANDLE *OutHandle)
{
*OutHandle = (ACPI_HANDLE) 1;
return (AE_OK);
}
ACPI_STATUS
AcpiOsDeleteSemaphore (
ACPI_HANDLE Handle)
{
return (AE_OK);
}
ACPI_STATUS
AcpiOsWaitSemaphore (
ACPI_HANDLE Handle,
UINT32 Units,
UINT16 Timeout)
{
return (AE_OK);
}
ACPI_STATUS
AcpiOsSignalSemaphore (
ACPI_HANDLE Handle,
UINT32 Units)
{
return (AE_OK);
}
ACPI_THREAD_ID
AcpiOsGetThreadId (
void)
{
return (1);
}
ACPI_STATUS
AcpiOsExecute (
ACPI_EXECUTE_TYPE Type,
ACPI_OSD_EXEC_CALLBACK Function,
void *Context)
{
return (AE_OK);
}
void
AcpiOsWaitEventsComplete (
void)
{
return;
}
/******************************************************************************
*