2000-10-28 05:01:06 +00:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
2012-10-19 18:47:57 +00:00
|
|
|
* Name: acpiosxf.h - All interfaces to the OS Services Layer (OSL). These
|
2001-05-29 19:52:40 +00:00
|
|
|
* interfaces must be implemented by OSL to interface the
|
|
|
|
* ACPI components to the host operating system.
|
2000-10-28 05:01:06 +00:00
|
|
|
*
|
|
|
|
*****************************************************************************/
|
|
|
|
|
2011-01-13 16:12:34 +00:00
|
|
|
/*
|
2015-02-05 00:09:52 +00:00
|
|
|
* Copyright (C) 2000 - 2015, Intel Corp.
|
2000-12-21 06:56:46 +00:00
|
|
|
* All rights reserved.
|
2000-10-28 05:01:06 +00:00
|
|
|
*
|
2011-01-13 16:12:34 +00:00
|
|
|
* Redistribution and use in source and binary forms, with or without
|
|
|
|
* modification, are permitted provided that the following conditions
|
|
|
|
* are met:
|
|
|
|
* 1. Redistributions of source code must retain the above copyright
|
|
|
|
* notice, this list of conditions, and the following disclaimer,
|
|
|
|
* without modification.
|
|
|
|
* 2. Redistributions in binary form must reproduce at minimum a disclaimer
|
|
|
|
* substantially similar to the "NO WARRANTY" disclaimer below
|
|
|
|
* ("Disclaimer") and any redistribution must be conditioned upon
|
|
|
|
* including a substantially similar Disclaimer requirement for further
|
|
|
|
* binary redistribution.
|
|
|
|
* 3. Neither the names of the above-listed copyright holders nor the names
|
|
|
|
* of any contributors may be used to endorse or promote products derived
|
|
|
|
* from this software without specific prior written permission.
|
|
|
|
*
|
|
|
|
* Alternatively, this software may be distributed under the terms of the
|
|
|
|
* GNU General Public License ("GPL") version 2 as published by the Free
|
|
|
|
* Software Foundation.
|
|
|
|
*
|
|
|
|
* NO WARRANTY
|
|
|
|
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
|
|
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
|
|
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR
|
|
|
|
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
|
|
* HOLDERS OR CONTRIBUTORS BE LIABLE FOR SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
|
|
|
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
|
|
|
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
|
|
|
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
|
|
|
|
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
|
|
|
|
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
|
|
|
|
* POSSIBILITY OF SUCH DAMAGES.
|
|
|
|
*/
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
#ifndef __ACPIOSXF_H__
|
|
|
|
#define __ACPIOSXF_H__
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2009-06-01 19:24:26 +00:00
|
|
|
#include "platform/acenv.h"
|
|
|
|
#include "actypes.h"
|
2000-10-28 05:01:06 +00:00
|
|
|
|
|
|
|
|
2007-03-22 17:24:05 +00:00
|
|
|
/* Types for AcpiOsExecute */
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2007-03-22 17:24:05 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
OSL_GLOBAL_LOCK_HANDLER,
|
|
|
|
OSL_NOTIFY_HANDLER,
|
|
|
|
OSL_GPE_HANDLER,
|
2015-11-25 21:04:42 +00:00
|
|
|
OSL_DEBUGGER_MAIN_THREAD,
|
|
|
|
OSL_DEBUGGER_EXEC_THREAD,
|
2007-03-22 17:24:05 +00:00
|
|
|
OSL_EC_POLL_HANDLER,
|
|
|
|
OSL_EC_BURST_HANDLER
|
|
|
|
|
|
|
|
} ACPI_EXECUTE_TYPE;
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
#define ACPI_NO_UNIT_LIMIT ((UINT32) -1)
|
|
|
|
#define ACPI_MUTEX_SEM 1
|
2000-10-28 05:01:06 +00:00
|
|
|
|
|
|
|
|
2001-07-21 03:55:17 +00:00
|
|
|
/* Functions for AcpiOsSignal */
|
|
|
|
|
|
|
|
#define ACPI_SIGNAL_FATAL 0
|
|
|
|
#define ACPI_SIGNAL_BREAKPOINT 1
|
|
|
|
|
2003-04-29 18:39:29 +00:00
|
|
|
typedef struct acpi_signal_fatal_info
|
2001-07-21 03:55:17 +00:00
|
|
|
{
|
|
|
|
UINT32 Type;
|
|
|
|
UINT32 Code;
|
|
|
|
UINT32 Argument;
|
|
|
|
|
|
|
|
} ACPI_SIGNAL_FATAL_INFO;
|
|
|
|
|
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
2001-05-29 19:52:40 +00:00
|
|
|
* OSL Initialization and shutdown primitives
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInitialize
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsInitialize (
|
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTerminate
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsTerminate (
|
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2002-06-30 17:50:46 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* ACPI Table interfaces
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetRootPointer
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_PHYSICAL_ADDRESS
|
2001-07-21 03:55:17 +00:00
|
|
|
AcpiOsGetRootPointer (
|
2007-03-22 17:24:05 +00:00
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2002-06-30 17:50:46 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPredefinedOverride
|
2003-04-29 18:39:29 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsPredefinedOverride (
|
|
|
|
const ACPI_PREDEFINED_NAMES *InitVal,
|
|
|
|
ACPI_STRING *NewVal);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-04-29 18:39:29 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTableOverride
|
2002-06-30 17:50:46 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsTableOverride (
|
|
|
|
ACPI_TABLE_HEADER *ExistingTable,
|
|
|
|
ACPI_TABLE_HEADER **NewTable);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2001-07-21 03:55:17 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPhysicalTableOverride
|
2012-02-16 00:24:10 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsPhysicalTableOverride (
|
|
|
|
ACPI_TABLE_HEADER *ExistingTable,
|
|
|
|
ACPI_PHYSICAL_ADDRESS *NewAddress,
|
|
|
|
UINT32 *NewTableLength);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2012-02-16 00:24:10 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
2007-03-22 17:24:05 +00:00
|
|
|
* Spinlock primitives
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateLock
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsCreateLock (
|
|
|
|
ACPI_SPINLOCK *OutHandle);
|
2012-10-19 18:47:57 +00:00
|
|
|
#endif
|
2007-03-22 17:24:05 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteLock
|
2007-03-22 17:24:05 +00:00
|
|
|
void
|
|
|
|
AcpiOsDeleteLock (
|
|
|
|
ACPI_SPINLOCK Handle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2007-03-22 17:24:05 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireLock
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_CPU_FLAGS
|
|
|
|
AcpiOsAcquireLock (
|
|
|
|
ACPI_SPINLOCK Handle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2007-03-22 17:24:05 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseLock
|
2007-03-22 17:24:05 +00:00
|
|
|
void
|
|
|
|
AcpiOsReleaseLock (
|
|
|
|
ACPI_SPINLOCK Handle,
|
|
|
|
ACPI_CPU_FLAGS Flags);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2007-03-22 17:24:05 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Semaphore primitives
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateSemaphore
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsCreateSemaphore (
|
|
|
|
UINT32 MaxUnits,
|
|
|
|
UINT32 InitialUnits,
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_SEMAPHORE *OutHandle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteSemaphore
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsDeleteSemaphore (
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_SEMAPHORE Handle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitSemaphore
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsWaitSemaphore (
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_SEMAPHORE Handle,
|
2000-10-28 05:01:06 +00:00
|
|
|
UINT32 Units,
|
2002-11-27 18:07:48 +00:00
|
|
|
UINT16 Timeout);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignalSemaphore
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsSignalSemaphore (
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_SEMAPHORE Handle,
|
2000-10-28 05:01:06 +00:00
|
|
|
UINT32 Units);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2007-03-22 17:24:05 +00:00
|
|
|
|
|
|
|
/*
|
2009-06-01 21:02:40 +00:00
|
|
|
* Mutex primitives. May be configured to use semaphores instead via
|
|
|
|
* ACPI_MUTEX_TYPE (see platform/acenv.h)
|
2007-03-22 17:24:05 +00:00
|
|
|
*/
|
2009-06-01 21:02:40 +00:00
|
|
|
#if (ACPI_MUTEX_TYPE != ACPI_BINARY_SEMAPHORE)
|
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateMutex
|
2003-07-13 22:44:13 +00:00
|
|
|
ACPI_STATUS
|
2007-03-22 17:24:05 +00:00
|
|
|
AcpiOsCreateMutex (
|
|
|
|
ACPI_MUTEX *OutHandle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-07-13 22:44:13 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteMutex
|
2003-07-13 22:44:13 +00:00
|
|
|
void
|
2007-03-22 17:24:05 +00:00
|
|
|
AcpiOsDeleteMutex (
|
|
|
|
ACPI_MUTEX Handle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-07-13 22:44:13 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireMutex
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsAcquireMutex (
|
|
|
|
ACPI_MUTEX Handle,
|
|
|
|
UINT16 Timeout);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-07-13 22:44:13 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseMutex
|
2003-07-13 22:44:13 +00:00
|
|
|
void
|
2007-03-22 17:24:05 +00:00
|
|
|
AcpiOsReleaseMutex (
|
|
|
|
ACPI_MUTEX Handle);
|
2009-06-01 21:02:40 +00:00
|
|
|
#endif
|
2003-07-13 22:44:13 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
|
|
|
* Memory allocation and mapping
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocate
|
2000-10-28 05:01:06 +00:00
|
|
|
void *
|
|
|
|
AcpiOsAllocate (
|
2002-02-23 05:10:40 +00:00
|
|
|
ACPI_SIZE Size);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAllocateZeroed
|
|
|
|
void *
|
|
|
|
AcpiOsAllocateZeroed (
|
|
|
|
ACPI_SIZE Size);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsFree
|
2000-10-28 05:01:06 +00:00
|
|
|
void
|
|
|
|
AcpiOsFree (
|
|
|
|
void * Memory);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsMapMemory
|
2007-03-22 17:24:05 +00:00
|
|
|
void *
|
2000-10-28 05:01:06 +00:00
|
|
|
AcpiOsMapMemory (
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_PHYSICAL_ADDRESS Where,
|
2009-06-01 21:02:40 +00:00
|
|
|
ACPI_SIZE Length);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsUnmapMemory
|
2000-10-28 05:01:06 +00:00
|
|
|
void
|
|
|
|
AcpiOsUnmapMemory (
|
|
|
|
void *LogicalAddress,
|
2002-02-23 05:10:40 +00:00
|
|
|
ACPI_SIZE Size);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetPhysicalAddress
|
2001-01-31 09:17:50 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsGetPhysicalAddress (
|
|
|
|
void *LogicalAddress,
|
|
|
|
ACPI_PHYSICAL_ADDRESS *PhysicalAddress);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
2005-11-01 22:11:18 +00:00
|
|
|
* Memory/Object Cache
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCreateCache
|
2005-11-01 22:11:18 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsCreateCache (
|
|
|
|
char *CacheName,
|
|
|
|
UINT16 ObjectSize,
|
|
|
|
UINT16 MaxDepth,
|
|
|
|
ACPI_CACHE_T **ReturnCache);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2005-11-01 22:11:18 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsDeleteCache
|
2005-11-01 22:11:18 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsDeleteCache (
|
|
|
|
ACPI_CACHE_T *Cache);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2005-11-01 22:11:18 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPurgeCache
|
2005-11-01 22:11:18 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsPurgeCache (
|
|
|
|
ACPI_CACHE_T *Cache);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2005-11-01 22:11:18 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsAcquireObject
|
2005-11-01 22:11:18 +00:00
|
|
|
void *
|
|
|
|
AcpiOsAcquireObject (
|
|
|
|
ACPI_CACHE_T *Cache);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2005-11-01 22:11:18 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReleaseObject
|
2005-11-01 22:11:18 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsReleaseObject (
|
|
|
|
ACPI_CACHE_T *Cache,
|
|
|
|
void *Object);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2005-11-01 22:11:18 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2005-11-01 22:11:18 +00:00
|
|
|
/*
|
|
|
|
* Interrupt handlers
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsInstallInterruptHandler
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsInstallInterruptHandler (
|
|
|
|
UINT32 InterruptNumber,
|
2004-12-01 23:14:10 +00:00
|
|
|
ACPI_OSD_HANDLER ServiceRoutine,
|
2000-10-28 05:01:06 +00:00
|
|
|
void *Context);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRemoveInterruptHandler
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsRemoveInterruptHandler (
|
|
|
|
UINT32 InterruptNumber,
|
2004-12-01 23:14:10 +00:00
|
|
|
ACPI_OSD_HANDLER ServiceRoutine);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2001-05-29 19:52:40 +00:00
|
|
|
* Threads and Scheduling
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetThreadId
|
2007-03-22 17:24:05 +00:00
|
|
|
ACPI_THREAD_ID
|
2001-05-29 19:52:40 +00:00
|
|
|
AcpiOsGetThreadId (
|
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsExecute
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
2007-03-22 17:24:05 +00:00
|
|
|
AcpiOsExecute (
|
|
|
|
ACPI_EXECUTE_TYPE Type,
|
2004-12-01 23:14:10 +00:00
|
|
|
ACPI_OSD_EXEC_CALLBACK Function,
|
|
|
|
void *Context);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2004-12-01 23:14:10 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWaitEventsComplete
|
2004-12-01 23:14:10 +00:00
|
|
|
void
|
|
|
|
AcpiOsWaitEventsComplete (
|
2012-05-19 05:44:32 +00:00
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSleep
|
2000-10-28 05:01:06 +00:00
|
|
|
void
|
|
|
|
AcpiOsSleep (
|
2010-01-21 20:56:18 +00:00
|
|
|
UINT64 Milliseconds);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsStall
|
2000-10-28 05:01:06 +00:00
|
|
|
void
|
2001-07-21 03:55:17 +00:00
|
|
|
AcpiOsStall (
|
2000-10-28 05:01:06 +00:00
|
|
|
UINT32 Microseconds);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
2001-07-21 03:55:17 +00:00
|
|
|
* Platform and hardware-independent I/O interfaces
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPort
|
2001-07-21 03:55:17 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsReadPort (
|
|
|
|
ACPI_IO_ADDRESS Address,
|
2003-07-13 22:44:13 +00:00
|
|
|
UINT32 *Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePort
|
2001-07-21 03:55:17 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsWritePort (
|
|
|
|
ACPI_IO_ADDRESS Address,
|
2003-07-13 22:44:13 +00:00
|
|
|
UINT32 Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
2001-07-21 03:55:17 +00:00
|
|
|
* Platform and hardware-independent physical memory interfaces
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadMemory
|
2001-07-21 03:55:17 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsReadMemory (
|
|
|
|
ACPI_PHYSICAL_ADDRESS Address,
|
2012-02-16 00:24:10 +00:00
|
|
|
UINT64 *Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteMemory
|
2001-07-21 03:55:17 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsWriteMemory (
|
|
|
|
ACPI_PHYSICAL_ADDRESS Address,
|
2012-02-16 00:24:10 +00:00
|
|
|
UINT64 Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
|
|
|
|
|
|
|
/*
|
2001-07-21 03:55:17 +00:00
|
|
|
* Platform and hardware-independent PCI configuration space access
|
2004-12-01 23:14:10 +00:00
|
|
|
* Note: Can't use "Register" as a parameter, changed to "Reg" --
|
|
|
|
* certain compilers complain.
|
2000-10-28 05:01:06 +00:00
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadPciConfiguration
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
2001-07-21 03:55:17 +00:00
|
|
|
AcpiOsReadPciConfiguration (
|
|
|
|
ACPI_PCI_ID *PciId,
|
2004-12-01 23:14:10 +00:00
|
|
|
UINT32 Reg,
|
2010-08-06 17:28:40 +00:00
|
|
|
UINT64 *Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritePciConfiguration
|
2000-10-28 05:01:06 +00:00
|
|
|
ACPI_STATUS
|
2001-07-21 03:55:17 +00:00
|
|
|
AcpiOsWritePciConfiguration (
|
|
|
|
ACPI_PCI_ID *PciId,
|
2004-12-01 23:14:10 +00:00
|
|
|
UINT32 Reg,
|
2010-01-21 20:56:18 +00:00
|
|
|
UINT64 Value,
|
2001-07-21 03:55:17 +00:00
|
|
|
UINT32 Width);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2007-03-22 17:24:05 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
|
|
|
* Miscellaneous
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadable
|
2000-10-28 05:01:06 +00:00
|
|
|
BOOLEAN
|
|
|
|
AcpiOsReadable (
|
|
|
|
void *Pointer,
|
2003-07-13 22:44:13 +00:00
|
|
|
ACPI_SIZE Length);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWritable
|
2000-10-28 05:01:06 +00:00
|
|
|
BOOLEAN
|
|
|
|
AcpiOsWritable (
|
|
|
|
void *Pointer,
|
2003-07-13 22:44:13 +00:00
|
|
|
ACPI_SIZE Length);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTimer
|
2004-12-01 23:14:10 +00:00
|
|
|
UINT64
|
2001-06-29 20:11:04 +00:00
|
|
|
AcpiOsGetTimer (
|
|
|
|
void);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2001-06-29 20:11:04 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSignal
|
2001-07-21 03:55:17 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsSignal (
|
|
|
|
UINT32 Function,
|
|
|
|
void *Info);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2007-03-22 17:24:05 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
|
|
|
* Debug print routines
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsPrintf
|
2002-03-16 02:18:13 +00:00
|
|
|
void ACPI_INTERNAL_VAR_XFACE
|
2000-10-28 05:01:06 +00:00
|
|
|
AcpiOsPrintf (
|
2003-04-29 18:39:29 +00:00
|
|
|
const char *Format,
|
2000-10-28 05:01:06 +00:00
|
|
|
...);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsVprintf
|
2002-02-23 05:10:40 +00:00
|
|
|
void
|
2000-10-28 05:01:06 +00:00
|
|
|
AcpiOsVprintf (
|
2003-04-29 18:39:29 +00:00
|
|
|
const char *Format,
|
2000-10-28 05:01:06 +00:00
|
|
|
va_list Args);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsRedirectOutput
|
2002-07-30 19:33:39 +00:00
|
|
|
void
|
|
|
|
AcpiOsRedirectOutput (
|
|
|
|
void *Destination);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2002-07-30 19:33:39 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
|
2000-10-28 05:01:06 +00:00
|
|
|
/*
|
|
|
|
* Debug input
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetLine
|
2011-05-31 17:33:30 +00:00
|
|
|
ACPI_STATUS
|
2000-10-28 05:01:06 +00:00
|
|
|
AcpiOsGetLine (
|
2011-05-31 17:33:30 +00:00
|
|
|
char *Buffer,
|
|
|
|
UINT32 BufferLength,
|
|
|
|
UINT32 *BytesRead);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-04-29 18:39:29 +00:00
|
|
|
|
|
|
|
|
2013-05-17 23:13:40 +00:00
|
|
|
/*
|
|
|
|
* Obtain ACPI table(s)
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByName
|
2013-05-17 23:13:40 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsGetTableByName (
|
|
|
|
char *Signature,
|
|
|
|
UINT32 Instance,
|
|
|
|
ACPI_TABLE_HEADER **Table,
|
|
|
|
ACPI_PHYSICAL_ADDRESS *Address);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2013-05-17 23:13:40 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByIndex
|
2013-05-17 23:13:40 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsGetTableByIndex (
|
|
|
|
UINT32 Index,
|
|
|
|
ACPI_TABLE_HEADER **Table,
|
2013-08-23 18:01:58 +00:00
|
|
|
UINT32 *Instance,
|
2013-05-17 23:13:40 +00:00
|
|
|
ACPI_PHYSICAL_ADDRESS *Address);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2013-05-17 23:13:40 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetTableByAddress
|
2013-05-17 23:13:40 +00:00
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsGetTableByAddress (
|
|
|
|
ACPI_PHYSICAL_ADDRESS Address,
|
|
|
|
ACPI_TABLE_HEADER **Table);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2013-05-17 23:13:40 +00:00
|
|
|
|
|
|
|
|
2003-04-29 18:39:29 +00:00
|
|
|
/*
|
|
|
|
* Directory manipulation
|
|
|
|
*/
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenDirectory
|
2003-04-29 18:39:29 +00:00
|
|
|
void *
|
|
|
|
AcpiOsOpenDirectory (
|
|
|
|
char *Pathname,
|
|
|
|
char *WildcardSpec,
|
|
|
|
char RequestedFileType);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-04-29 18:39:29 +00:00
|
|
|
|
|
|
|
/* RequesteFileType values */
|
2000-10-28 05:01:06 +00:00
|
|
|
|
2003-04-29 18:39:29 +00:00
|
|
|
#define REQUEST_FILE_ONLY 0
|
|
|
|
#define REQUEST_DIR_ONLY 1
|
|
|
|
|
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetNextFilename
|
2003-04-29 18:39:29 +00:00
|
|
|
char *
|
|
|
|
AcpiOsGetNextFilename (
|
|
|
|
void *DirHandle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2003-04-29 18:39:29 +00:00
|
|
|
|
2013-10-17 00:06:42 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseDirectory
|
2003-04-29 18:39:29 +00:00
|
|
|
void
|
|
|
|
AcpiOsCloseDirectory (
|
|
|
|
void *DirHandle);
|
2013-10-17 00:06:42 +00:00
|
|
|
#endif
|
2000-10-28 05:01:06 +00:00
|
|
|
|
|
|
|
|
2014-06-27 19:10:35 +00:00
|
|
|
/*
|
|
|
|
* File I/O and related support
|
|
|
|
*/
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsOpenFile
|
|
|
|
ACPI_FILE
|
|
|
|
AcpiOsOpenFile (
|
|
|
|
const char *Path,
|
|
|
|
UINT8 Modes);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsCloseFile
|
|
|
|
void
|
|
|
|
AcpiOsCloseFile (
|
|
|
|
ACPI_FILE File);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsReadFile
|
|
|
|
int
|
|
|
|
AcpiOsReadFile (
|
|
|
|
ACPI_FILE File,
|
|
|
|
void *Buffer,
|
|
|
|
ACPI_SIZE Size,
|
|
|
|
ACPI_SIZE Count);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsWriteFile
|
|
|
|
int
|
|
|
|
AcpiOsWriteFile (
|
|
|
|
ACPI_FILE File,
|
|
|
|
void *Buffer,
|
|
|
|
ACPI_SIZE Size,
|
|
|
|
ACPI_SIZE Count);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsGetFileOffset
|
|
|
|
long
|
|
|
|
AcpiOsGetFileOffset (
|
|
|
|
ACPI_FILE File);
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsSetFileOffset
|
|
|
|
ACPI_STATUS
|
|
|
|
AcpiOsSetFileOffset (
|
|
|
|
ACPI_FILE File,
|
|
|
|
long Offset,
|
|
|
|
UINT8 From);
|
|
|
|
#endif
|
|
|
|
|
2015-07-20 22:31:50 +00:00
|
|
|
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
|
|
|
|
void
|
|
|
|
AcpiOsTracePoint (
|
|
|
|
ACPI_TRACE_EVENT_TYPE Type,
|
|
|
|
BOOLEAN Begin,
|
|
|
|
UINT8 *Aml,
|
|
|
|
char *Pathname);
|
|
|
|
#endif
|
|
|
|
|
2014-06-27 19:10:35 +00:00
|
|
|
|
2001-05-29 19:52:40 +00:00
|
|
|
#endif /* __ACPIOSXF_H__ */
|