summaryrefslogtreecommitdiffstats
path: root/sys/contrib/dev/acpica/osunixxf.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/dev/acpica/osunixxf.c')
-rw-r--r--sys/contrib/dev/acpica/osunixxf.c105
1 files changed, 31 insertions, 74 deletions
diff --git a/sys/contrib/dev/acpica/osunixxf.c b/sys/contrib/dev/acpica/osunixxf.c
index 8fc21fc..91e11fd 100644
--- a/sys/contrib/dev/acpica/osunixxf.c
+++ b/sys/contrib/dev/acpica/osunixxf.c
@@ -8,7 +8,7 @@
*
* 1. Copyright Notice
*
- * Some or all of this work - Copyright (c) 1999 - 2007, Intel Corp.
+ * Some or all of this work - Copyright (c) 1999 - 2005, Intel Corp.
* All rights reserved.
*
* 2. License
@@ -130,6 +130,8 @@
#include <contrib/dev/acpica/acparser.h>
#include <contrib/dev/acpica/acdebug.h>
+#include <contrib/dev/acpica/compiler/aslcompiler.h>
+
#define _COMPONENT ACPI_OS_SERVICES
ACPI_MODULE_NAME ("osunixxf")
@@ -137,10 +139,6 @@
extern FILE *AcpiGbl_DebugFile;
FILE *AcpiGbl_OutputFile;
-ACPI_PHYSICAL_ADDRESS
-AeLocalGetRootPointer (
- void);
-
/******************************************************************************
*
@@ -174,20 +172,22 @@ AcpiOsTerminate (void)
*
* FUNCTION: AcpiOsGetRootPointer
*
- * PARAMETERS: None
+ * PARAMETERS: Flags - Logical or physical addressing mode
+ * Address - Where the address is returned
*
- * RETURN: RSDP physical address
+ * RETURN: Status
*
* DESCRIPTION: Gets the root pointer (RSDP)
*
*****************************************************************************/
-ACPI_PHYSICAL_ADDRESS
+ACPI_STATUS
AcpiOsGetRootPointer (
- void)
+ UINT32 Flags,
+ ACPI_POINTER *Address)
{
- return (AeLocalGetRootPointer ());
+ return (AeLocalGetRootPointer(Flags, (ACPI_PHYSICAL_ADDRESS *) Address));
}
@@ -252,7 +252,7 @@ AcpiOsTableOverride (
/* This code exercises the table override mechanism in the core */
- if (ACPI_COMPARE_NAME (ExistingTable->Signature, ACPI_SIG_DSDT))
+ if (!ACPI_STRNCMP (ExistingTable->Signature, DSDT_SIG, ACPI_NAME_SIZE))
{
/* override DSDT with itself */
@@ -458,6 +458,7 @@ AcpiOsGetLine (
*
* PARAMETERS: where Physical address of memory to be mapped
* length How much memory to map
+ * there Logical address of mapped memory
*
* RETURN: Pointer to mapped memory. Null on error.
*
@@ -465,13 +466,15 @@ AcpiOsGetLine (
*
*****************************************************************************/
-void *
+ACPI_STATUS
AcpiOsMapMemory (
ACPI_PHYSICAL_ADDRESS where,
- ACPI_SIZE length)
+ ACPI_SIZE length,
+ void **there)
{
+ *there = ACPI_TO_POINTER (where);
- return (ACPI_TO_POINTER ((ACPI_NATIVE_UINT) where));
+ return AE_OK;
}
@@ -649,7 +652,7 @@ AcpiOsSignalSemaphore (
ACPI_STATUS
AcpiOsCreateLock (
- ACPI_SPINLOCK *OutHandle)
+ ACPI_HANDLE *OutHandle)
{
return (AcpiOsCreateSemaphore (1, 1, OutHandle));
@@ -657,13 +660,13 @@ AcpiOsCreateLock (
void
AcpiOsDeleteLock (
- ACPI_SPINLOCK Handle)
+ ACPI_HANDLE Handle)
{
AcpiOsDeleteSemaphore (Handle);
}
-ACPI_CPU_FLAGS
+ACPI_NATIVE_UINT
AcpiOsAcquireLock (
ACPI_HANDLE Handle)
{
@@ -674,8 +677,8 @@ AcpiOsAcquireLock (
void
AcpiOsReleaseLock (
- ACPI_SPINLOCK Handle,
- ACPI_CPU_FLAGS Flags)
+ ACPI_HANDLE Handle,
+ ACPI_NATIVE_UINT Flags)
{
AcpiOsSignalSemaphore (Handle, 1);
}
@@ -732,21 +735,21 @@ AcpiOsRemoveInterruptHandler (
/******************************************************************************
*
- * FUNCTION: AcpiOsExecute
+ * FUNCTION: AcpiOsQueueForExecution
*
- * PARAMETERS: Type - Type of execution
+ * PARAMETERS: Priority - Requested execution priority
* Function - Address of the function to execute
* Context - Passed as a parameter to the function
*
* RETURN: Status.
*
- * DESCRIPTION: Execute a new thread
+ * DESCRIPTION: Sleep at microsecond granularity
*
*****************************************************************************/
ACPI_STATUS
-AcpiOsExecute (
- ACPI_EXECUTE_TYPE Type,
+AcpiOsQueueForExecution (
+ UINT32 Priority,
ACPI_OSD_EXEC_CALLBACK Function,
void *Context)
{
@@ -773,6 +776,8 @@ AcpiOsBreakpoint (
char *Msg)
{
+ /* Print the message and do an INT 3 */
+
if (Msg)
{
AcpiOsPrintf ("AcpiOsBreakpoint: %s ****\n", Msg);
@@ -782,6 +787,7 @@ AcpiOsBreakpoint (
AcpiOsPrintf ("At AcpiOsBreakpoint ****\n");
}
+
return AE_OK;
}
@@ -865,55 +871,6 @@ AcpiOsGetTimer (void)
/******************************************************************************
*
- * FUNCTION: AcpiOsValidateInterface
- *
- * PARAMETERS: Interface - Requested interface to be validated
- *
- * RETURN: AE_OK if interface is supported, AE_SUPPORT otherwise
- *
- * DESCRIPTION: Match an interface string to the interfaces supported by the
- * host. Strings originate from an AML call to the _OSI method.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AcpiOsValidateInterface (
- char *Interface)
-{
-
- return (AE_SUPPORT);
-}
-
-
-/******************************************************************************
- *
- * FUNCTION: AcpiOsValidateAddress
- *
- * PARAMETERS: SpaceId - ACPI space ID
- * Address - Physical address
- * Length - Address length
- *
- * RETURN: AE_OK if Address/Length is valid for the SpaceId. Otherwise,
- * should return AE_AML_ILLEGAL_ADDRESS.
- *
- * DESCRIPTION: Validate a system address via the host OS. Used to validate
- * the addresses accessed by AML operation regions.
- *
- *****************************************************************************/
-
-ACPI_STATUS
-AcpiOsValidateAddress (
- UINT8 SpaceId,
- ACPI_PHYSICAL_ADDRESS Address,
- ACPI_SIZE Length)
-{
-
- return (AE_OK);
-}
-
-
-/******************************************************************************
- *
* FUNCTION: AcpiOsReadPciConfiguration
*
* PARAMETERS: PciId Seg/Bus/Dev
@@ -1103,7 +1060,7 @@ AcpiOsWriteMemory (
}
-ACPI_THREAD_ID
+UINT32
AcpiOsGetThreadId(void)
{
return getpid();
OpenPOWER on IntegriCloud