2005-06-29 23:48:24 +04:00
|
|
|
/*
|
2005-06-29 23:49:27 +04:00
|
|
|
__________________________________________________________________________
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| Copyright (C) Intel Corporation 1994-1996
|
|
|
|
|
|
|
|
|
| All rights reserved. No part of this program or publication may be
|
|
|
|
| reproduced, transmitted, transcribed, stored in a retrieval system, or
|
|
|
|
| translated into any language or computer language, in any form or by any
|
|
|
|
| means, electronic, mechanical, magnetic, optical, chemical, manual, or
|
|
|
|
| otherwise, without the prior written permission of Intel Corporation.
|
|
|
|
|__________________________________________________________________________
|
|
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
| FILENAME: namespace.h - prototypes for accessing namespace
|
2005-06-29 23:49:27 +04:00
|
|
|
|__________________________________________________________________________
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
#ifndef __NAMESPACE_H__
|
|
|
|
#define __NAMESPACE_H__
|
|
|
|
|
|
|
|
#include <acpiobj.h>
|
|
|
|
#include <pnp.h>
|
2005-06-29 23:49:27 +04:00
|
|
|
|
|
|
|
|
2005-06-29 23:49:30 +04:00
|
|
|
/*
|
|
|
|
* An NsHandle (which is actually an nte *) can appear in some contexts,
|
2005-06-29 23:49:27 +04:00
|
|
|
* such as on apObjStack, where a pointer to an OBJECT_DESCRIPTOR can also
|
|
|
|
* appear. This macro is used to distinguish them.
|
|
|
|
*
|
|
|
|
* The first byte of an nte is a character of the name segment, which will
|
|
|
|
* be accepted by NcOK(). The first byte of an OBJECT_DESCRIPTOR is the
|
2005-06-29 23:49:36 +04:00
|
|
|
* ValTyp field, whose (UINT8) value comes from the NsType enumeration.
|
2005-06-29 23:49:27 +04:00
|
|
|
* Valid NsType values must not include any character acceptable in a name.
|
2005-06-29 22:18:17 +04:00
|
|
|
*/
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
#define IsNsHandle(h) (NcOK ((INT32) * (char *) (h)))
|
2005-06-29 23:46:58 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
|
2005-06-29 23:49:31 +04:00
|
|
|
/* To search the entire name space, pass this as SearchBase */
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
#define NS_ALL ((NsHandle)0)
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
extern char BadType[];
|
|
|
|
extern char *NsTypeNames[];
|
2005-06-29 23:49:27 +04:00
|
|
|
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
/* Prototypes */
|
2005-06-29 23:49:35 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
PriUnloadNameSpace (
|
|
|
|
void);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 22:18:17 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsPushMethodScope (
|
|
|
|
NsHandle nNewScope);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiExecuteMethod (
|
|
|
|
char *MethodName,
|
|
|
|
OBJECT_DESCRIPTOR **ReturnValue,
|
|
|
|
OBJECT_DESCRIPTOR **Params);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:38 +04:00
|
|
|
int
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiInit (
|
|
|
|
char *);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiLoadNameSpace (
|
|
|
|
INT32 DisplayAmlDuringLoad);
|
2005-06-29 22:18:17 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiUnloadNameSpace (
|
|
|
|
void);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:35 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiCleanup (
|
|
|
|
void);
|
2005-06-29 22:18:17 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
NsType
|
2005-06-29 23:49:39 +04:00
|
|
|
NsValType (
|
|
|
|
NsHandle h);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
void *
|
2005-06-29 23:49:39 +04:00
|
|
|
NsValPtr (
|
|
|
|
NsHandle h);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 22:18:17 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsSetup (
|
|
|
|
void);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
NsPopCurrent (
|
|
|
|
NsType Type);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
NsEnter (
|
|
|
|
char *Name,
|
|
|
|
NsType Type,
|
|
|
|
OpMode iLE);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
GetParentHandle (
|
|
|
|
NsHandle Look);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
char *
|
2005-06-29 23:49:39 +04:00
|
|
|
NsNameOfCurrentScope (
|
|
|
|
void);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
char *
|
2005-06-29 23:49:39 +04:00
|
|
|
NsFullyQualifiedName (
|
|
|
|
NsHandle Look);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:48:24 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsSetMethod (
|
|
|
|
NsHandle h,
|
|
|
|
ptrdiff_t Offset,
|
|
|
|
INT32 Length);
|
|
|
|
|
2005-06-29 23:35:46 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsSetValue (
|
|
|
|
NsHandle h,
|
|
|
|
ACPI_OBJECT_HANDLE v,
|
|
|
|
UINT8 ValTyp);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:48:52 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsDumpTables (
|
|
|
|
INT32 DisplayBitFlags,
|
|
|
|
INT32 UseGraphicCharSet,
|
|
|
|
NsHandle SearchBase,
|
|
|
|
INT32 MaxDepth);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:48:24 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
NsDumpEntry (
|
|
|
|
NsHandle h,
|
|
|
|
INT32 DisplayBitFlags);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
NsHandle *
|
2005-06-29 23:49:39 +04:00
|
|
|
NsFindNames (
|
|
|
|
char *SearchFor,
|
|
|
|
NsHandle SearchBase,
|
|
|
|
INT32 MaxDepth);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
NsGetHandle (
|
|
|
|
char *Name,
|
|
|
|
NsHandle Scope);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
IsNsValue (
|
|
|
|
OBJECT_DESCRIPTOR *pOD);
|
2005-06-29 23:48:55 +04:00
|
|
|
|
2005-06-29 23:49:36 +04:00
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
NsMarkNS(
|
|
|
|
void);
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:48:54 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
#ifndef PLUMBER
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
/* dummy macros to make calls go away */
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:31 +04:00
|
|
|
#define MarkStaticBlocks(Count)
|
|
|
|
#define RegisterStaticBlockPtr(BP)
|
2005-06-29 23:49:30 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
#else
|
2005-06-29 23:48:24 +04:00
|
|
|
|
2005-06-29 23:48:52 +04:00
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
RegisterStaticBlockPtr (
|
|
|
|
void **BP);
|
2005-06-29 22:18:17 +04:00
|
|
|
|
|
|
|
void
|
2005-06-29 23:49:39 +04:00
|
|
|
MarkStaticBlocks (
|
|
|
|
INT32 *Count);
|
2005-06-29 23:01:37 +04:00
|
|
|
|
2005-06-29 23:49:27 +04:00
|
|
|
#endif /* PLUMBER */
|
2005-06-29 22:18:17 +04:00
|
|
|
|
2005-06-29 23:49:38 +04:00
|
|
|
/******************************************************************************
|
|
|
|
*
|
|
|
|
* The following are the publically defined APIs published and exposed to the OSD
|
|
|
|
*
|
|
|
|
******************************************************************************/
|
|
|
|
|
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiLoadNameSpace (
|
|
|
|
INT32 DisplayAmlDuringLoad);
|
|
|
|
|
2005-06-29 23:49:38 +04:00
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiLoadTable (
|
|
|
|
NsHandle OpRegion);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiUnLoadTable (
|
|
|
|
NsHandle TableHandle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiLoadTableFromFile (
|
|
|
|
char *FileName);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiEnumerateDevice (
|
|
|
|
NsHandle DeviceHandle,
|
|
|
|
DEVICE_ID *HidPtr,
|
|
|
|
BOOLEAN *EnumPtr);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiGetNextSubDevice(
|
|
|
|
NsHandle DeviceHandle,
|
|
|
|
UINT32 Count);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiNameToHandle (
|
|
|
|
char *NsName,
|
|
|
|
NsHandle Scope);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
char *
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiHandleToName (
|
|
|
|
NsHandle InHandle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
NsHandle
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiGetParentHandle (
|
|
|
|
NsHandle ChildHandle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
NsType
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiValueType (
|
|
|
|
NsHandle Handle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
char *
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiCurrentScopeName (
|
|
|
|
void);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
BOOLEAN
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiIsNameSpaceHandle (
|
|
|
|
NsHandle QueryHandle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
BOOLEAN
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiIsNameSpaceValue (
|
|
|
|
NsType Value);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiSetFirmwareWakingVector (
|
|
|
|
UINT32 PhysicalAddress);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
INT32
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiGetFirmwareWakingVector (
|
|
|
|
UINT32 *PhysicalAddress);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
ACPI_TABLE_HEADER *
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiGetTableHeader (
|
|
|
|
NsHandle Handle);
|
2005-06-29 23:49:38 +04:00
|
|
|
|
|
|
|
ACPI_TABLE_HEADER *
|
2005-06-29 23:49:39 +04:00
|
|
|
AcpiGetTable (
|
|
|
|
NsHandle Handle);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
#define ACPILIB_DATA_FILE_VERSION "ADF-001"
|
|
|
|
|
|
|
|
/* ACPI Table Prototypes */
|
|
|
|
|
|
|
|
/* functions visable outside of the library itself */
|
|
|
|
|
|
|
|
void
|
|
|
|
InitAcpiLibGlobals (
|
|
|
|
void);
|
|
|
|
|
|
|
|
INT32
|
|
|
|
LoadNameSpace (
|
|
|
|
INT32 DisplayAmlDuringLoad);
|
|
|
|
|
|
|
|
INT32
|
|
|
|
AcpiSetFirmwareWakingVector (
|
|
|
|
UINT32 PhysicalAddress);
|
|
|
|
|
|
|
|
INT32
|
|
|
|
AcpiGetFirmwareWakingVector (
|
|
|
|
UINT32 *PhysicalAddress);
|
|
|
|
|
|
|
|
void
|
|
|
|
AcpiCleanup (
|
|
|
|
void);
|
|
|
|
|
|
|
|
/* functions private to the library */
|
|
|
|
|
|
|
|
INT32
|
|
|
|
FindRootSystemDescriptorPointer (
|
|
|
|
ROOT_SYSTEM_DESCRIPTOR_POINTER ** RSDP,
|
|
|
|
OSD_FILE *InputFile);
|
|
|
|
|
|
|
|
INT32
|
|
|
|
VerifyTableChecksum (
|
|
|
|
void *TableHeader,
|
|
|
|
INT32 DisplayBitFlags);
|
|
|
|
|
|
|
|
void *
|
|
|
|
GetTable (
|
|
|
|
UINT32 PhysicalAddress,
|
|
|
|
OSD_FILE *InputFile);
|
|
|
|
|
|
|
|
void *
|
|
|
|
GetFACS (
|
|
|
|
OSD_FILE *InputFile);
|
|
|
|
|
2005-06-29 23:49:38 +04:00
|
|
|
|
2005-06-29 23:49:39 +04:00
|
|
|
#endif /* __NAMESPACE_H__ */
|