mirror of
https://github.com/reactos/reactos.git
synced 2024-07-15 08:56:08 +00:00
[ACPICA]
- Update to version 20160729 CORE-12833 svn path=/trunk/; revision=73910
This commit is contained in:
parent
b71b5767ea
commit
c9953bd506
|
@ -173,7 +173,7 @@ add_library(acpica
|
|||
acpica/utilities/utglobal.c)
|
||||
|
||||
add_pch(acpica acpica/include/acpi.h ACPICA_SOURCE)
|
||||
set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE;ACPI_USE_SYSTEM_CLIBRARY")
|
||||
set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE;ACPI_USE_SYSTEM_INTTYPES")
|
||||
add_dependencies(acpica bugcodes xdk)
|
||||
|
||||
list(APPEND ACPI_SOURCE
|
||||
|
|
|
@ -44,11 +44,9 @@
|
|||
#ifndef _ACAPPS
|
||||
#define _ACAPPS
|
||||
|
||||
#include <stdio.h>
|
||||
|
||||
#ifdef _MSC_VER /* disable some level-4 warnings */
|
||||
#pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */
|
||||
#endif
|
||||
#ifdef ACPI_USE_STANDARD_HEADERS
|
||||
#include <sys/stat.h>
|
||||
#endif /* ACPI_USE_STANDARD_HEADERS */
|
||||
|
||||
/* Common info for tool signons */
|
||||
|
||||
|
@ -85,13 +83,13 @@
|
|||
/* Macros for usage messages */
|
||||
|
||||
#define ACPI_USAGE_HEADER(Usage) \
|
||||
AcpiOsPrintf ("Usage: %s\nOptions:\n", Usage);
|
||||
printf ("Usage: %s\nOptions:\n", Usage);
|
||||
|
||||
#define ACPI_USAGE_TEXT(Description) \
|
||||
AcpiOsPrintf (Description);
|
||||
printf (Description);
|
||||
|
||||
#define ACPI_OPTION(Name, Description) \
|
||||
AcpiOsPrintf (" %-20s%s\n", Name, Description);
|
||||
printf (" %-20s%s\n", Name, Description);
|
||||
|
||||
|
||||
/* Check for unexpected exceptions */
|
||||
|
|
|
@ -73,6 +73,23 @@ extern const UINT8 AcpiGbl_Ctypes[];
|
|||
#define isprint(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP | _ACPI_DI | _ACPI_XS | _ACPI_PU))
|
||||
#define isalpha(c) (AcpiGbl_Ctypes[(unsigned char)(c)] & (_ACPI_LO | _ACPI_UP))
|
||||
|
||||
/* Error code */
|
||||
|
||||
#define EPERM 1 /* Operation not permitted */
|
||||
#define ENOENT 2 /* No such file or directory */
|
||||
#define EINTR 4 /* Interrupted system call */
|
||||
#define EIO 5 /* I/O error */
|
||||
#define EBADF 9 /* Bad file number */
|
||||
#define EAGAIN 11 /* Try again */
|
||||
#define ENOMEM 12 /* Out of memory */
|
||||
#define EACCES 13 /* Permission denied */
|
||||
#define EFAULT 14 /* Bad address */
|
||||
#define EBUSY 16 /* Device or resource busy */
|
||||
#define EEXIST 17 /* File exists */
|
||||
#define ENODEV 19 /* No such device */
|
||||
#define EINVAL 22 /* Invalid argument */
|
||||
#define EPIPE 32 /* Broken pipe */
|
||||
#define ERANGE 34 /* Math result not representable */
|
||||
|
||||
/* Strings */
|
||||
|
||||
|
@ -164,4 +181,105 @@ int
|
|||
toupper (
|
||||
int c);
|
||||
|
||||
/*
|
||||
* utprint - printf/vprintf output functions
|
||||
*/
|
||||
const char *
|
||||
AcpiUtScanNumber (
|
||||
const char *String,
|
||||
UINT64 *NumberPtr);
|
||||
|
||||
const char *
|
||||
AcpiUtPrintNumber (
|
||||
char *String,
|
||||
UINT64 Number);
|
||||
|
||||
int
|
||||
vsnprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
va_list Args);
|
||||
|
||||
int
|
||||
snprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
...);
|
||||
|
||||
int
|
||||
sprintf (
|
||||
char *String,
|
||||
const char *Format,
|
||||
...);
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
#define SEEK_SET 0
|
||||
#define SEEK_CUR 1
|
||||
#define SEEK_END 2
|
||||
|
||||
/*
|
||||
* NOTE: Currently we only need to update errno for file IOs. Other
|
||||
* Clibrary invocations in ACPICA do not make descisions according to
|
||||
* the errno.
|
||||
*/
|
||||
extern int errno;
|
||||
|
||||
int
|
||||
vprintf (
|
||||
const char *Format,
|
||||
va_list Args);
|
||||
|
||||
int
|
||||
printf (
|
||||
const char *Format,
|
||||
...);
|
||||
|
||||
int
|
||||
vfprintf (
|
||||
FILE *File,
|
||||
const char *Format,
|
||||
va_list Args);
|
||||
|
||||
int
|
||||
fprintf (
|
||||
FILE *File,
|
||||
const char *Format,
|
||||
...);
|
||||
|
||||
FILE *
|
||||
fopen (
|
||||
const char *Path,
|
||||
const char *Modes);
|
||||
|
||||
void
|
||||
fclose (
|
||||
FILE *File);
|
||||
|
||||
int
|
||||
fread (
|
||||
void *Buffer,
|
||||
ACPI_SIZE Size,
|
||||
ACPI_SIZE Count,
|
||||
FILE *File);
|
||||
|
||||
int
|
||||
fwrite (
|
||||
void *Buffer,
|
||||
ACPI_SIZE Size,
|
||||
ACPI_SIZE Count,
|
||||
FILE *File);
|
||||
|
||||
int
|
||||
fseek (
|
||||
FILE *File,
|
||||
long Offset,
|
||||
int From);
|
||||
|
||||
long
|
||||
ftell (
|
||||
FILE *File);
|
||||
#endif
|
||||
|
||||
#endif /* _ACCLIB_H */
|
||||
|
|
|
@ -146,6 +146,10 @@
|
|||
|
||||
#define ACPI_ADDRESS_RANGE_MAX 2
|
||||
|
||||
/* Maximum number of While() loops before abort */
|
||||
|
||||
#define ACPI_MAX_LOOP_COUNT 0xFFFF
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
|
|
|
@ -109,6 +109,7 @@ typedef enum
|
|||
ACPI_DMT_UINT64,
|
||||
ACPI_DMT_BUF7,
|
||||
ACPI_DMT_BUF10,
|
||||
ACPI_DMT_BUF12,
|
||||
ACPI_DMT_BUF16,
|
||||
ACPI_DMT_BUF128,
|
||||
ACPI_DMT_SIG,
|
||||
|
@ -279,8 +280,8 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst[];
|
|||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoErst0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFacs[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt3[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt4[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt5[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFadt6[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoFpdt[];
|
||||
|
@ -386,6 +387,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcctHdr[];
|
|||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct0[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPcct2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRasf[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp1[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoRsdp2[];
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoS3pt[];
|
||||
|
@ -423,6 +425,9 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoXenv[];
|
|||
|
||||
extern ACPI_DMTABLE_INFO AcpiDmTableInfoGeneric[][2];
|
||||
|
||||
extern ACPI_DMTABLE_INFO *FadtRevisionInfo [ACPI_FADT_MAX_VERSION + 1];
|
||||
|
||||
|
||||
/*
|
||||
* dmtable and ahtable
|
||||
*/
|
||||
|
|
|
@ -392,6 +392,7 @@ ACPI_GLOBAL (const char, *AcpiGbl_PldShapeList[]);
|
|||
|
||||
ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_DebugFile, NULL);
|
||||
ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_OutputFile, NULL);
|
||||
ACPI_INIT_GLOBAL (BOOLEAN, AcpiGbl_DebugTimeout, FALSE);
|
||||
|
||||
/* Print buffer */
|
||||
|
||||
|
|
|
@ -492,6 +492,15 @@ AcpiOsGetLine (
|
|||
UINT32 *BytesRead);
|
||||
#endif
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
|
||||
void
|
||||
AcpiOsTracePoint (
|
||||
ACPI_TRACE_EVENT_TYPE Type,
|
||||
BOOLEAN Begin,
|
||||
UINT8 *Aml,
|
||||
char *Pathname);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Obtain ACPI table(s)
|
||||
|
@ -552,62 +561,4 @@ AcpiOsCloseDirectory (
|
|||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* 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
|
||||
|
||||
#ifndef ACPI_USE_ALTERNATE_PROTOTYPE_AcpiOsTracePoint
|
||||
void
|
||||
AcpiOsTracePoint (
|
||||
ACPI_TRACE_EVENT_TYPE Type,
|
||||
BOOLEAN Begin,
|
||||
UINT8 *Aml,
|
||||
char *Pathname);
|
||||
#endif
|
||||
|
||||
|
||||
#endif /* __ACPIOSXF_H__ */
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20160527
|
||||
#define ACPI_CA_VERSION 0x20160729
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
@ -420,29 +420,29 @@ ACPI_GLOBAL (BOOLEAN, AcpiGbl_SystemAwakeAndRunning);
|
|||
* Initialization
|
||||
*/
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeTables (
|
||||
ACPI_TABLE_DESC *InitialStorage,
|
||||
UINT32 InitialTableCount,
|
||||
BOOLEAN AllowResize))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeSubsystem (
|
||||
void))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiEnableSubsystem (
|
||||
UINT32 Flags))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeObjects (
|
||||
UINT32 Flags))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiTerminate (
|
||||
void))
|
||||
|
||||
|
@ -520,7 +520,7 @@ AcpiDecodePldBuffer (
|
|||
* ACPI table load/unload interfaces
|
||||
*/
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInstallTable (
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
BOOLEAN Physical))
|
||||
|
@ -536,7 +536,7 @@ AcpiUnloadParentTable (
|
|||
ACPI_HANDLE Object))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiLoadTables (
|
||||
void))
|
||||
|
||||
|
@ -545,12 +545,12 @@ AcpiLoadTables (
|
|||
* ACPI table manipulation interfaces
|
||||
*/
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiReallocateRootTable (
|
||||
void))
|
||||
|
||||
ACPI_EXTERNAL_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiFindRootPointer (
|
||||
ACPI_PHYSICAL_ADDRESS *RsdpAddress))
|
||||
|
||||
|
@ -1232,13 +1232,6 @@ AcpiTracePoint (
|
|||
UINT8 *Aml,
|
||||
char *Pathname))
|
||||
|
||||
ACPI_APP_DEPENDENT_RETURN_VOID (
|
||||
ACPI_PRINTF_LIKE(1)
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
AcpiLogError (
|
||||
const char *Format,
|
||||
...))
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiInitializeDebugger (
|
||||
void);
|
||||
|
|
|
@ -242,7 +242,7 @@ AcpiTbInstallFixedTable (
|
|||
char *Signature,
|
||||
UINT32 *TableIndex);
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiTbParseRootTable (
|
||||
ACPI_PHYSICAL_ADDRESS RsdpAddress);
|
||||
|
||||
|
|
|
@ -256,62 +256,72 @@ typedef struct acpi_table_facs
|
|||
|
||||
typedef struct acpi_table_fadt
|
||||
{
|
||||
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
|
||||
UINT32 Facs; /* 32-bit physical address of FACS */
|
||||
UINT32 Dsdt; /* 32-bit physical address of DSDT */
|
||||
UINT8 Model; /* System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
|
||||
UINT8 PreferredProfile; /* Conveys preferred power management profile to OSPM. */
|
||||
UINT16 SciInterrupt; /* System vector of SCI interrupt */
|
||||
UINT32 SmiCommand; /* 32-bit Port address of SMI command port */
|
||||
UINT8 AcpiEnable; /* Value to write to SMI_CMD to enable ACPI */
|
||||
UINT8 AcpiDisable; /* Value to write to SMI_CMD to disable ACPI */
|
||||
UINT8 S4BiosRequest; /* Value to write to SMI_CMD to enter S4BIOS state */
|
||||
UINT8 PstateControl; /* Processor performance state control*/
|
||||
UINT32 Pm1aEventBlock; /* 32-bit port address of Power Mgt 1a Event Reg Blk */
|
||||
UINT32 Pm1bEventBlock; /* 32-bit port address of Power Mgt 1b Event Reg Blk */
|
||||
UINT32 Pm1aControlBlock; /* 32-bit port address of Power Mgt 1a Control Reg Blk */
|
||||
UINT32 Pm1bControlBlock; /* 32-bit port address of Power Mgt 1b Control Reg Blk */
|
||||
UINT32 Pm2ControlBlock; /* 32-bit port address of Power Mgt 2 Control Reg Blk */
|
||||
UINT32 PmTimerBlock; /* 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
|
||||
UINT32 Gpe0Block; /* 32-bit port address of General Purpose Event 0 Reg Blk */
|
||||
UINT32 Gpe1Block; /* 32-bit port address of General Purpose Event 1 Reg Blk */
|
||||
UINT8 Pm1EventLength; /* Byte Length of ports at Pm1xEventBlock */
|
||||
UINT8 Pm1ControlLength; /* Byte Length of ports at Pm1xControlBlock */
|
||||
UINT8 Pm2ControlLength; /* Byte Length of ports at Pm2ControlBlock */
|
||||
UINT8 PmTimerLength; /* Byte Length of ports at PmTimerBlock */
|
||||
UINT8 Gpe0BlockLength; /* Byte Length of ports at Gpe0Block */
|
||||
UINT8 Gpe1BlockLength; /* Byte Length of ports at Gpe1Block */
|
||||
UINT8 Gpe1Base; /* Offset in GPE number space where GPE1 events start */
|
||||
UINT8 CstControl; /* Support for the _CST object and C-States change notification */
|
||||
UINT16 C2Latency; /* Worst case HW latency to enter/exit C2 state */
|
||||
UINT16 C3Latency; /* Worst case HW latency to enter/exit C3 state */
|
||||
UINT16 FlushSize; /* Processor memory cache line width, in bytes */
|
||||
UINT16 FlushStride; /* Number of flush strides that need to be read */
|
||||
UINT8 DutyOffset; /* Processor duty cycle index in processor P_CNT reg */
|
||||
UINT8 DutyWidth; /* Processor duty cycle value bit width in P_CNT register */
|
||||
UINT8 DayAlarm; /* Index to day-of-month alarm in RTC CMOS RAM */
|
||||
UINT8 MonthAlarm; /* Index to month-of-year alarm in RTC CMOS RAM */
|
||||
UINT8 Century; /* Index to century in RTC CMOS RAM */
|
||||
UINT16 BootFlags; /* IA-PC Boot Architecture Flags (see below for individual flags) */
|
||||
UINT8 Reserved; /* Reserved, must be zero */
|
||||
UINT32 Flags; /* Miscellaneous flag bits (see below for individual flags) */
|
||||
ACPI_GENERIC_ADDRESS ResetRegister; /* 64-bit address of the Reset register */
|
||||
UINT8 ResetValue; /* Value to write to the ResetRegister port to reset the system */
|
||||
UINT16 ArmBootFlags; /* ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
|
||||
UINT8 MinorRevision; /* FADT Minor Revision (ACPI 5.1) */
|
||||
UINT64 XFacs; /* 64-bit physical address of FACS */
|
||||
UINT64 XDsdt; /* 64-bit physical address of DSDT */
|
||||
ACPI_GENERIC_ADDRESS XPm1aEventBlock; /* 64-bit Extended Power Mgt 1a Event Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1bEventBlock; /* 64-bit Extended Power Mgt 1b Event Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1aControlBlock; /* 64-bit Extended Power Mgt 1a Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1bControlBlock; /* 64-bit Extended Power Mgt 1b Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm2ControlBlock; /* 64-bit Extended Power Mgt 2 Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPmTimerBlock; /* 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XGpe0Block; /* 64-bit Extended General Purpose Event 0 Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XGpe1Block; /* 64-bit Extended General Purpose Event 1 Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS SleepControl; /* 64-bit Sleep Control register (ACPI 5.0) */
|
||||
ACPI_GENERIC_ADDRESS SleepStatus; /* 64-bit Sleep Status register (ACPI 5.0) */
|
||||
UINT64 HypervisorId; /* Hypervisor Vendor ID (ACPI 6.0) */
|
||||
ACPI_TABLE_HEADER Header; /* [V1] Common ACPI table header */
|
||||
UINT32 Facs; /* [V1] 32-bit physical address of FACS */
|
||||
UINT32 Dsdt; /* [V1] 32-bit physical address of DSDT */
|
||||
UINT8 Model; /* [V1] System Interrupt Model (ACPI 1.0) - not used in ACPI 2.0+ */
|
||||
UINT8 PreferredProfile; /* [V1] Conveys preferred power management profile to OSPM. */
|
||||
UINT16 SciInterrupt; /* [V1] System vector of SCI interrupt */
|
||||
UINT32 SmiCommand; /* [V1] 32-bit Port address of SMI command port */
|
||||
UINT8 AcpiEnable; /* [V1] Value to write to SMI_CMD to enable ACPI */
|
||||
UINT8 AcpiDisable; /* [V1] Value to write to SMI_CMD to disable ACPI */
|
||||
UINT8 S4BiosRequest; /* [V1] Value to write to SMI_CMD to enter S4BIOS state */
|
||||
UINT8 PstateControl; /* [V1] Processor performance state control*/
|
||||
UINT32 Pm1aEventBlock; /* [V1] 32-bit port address of Power Mgt 1a Event Reg Blk */
|
||||
UINT32 Pm1bEventBlock; /* [V1] 32-bit port address of Power Mgt 1b Event Reg Blk */
|
||||
UINT32 Pm1aControlBlock; /* [V1] 32-bit port address of Power Mgt 1a Control Reg Blk */
|
||||
UINT32 Pm1bControlBlock; /* [V1] 32-bit port address of Power Mgt 1b Control Reg Blk */
|
||||
UINT32 Pm2ControlBlock; /* [V1] 32-bit port address of Power Mgt 2 Control Reg Blk */
|
||||
UINT32 PmTimerBlock; /* [V1] 32-bit port address of Power Mgt Timer Ctrl Reg Blk */
|
||||
UINT32 Gpe0Block; /* [V1] 32-bit port address of General Purpose Event 0 Reg Blk */
|
||||
UINT32 Gpe1Block; /* [V1] 32-bit port address of General Purpose Event 1 Reg Blk */
|
||||
UINT8 Pm1EventLength; /* [V1] Byte Length of ports at Pm1xEventBlock */
|
||||
UINT8 Pm1ControlLength; /* [V1] Byte Length of ports at Pm1xControlBlock */
|
||||
UINT8 Pm2ControlLength; /* [V1] Byte Length of ports at Pm2ControlBlock */
|
||||
UINT8 PmTimerLength; /* [V1] Byte Length of ports at PmTimerBlock */
|
||||
UINT8 Gpe0BlockLength; /* [V1] Byte Length of ports at Gpe0Block */
|
||||
UINT8 Gpe1BlockLength; /* [V1] Byte Length of ports at Gpe1Block */
|
||||
UINT8 Gpe1Base; /* [V1] Offset in GPE number space where GPE1 events start */
|
||||
UINT8 CstControl; /* [V1] Support for the _CST object and C-States change notification */
|
||||
UINT16 C2Latency; /* [V1] Worst case HW latency to enter/exit C2 state */
|
||||
UINT16 C3Latency; /* [V1] Worst case HW latency to enter/exit C3 state */
|
||||
UINT16 FlushSize; /* [V1] Processor memory cache line width, in bytes */
|
||||
UINT16 FlushStride; /* [V1] Number of flush strides that need to be read */
|
||||
UINT8 DutyOffset; /* [V1] Processor duty cycle index in processor P_CNT reg */
|
||||
UINT8 DutyWidth; /* [V1] Processor duty cycle value bit width in P_CNT register */
|
||||
UINT8 DayAlarm; /* [V1] Index to day-of-month alarm in RTC CMOS RAM */
|
||||
UINT8 MonthAlarm; /* [V1] Index to month-of-year alarm in RTC CMOS RAM */
|
||||
UINT8 Century; /* [V1] Index to century in RTC CMOS RAM */
|
||||
UINT16 BootFlags; /* [V3] IA-PC Boot Architecture Flags (see below for individual flags) */
|
||||
UINT8 Reserved; /* [V1] Reserved, must be zero */
|
||||
UINT32 Flags; /* [V1] Miscellaneous flag bits (see below for individual flags) */
|
||||
/* End of Version 1 FADT fields (ACPI 1.0) */
|
||||
|
||||
ACPI_GENERIC_ADDRESS ResetRegister; /* [V3] 64-bit address of the Reset register */
|
||||
UINT8 ResetValue; /* [V3] Value to write to the ResetRegister port to reset the system */
|
||||
UINT16 ArmBootFlags; /* [V5] ARM-Specific Boot Flags (see below for individual flags) (ACPI 5.1) */
|
||||
UINT8 MinorRevision; /* [V5] FADT Minor Revision (ACPI 5.1) */
|
||||
UINT64 XFacs; /* [V3] 64-bit physical address of FACS */
|
||||
UINT64 XDsdt; /* [V3] 64-bit physical address of DSDT */
|
||||
ACPI_GENERIC_ADDRESS XPm1aEventBlock; /* [V3] 64-bit Extended Power Mgt 1a Event Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1bEventBlock; /* [V3] 64-bit Extended Power Mgt 1b Event Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1aControlBlock; /* [V3] 64-bit Extended Power Mgt 1a Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm1bControlBlock; /* [V3] 64-bit Extended Power Mgt 1b Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPm2ControlBlock; /* [V3] 64-bit Extended Power Mgt 2 Control Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XPmTimerBlock; /* [V3] 64-bit Extended Power Mgt Timer Ctrl Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XGpe0Block; /* [V3] 64-bit Extended General Purpose Event 0 Reg Blk address */
|
||||
ACPI_GENERIC_ADDRESS XGpe1Block; /* [V3] 64-bit Extended General Purpose Event 1 Reg Blk address */
|
||||
/* End of Version 3 FADT fields (ACPI 2.0) */
|
||||
|
||||
ACPI_GENERIC_ADDRESS SleepControl; /* [V4] 64-bit Sleep Control register (ACPI 5.0) */
|
||||
/* End of Version 4 FADT fields (ACPI 3.0 and ACPI 4.0) (Field was originally reserved in ACPI 3.0) */
|
||||
|
||||
ACPI_GENERIC_ADDRESS SleepStatus; /* [V5] 64-bit Sleep Status register (ACPI 5.0) */
|
||||
/* End of Version 5 FADT fields (ACPI 5.0) */
|
||||
|
||||
UINT64 HypervisorId; /* [V6] Hypervisor Vendor ID (ACPI 6.0) */
|
||||
/* End of Version 6 FADT fields (ACPI 6.0) */
|
||||
|
||||
|
||||
} ACPI_TABLE_FADT;
|
||||
|
||||
|
@ -327,8 +337,8 @@ typedef struct acpi_table_fadt
|
|||
|
||||
/* Masks for FADT ARM Boot Architecture Flags (arm_boot_flags) ACPI 5.1 */
|
||||
|
||||
#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: [V5+] PSCI 0.2+ is implemented */
|
||||
#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: [V5+] HVC must be used instead of SMC as the PSCI conduit */
|
||||
#define ACPI_FADT_PSCI_COMPLIANT (1) /* 00: [V5] PSCI 0.2+ is implemented */
|
||||
#define ACPI_FADT_PSCI_USE_HVC (1<<1) /* 01: [V5] HVC must be used instead of SMC as the PSCI conduit */
|
||||
|
||||
/* Masks for FADT flags */
|
||||
|
||||
|
@ -435,20 +445,34 @@ typedef struct acpi_table_desc
|
|||
* match the expected length. In other words, the length of the
|
||||
* FADT is the bottom line as to what the version really is.
|
||||
*
|
||||
* For reference, the values below are as follows:
|
||||
* FADT V1 size: 0x074
|
||||
* FADT V2 size: 0x084
|
||||
* FADT V3 size: 0x0F4
|
||||
* FADT V4 size: 0x0F4
|
||||
* FADT V5 size: 0x10C
|
||||
* FADT V6 size: 0x114
|
||||
* NOTE: There is no officialy released V2 of the FADT. This
|
||||
* version was used only for prototyping and testing during the
|
||||
* 32-bit to 64-bit transition. V3 was the first official 64-bit
|
||||
* version of the FADT.
|
||||
*
|
||||
* Update this list of defines when a new version of the FADT is
|
||||
* added to the ACPI specification. Note that the FADT version is
|
||||
* only incremented when new fields are appended to the existing
|
||||
* version. Therefore, the FADT version is competely independent
|
||||
* from the version of the ACPI specification where it is
|
||||
* defined.
|
||||
*
|
||||
* For reference, the various FADT lengths are as follows:
|
||||
* FADT V1 size: 0x074 ACPI 1.0
|
||||
* FADT V3 size: 0x0F4 ACPI 2.0
|
||||
* FADT V4 size: 0x100 ACPI 3.0 and ACPI 4.0
|
||||
* FADT V5 size: 0x10C ACPI 5.0
|
||||
* FADT V6 size: 0x114 ACPI 6.0
|
||||
*/
|
||||
#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4)
|
||||
#define ACPI_FADT_V2_SIZE (UINT32) (ACPI_FADT_OFFSET (MinorRevision) + 1)
|
||||
#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl))
|
||||
#define ACPI_FADT_V5_SIZE (UINT32) (ACPI_FADT_OFFSET (HypervisorId))
|
||||
#define ACPI_FADT_V6_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT))
|
||||
#define ACPI_FADT_V1_SIZE (UINT32) (ACPI_FADT_OFFSET (Flags) + 4) /* ACPI 1.0 */
|
||||
#define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl)) /* ACPI 2.0 */
|
||||
#define ACPI_FADT_V4_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepStatus)) /* ACPI 3.0 and ACPI 4.0 */
|
||||
#define ACPI_FADT_V5_SIZE (UINT32) (ACPI_FADT_OFFSET (HypervisorId)) /* ACPI 5.0 */
|
||||
#define ACPI_FADT_V6_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT)) /* ACPI 6.0 */
|
||||
|
||||
/* Update these when new FADT versions are added */
|
||||
|
||||
#define ACPI_FADT_MAX_VERSION 6
|
||||
#define ACPI_FADT_CONFORMANCE "ACPI 6.1 (FADT version 6)"
|
||||
|
||||
#endif /* __ACTBL_H__ */
|
||||
|
|
|
@ -1387,16 +1387,6 @@ typedef enum
|
|||
#define ACPI_OSI_WIN_10 0x0D
|
||||
|
||||
|
||||
/* Definitions of file IO */
|
||||
|
||||
#define ACPI_FILE_READING 0x01
|
||||
#define ACPI_FILE_WRITING 0x02
|
||||
#define ACPI_FILE_BINARY 0x04
|
||||
|
||||
#define ACPI_FILE_BEGIN 0x01
|
||||
#define ACPI_FILE_END 0x02
|
||||
|
||||
|
||||
/* Definitions of getopt */
|
||||
|
||||
#define ACPI_OPT_END -1
|
||||
|
|
|
@ -1067,48 +1067,6 @@ AcpiAhMatchUuid (
|
|||
UINT8 *Data);
|
||||
|
||||
|
||||
/*
|
||||
* utprint - printf/vprintf output functions
|
||||
*/
|
||||
const char *
|
||||
AcpiUtScanNumber (
|
||||
const char *String,
|
||||
UINT64 *NumberPtr);
|
||||
|
||||
const char *
|
||||
AcpiUtPrintNumber (
|
||||
char *String,
|
||||
UINT64 Number);
|
||||
|
||||
int
|
||||
AcpiUtVsnprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
va_list Args);
|
||||
|
||||
int
|
||||
AcpiUtSnprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
...);
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
int
|
||||
AcpiUtFileVprintf (
|
||||
ACPI_FILE File,
|
||||
const char *Format,
|
||||
va_list Args);
|
||||
|
||||
int
|
||||
AcpiUtFilePrintf (
|
||||
ACPI_FILE File,
|
||||
const char *Format,
|
||||
...);
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* utuuid -- UUID support functions
|
||||
*/
|
||||
|
|
|
@ -47,6 +47,7 @@
|
|||
/*
|
||||
* ACPICA configuration
|
||||
*/
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
#define ACPI_USE_DO_WHILE_0
|
||||
#define ACPI_FLUSH_CPU_CACHE()
|
||||
|
@ -58,11 +59,9 @@
|
|||
#define ACPI_USE_ALTERNATE_TIMEOUT
|
||||
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#ifdef ACPI_USE_STANDARD_HEADERS
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#if defined(__ia64__) || defined(__x86_64__)
|
||||
#define ACPI_MACHINE_WIDTH 64
|
||||
|
@ -86,10 +85,6 @@
|
|||
|
||||
#define ACPI_CAST_PTHREAD_T(pthread) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (pthread))
|
||||
|
||||
/* Cygwin uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
|
||||
|
||||
/*
|
||||
* The vsnprintf/snprintf functions are defined by c99, but cygwin/gcc
|
||||
|
|
|
@ -44,7 +44,6 @@
|
|||
#ifndef __ACDRAGONFLY_H_
|
||||
#define __ACDRAGONFLY_H_
|
||||
|
||||
#include <platform/acgcc.h> /* DragonFly uses GCC */
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __LP64__
|
||||
|
|
|
@ -44,10 +44,12 @@
|
|||
#ifndef __ACEFI_H__
|
||||
#define __ACEFI_H__
|
||||
|
||||
#include <stdarg.h>
|
||||
#if defined(_GNU_EFI)
|
||||
#include <stdint.h>
|
||||
#include <unistd.h>
|
||||
/* EDK2 EFI environemnt */
|
||||
|
||||
#if defined(_EDK2_EFI)
|
||||
|
||||
#define _GNU_EFI
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__)
|
||||
|
@ -57,23 +59,13 @@
|
|||
#endif
|
||||
|
||||
#ifdef _MSC_EXTENSIONS
|
||||
#define EFIAPI __cdecl
|
||||
#define ACPI_EFI_API __cdecl
|
||||
#elif USE_MS_ABI
|
||||
#define EFIAPI __attribute__((ms_abi))
|
||||
#define ACPI_EFI_API __attribute__((ms_abi))
|
||||
#else
|
||||
#define EFIAPI
|
||||
#define ACPI_EFI_API
|
||||
#endif
|
||||
|
||||
typedef uint8_t UINT8;
|
||||
typedef uint16_t UINT16;
|
||||
typedef int16_t INT16;
|
||||
typedef uint32_t UINT32;
|
||||
typedef int32_t INT32;
|
||||
typedef uint64_t UINT64;
|
||||
typedef int64_t INT64;
|
||||
typedef uint8_t BOOLEAN;
|
||||
typedef uint16_t CHAR16;
|
||||
|
||||
#define VOID void
|
||||
|
||||
#if defined(__ia64__) || defined(__x86_64__)
|
||||
|
@ -94,23 +86,23 @@ typedef uint16_t CHAR16;
|
|||
|
||||
#endif
|
||||
|
||||
typedef uint64_t UINTN;
|
||||
typedef int64_t INTN;
|
||||
#define UINTN uint64_t
|
||||
#define INTN int64_t
|
||||
|
||||
#define EFIERR(a) (0x8000000000000000 | a)
|
||||
#define ACPI_EFI_ERR(a) (0x8000000000000000 | a)
|
||||
|
||||
#else
|
||||
|
||||
#define ACPI_MACHINE_WIDTH 32
|
||||
#define ACPI_USE_NATIVE_DIVIDE
|
||||
|
||||
typedef uint32_t UINTN;
|
||||
typedef int32_t INTN;
|
||||
#define UINTN uint32_t
|
||||
#define INTN int32_t
|
||||
|
||||
#define EFIERR(a) (0x80000000 | a)
|
||||
#define ACPI_EFI_ERR(a) (0x80000000 | a)
|
||||
|
||||
#endif
|
||||
|
||||
#define CHAR16 uint16_t
|
||||
|
||||
#ifdef USE_EFI_FUNCTION_WRAPPER
|
||||
#define __VA_NARG__(...) \
|
||||
|
@ -230,15 +222,6 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
|
|||
|
||||
#if defined(_GNU_EFI)
|
||||
|
||||
/* Using GCC for GNU EFI */
|
||||
|
||||
#include "acgcc.h"
|
||||
|
||||
#undef ACPI_USE_SYSTEM_CLIBRARY
|
||||
#undef ACPI_USE_STANDARD_HEADERS
|
||||
#undef ACPI_USE_NATIVE_DIVIDE
|
||||
#define ACPI_USE_SYSTEM_INTTYPES
|
||||
|
||||
/*
|
||||
* Math helpers
|
||||
*/
|
||||
|
@ -255,21 +238,20 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
|
|||
(n_hi) >>= 1; \
|
||||
} while (0)
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
struct _SIMPLE_TEXT_OUTPUT_INTERFACE;
|
||||
struct _SIMPLE_INPUT_INTERFACE;
|
||||
struct _EFI_FILE_IO_INTERFACE;
|
||||
struct _EFI_FILE_HANDLE;
|
||||
struct _EFI_BOOT_SERVICES;
|
||||
struct _EFI_SYSTEM_TABLE;
|
||||
struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE;
|
||||
struct _ACPI_SIMPLE_INPUT_INTERFACE;
|
||||
struct _ACPI_EFI_FILE_IO_INTERFACE;
|
||||
struct _ACPI_EFI_FILE_HANDLE;
|
||||
struct _ACPI_EFI_BOOT_SERVICES;
|
||||
struct _ACPI_EFI_SYSTEM_TABLE;
|
||||
|
||||
extern struct _EFI_SYSTEM_TABLE *ST;
|
||||
extern struct _EFI_BOOT_SERVICES *BS;
|
||||
extern struct _ACPI_EFI_SYSTEM_TABLE *ST;
|
||||
extern struct _ACPI_EFI_BOOT_SERVICES *BS;
|
||||
|
||||
#define ACPI_FILE struct _SIMPLE_TEXT_OUTPUT_INTERFACE *
|
||||
#define ACPI_FILE_OUT ST->ConOut
|
||||
#define ACPI_FILE_ERR ST->ConOut
|
||||
#define FILE struct _ACPI_SIMPLE_TEXT_OUTPUT_INTERFACE
|
||||
#define stdout ST->ConOut
|
||||
#define stderr ST->ConOut
|
||||
|
||||
#endif /* __ACEFI_H__ */
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -79,6 +79,7 @@
|
|||
(defined ACPI_EXAMPLE_APP)
|
||||
#define ACPI_APPLICATION
|
||||
#define ACPI_SINGLE_THREADED
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
#endif
|
||||
|
||||
/* iASL configuration */
|
||||
|
@ -125,7 +126,6 @@
|
|||
|
||||
#ifdef ACPI_DUMP_APP
|
||||
#define ACPI_USE_NATIVE_MEMORY_MAPPING
|
||||
#define USE_NATIVE_ALLOCATE_ZEROED
|
||||
#endif
|
||||
|
||||
/* AcpiNames/Example configuration. Hardware disabled */
|
||||
|
@ -150,7 +150,6 @@
|
|||
/* Common for all ACPICA applications */
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
#define ACPI_USE_LOCAL_CACHE
|
||||
#endif
|
||||
|
||||
|
@ -167,10 +166,21 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Host configuration files. The compiler configuration files are included
|
||||
* by the host files.
|
||||
* first.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
#include "acgcc.h"
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#include "acmsvc.h"
|
||||
|
||||
#elif defined(__INTEL_COMPILER)
|
||||
#include "acintel.h"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(_LINUX) || defined(__linux__)
|
||||
#include "aclinux.h"
|
||||
|
||||
|
@ -210,18 +220,20 @@
|
|||
#elif defined(__OS2__)
|
||||
#include "acos2.h"
|
||||
|
||||
#elif defined(_AED_EFI)
|
||||
#include "acefi.h"
|
||||
|
||||
#elif defined(_GNU_EFI)
|
||||
#include "acefi.h"
|
||||
|
||||
#elif defined(__HAIKU__)
|
||||
#include "achaiku.h"
|
||||
|
||||
#elif defined(__QNX__)
|
||||
#include "acqnx.h"
|
||||
|
||||
/*
|
||||
* EFI applications can be built with -nostdlib, in this case, it must be
|
||||
* included after including all other host environmental definitions, in
|
||||
* order to override the definitions.
|
||||
*/
|
||||
#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
|
||||
#include "acefi.h"
|
||||
|
||||
#else
|
||||
|
||||
/* Unknown environment */
|
||||
|
@ -334,7 +346,8 @@
|
|||
* ACPI_USE_SYSTEM_CLIBRARY - Define this if linking to an actual C library.
|
||||
* Otherwise, local versions of string/memory functions will be used.
|
||||
* ACPI_USE_STANDARD_HEADERS - Define this if linking to a C library and
|
||||
* the standard header files may be used.
|
||||
* the standard header files may be used. Defining this implies that
|
||||
* ACPI_USE_SYSTEM_CLIBRARY has been defined.
|
||||
*
|
||||
* The ACPICA subsystem only uses low level C library functions that do not
|
||||
* call operating system services and may therefore be inlined in the code.
|
||||
|
@ -342,7 +355,6 @@
|
|||
* It may be necessary to tailor these include files to the target
|
||||
* generation environment.
|
||||
*/
|
||||
#ifdef ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
/* Use the standard C library headers. We want to keep these to a minimum. */
|
||||
|
||||
|
@ -350,57 +362,20 @@
|
|||
|
||||
/* Use the standard headers from the standard locations */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <ctype.h>
|
||||
#ifdef ACPI_APPLICATION
|
||||
#include <stdio.h>
|
||||
#include <fcntl.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#endif /* ACPI_USE_STANDARD_HEADERS */
|
||||
|
||||
/* We will be linking to the standard Clib functions */
|
||||
|
||||
#else
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Not using native C library, use local implementations
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
/*
|
||||
* Use local definitions of C library macros and functions. These function
|
||||
* implementations may not be as efficient as an inline or assembly code
|
||||
* implementation provided by a native C library, but they are functionally
|
||||
* equivalent.
|
||||
*/
|
||||
#ifndef va_arg
|
||||
|
||||
#ifndef _VALIST
|
||||
#define _VALIST
|
||||
typedef char *va_list;
|
||||
#endif /* _VALIST */
|
||||
|
||||
/* Storage alignment properties */
|
||||
|
||||
#define _AUPBND (sizeof (ACPI_NATIVE_INT) - 1)
|
||||
#define _ADNBND (sizeof (ACPI_NATIVE_INT) - 1)
|
||||
|
||||
/* Variable argument list macro definitions */
|
||||
|
||||
#define _Bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
|
||||
#define va_arg(ap, T) (*(T *)(((ap) += (_Bnd (T, _AUPBND))) - (_Bnd (T,_ADNBND))))
|
||||
#define va_end(ap) (ap = (va_list) NULL)
|
||||
#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_Bnd (A,_AUPBND))))
|
||||
|
||||
#endif /* va_arg */
|
||||
|
||||
/* Use the local (ACPICA) definitions of the clib functions */
|
||||
|
||||
#endif /* ACPI_USE_SYSTEM_CLIBRARY */
|
||||
|
||||
#ifndef ACPI_FILE
|
||||
#ifdef ACPI_APPLICATION
|
||||
#include <stdio.h>
|
||||
#define ACPI_FILE FILE *
|
||||
#define ACPI_FILE_OUT stdout
|
||||
#define ACPI_FILE_ERR stderr
|
||||
|
@ -409,6 +384,9 @@ typedef char *va_list;
|
|||
#define ACPI_FILE_OUT NULL
|
||||
#define ACPI_FILE_ERR NULL
|
||||
#endif /* ACPI_APPLICATION */
|
||||
#endif /* ACPI_FILE */
|
||||
|
||||
#ifndef ACPI_INIT_FUNCTION
|
||||
#define ACPI_INIT_FUNCTION
|
||||
#endif
|
||||
|
||||
#endif /* __ACENV_H__ */
|
||||
|
|
|
@ -56,18 +56,25 @@
|
|||
#if defined(_LINUX) || defined(__linux__)
|
||||
#include "aclinuxex.h"
|
||||
|
||||
#elif defined(WIN32)
|
||||
#include "acwinex.h"
|
||||
|
||||
#elif defined(_AED_EFI)
|
||||
#include "acefiex.h"
|
||||
|
||||
#elif defined(_GNU_EFI)
|
||||
#include "acefiex.h"
|
||||
|
||||
#elif defined(__DragonFly__)
|
||||
#include "acdragonflyex.h"
|
||||
|
||||
/*
|
||||
* EFI applications can be built with -nostdlib, in this case, it must be
|
||||
* included after including all other host environmental definitions, in
|
||||
* order to override the definitions.
|
||||
*/
|
||||
#elif defined(_AED_EFI) || defined(_GNU_EFI) || defined(_EDK2_EFI)
|
||||
#include "acefiex.h"
|
||||
|
||||
#endif
|
||||
|
||||
#if defined(__GNUC__) && !defined(__INTEL_COMPILER)
|
||||
#include "acgccex.h"
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
#include "acmsvcex.h"
|
||||
|
||||
#endif
|
||||
|
||||
/*! [End] no source code translation !*/
|
||||
|
|
|
@ -45,9 +45,6 @@
|
|||
#define __ACFREEBSD_H__
|
||||
|
||||
|
||||
/* FreeBSD uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef __LP64__
|
||||
|
|
|
@ -44,6 +44,12 @@
|
|||
#ifndef __ACGCC_H__
|
||||
#define __ACGCC_H__
|
||||
|
||||
/*
|
||||
* Use compiler specific <stdarg.h> is a good practice for even when
|
||||
* -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
|
||||
#define ACPI_INLINE __inline__
|
||||
|
||||
/* Function name is used for debug output. Non-ANSI, compiler-dependent */
|
||||
|
@ -64,17 +70,6 @@
|
|||
*/
|
||||
#define ACPI_UNUSED_VAR __attribute__ ((unused))
|
||||
|
||||
/*
|
||||
* Some versions of gcc implement strchr() with a buggy macro. So,
|
||||
* undef it here. Prevents error messages of this form (usually from the
|
||||
* file getopt.c):
|
||||
*
|
||||
* error: logical '&&' with non-zero constant will always evaluate as true
|
||||
*/
|
||||
#ifdef strchr
|
||||
#undef strchr
|
||||
#endif
|
||||
|
||||
/* GCC supports __VA_ARGS__ in macros */
|
||||
|
||||
#define COMPILER_VA_MACRO 1
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Name: acwinex.h - Extra OS specific defines, etc.
|
||||
* Name: acgccex.h - Extra GCC specific defines, etc.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
|
@ -41,12 +41,18 @@
|
|||
* POSSIBILITY OF SUCH DAMAGES.
|
||||
*/
|
||||
|
||||
#ifndef __ACWINEX_H__
|
||||
#define __ACWINEX_H__
|
||||
#ifndef __ACGCCEX_H__
|
||||
#define __ACGCCEX_H__
|
||||
|
||||
/* Windows uses VC */
|
||||
#ifdef _MSC_VER
|
||||
#include "acmsvcex.h"
|
||||
/*
|
||||
* Some versions of gcc implement strchr() with a buggy macro. So,
|
||||
* undef it here. Prevents error messages of this form (usually from the
|
||||
* file getopt.c):
|
||||
*
|
||||
* error: logical '&&' with non-zero constant will always evaluate as true
|
||||
*/
|
||||
#ifdef strchr
|
||||
#undef strchr
|
||||
#endif
|
||||
|
||||
#endif /* __ACWINEX_H__ */
|
||||
#endif /* __ACGCCEX_H__ */
|
|
@ -44,7 +44,9 @@
|
|||
#ifndef __ACHAIKU_H__
|
||||
#define __ACHAIKU_H__
|
||||
|
||||
#include "acgcc.h"
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
#include <KernelExport.h>
|
||||
|
||||
struct mutex;
|
||||
|
@ -52,9 +54,6 @@ struct mutex;
|
|||
|
||||
/* Host-dependent types and defines for user- and kernel-space ACPICA */
|
||||
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
#define ACPI_MUTEX_TYPE ACPI_OSL_MUTEX
|
||||
#define ACPI_MUTEX struct mutex *
|
||||
|
||||
|
|
|
@ -44,6 +44,12 @@
|
|||
#ifndef __ACINTEL_H__
|
||||
#define __ACINTEL_H__
|
||||
|
||||
/*
|
||||
* Use compiler specific <stdarg.h> is a good practice for even when
|
||||
* -nostdinc is specified (i.e., ACPI_USE_STANDARD_HEADERS undefined.
|
||||
*/
|
||||
#include <stdarg.h>
|
||||
|
||||
/* Configuration specific to Intel 64-bit C compiler */
|
||||
|
||||
#define COMPILER_DEPENDENT_INT64 __int64
|
||||
|
|
|
@ -89,6 +89,8 @@
|
|||
#include <asm/acenv.h>
|
||||
#endif
|
||||
|
||||
#define ACPI_INIT_FUNCTION __init
|
||||
|
||||
#ifndef CONFIG_ACPI
|
||||
|
||||
/* External globals for __KERNEL__, stubs is needed */
|
||||
|
@ -173,11 +175,11 @@
|
|||
|
||||
#else /* !__KERNEL__ */
|
||||
|
||||
#include <stdarg.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
#ifdef ACPI_USE_STANDARD_HEADERS
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/* Define/disable kernel-specific declarators */
|
||||
|
||||
|
@ -208,8 +210,4 @@
|
|||
|
||||
#endif /* __KERNEL__ */
|
||||
|
||||
/* Linux uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
|
||||
#endif /* __ACLINUX_H__ */
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
/*
|
||||
* Overrides for in-kernel ACPICA
|
||||
*/
|
||||
ACPI_STATUS __init AcpiOsInitialize (
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION AcpiOsInitialize (
|
||||
void);
|
||||
|
||||
ACPI_STATUS AcpiOsTerminate (
|
||||
|
|
|
@ -64,6 +64,10 @@
|
|||
#define stat _stat
|
||||
#define fstat _fstat
|
||||
#define mkdir _mkdir
|
||||
#define snprintf _snprintf
|
||||
#if _MSC_VER <= 1200 /* Versions below VC++ 6 */
|
||||
#define vsnprintf _vsnprintf
|
||||
#endif
|
||||
#define O_RDONLY _O_RDONLY
|
||||
#define O_BINARY _O_BINARY
|
||||
#define O_CREAT _O_CREAT
|
||||
|
@ -102,6 +106,10 @@
|
|||
#define ACPI_INTERNAL_XFACE
|
||||
#define ACPI_INTERNAL_VAR_XFACE __cdecl
|
||||
|
||||
|
||||
/* Do not maintain the architecture specific stuffs for the EFI ports */
|
||||
|
||||
#if !defined(_EDK2_EFI) && !defined(_GNU_EFI)
|
||||
#ifndef _LINT
|
||||
/*
|
||||
* Math helper functions
|
||||
|
@ -136,6 +144,7 @@
|
|||
n_lo >>= 1; \
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#ifdef __REACTOS__
|
||||
|
||||
|
@ -255,4 +264,15 @@ _CrtSetBreakAlloc (937);
|
|||
#else
|
||||
#endif
|
||||
|
||||
/* Begin standard headers */
|
||||
|
||||
/*
|
||||
* warn C4001: nonstandard extension 'single line comment' was used
|
||||
*
|
||||
* We need to enable this for ACPICA internal files, but disable it for
|
||||
* buggy MS runtime headers.
|
||||
*/
|
||||
#pragma warning(push)
|
||||
#pragma warning(disable:4001)
|
||||
|
||||
#endif /* __ACMSVC_H__ */
|
||||
|
|
|
@ -44,6 +44,14 @@
|
|||
#ifndef __ACMSVCEX_H__
|
||||
#define __ACMSVCEX_H__
|
||||
|
||||
/* va_arg implementation can be compiler specific */
|
||||
|
||||
#ifdef ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
#endif /* ACPI_USE_STANDARD_HEADERS */
|
||||
|
||||
/* Debug support. */
|
||||
|
||||
#ifdef _DEBUG
|
||||
|
@ -51,4 +59,39 @@
|
|||
#include <crtdbg.h>
|
||||
#endif
|
||||
|
||||
/* End standard headers */
|
||||
|
||||
#pragma warning(pop)
|
||||
|
||||
#ifndef ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* Not using native C library, use local implementations
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
||||
#ifndef va_arg
|
||||
|
||||
#ifndef _VALIST
|
||||
#define _VALIST
|
||||
typedef char *va_list;
|
||||
#endif /* _VALIST */
|
||||
|
||||
/* Storage alignment properties */
|
||||
|
||||
#define _AUPBND (sizeof (ACPI_NATIVE_INT) - 1)
|
||||
#define _ADNBND (sizeof (ACPI_NATIVE_INT) - 1)
|
||||
|
||||
/* Variable argument list macro definitions */
|
||||
|
||||
#define _Bnd(X, bnd) (((sizeof (X)) + (bnd)) & (~(bnd)))
|
||||
#define va_arg(ap, T) (*(T *)(((ap) += (_Bnd (T, _AUPBND))) - (_Bnd (T,_ADNBND))))
|
||||
#define va_end(ap) (ap = (va_list) NULL)
|
||||
#define va_start(ap, A) (void) ((ap) = (((char *) &(A)) + (_Bnd (A,_AUPBND))))
|
||||
|
||||
#endif /* va_arg */
|
||||
|
||||
#endif /* !ACPI_USE_SYSTEM_CLIBRARY */
|
||||
|
||||
#endif /* __ACMSVCEX_H__ */
|
||||
|
|
|
@ -44,10 +44,6 @@
|
|||
#ifndef __ACNETBSD_H__
|
||||
#define __ACNETBSD_H__
|
||||
|
||||
/* NetBSD uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
|
||||
#define ACPI_UINTPTR_T uintptr_t
|
||||
#define ACPI_USE_LOCAL_CACHE
|
||||
#define ACPI_CAST_PTHREAD_T(x) ((ACPI_THREAD_ID) ACPI_TO_INTEGER (x))
|
||||
|
|
|
@ -43,6 +43,10 @@
|
|||
|
||||
#ifndef __ACOS2_H__
|
||||
#define __ACOS2_H__
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
#define INCL_LONGLONG
|
||||
#include <os2.h>
|
||||
|
||||
|
@ -66,7 +70,6 @@
|
|||
*/
|
||||
#define ACPI_UNUSED_VAR
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#include <io.h>
|
||||
|
||||
#define ACPI_FLUSH_CPU_CACHE() Wbinvd()
|
||||
|
|
|
@ -44,9 +44,8 @@
|
|||
#ifndef __ACQNX_H__
|
||||
#define __ACQNX_H__
|
||||
|
||||
/* QNX uses GCC */
|
||||
|
||||
#include "acgcc.h"
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
#define ACPI_UINTPTR_T uintptr_t
|
||||
#define ACPI_USE_LOCAL_CACHE
|
||||
|
@ -62,13 +61,10 @@
|
|||
#include <stdint.h>
|
||||
#include <sys/neutrino.h>
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
#define __cli() InterruptDisable();
|
||||
#define __sti() InterruptEnable();
|
||||
#define __cdecl
|
||||
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
#define ACPI_USE_NATIVE_DIVIDE
|
||||
|
||||
#endif /* __ACQNX_H__ */
|
||||
|
|
|
@ -44,25 +44,11 @@
|
|||
#ifndef __ACWIN_H__
|
||||
#define __ACWIN_H__
|
||||
|
||||
/*! [Begin] no source code translation (Keep the include) */
|
||||
|
||||
/* Windows uses VC */
|
||||
#ifdef _MSC_VER
|
||||
#include "acmsvc.h"
|
||||
#endif
|
||||
#ifdef __REACTOS__
|
||||
#if !defined(_MSC_VER) && defined(__GNUC__)
|
||||
#include "acgcc.h"
|
||||
#endif
|
||||
|
||||
#define ACPI_USE_SYSTEM_INTTYPES
|
||||
#endif /* __REACTOS __ */
|
||||
/*! [End] no source code translation !*/
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
#define ACPI_MACHINE_WIDTH 32
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
#ifdef ACPI_DEFINE_ALTERNATE_TYPES
|
||||
/*
|
||||
* Types used only in (Linux) translated source, defined here to enable
|
||||
|
|
|
@ -44,15 +44,11 @@
|
|||
#ifndef __ACWIN64_H__
|
||||
#define __ACWIN64_H__
|
||||
|
||||
/*! [Begin] no source code translation (Keep the include) */
|
||||
|
||||
#include "acintel.h"
|
||||
/*! [End] no source code translation !*/
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
#define ACPI_USE_SYSTEM_CLIBRARY
|
||||
|
||||
#define ACPI_MACHINE_WIDTH 64
|
||||
|
||||
#define ACPI_USE_STANDARD_HEADERS
|
||||
|
||||
/*
|
||||
* Handle platform- and compiler-specific assembly language differences.
|
||||
*
|
||||
|
|
|
@ -516,17 +516,19 @@ AcpiTbConvertFadt (
|
|||
|
||||
|
||||
/*
|
||||
* For ACPI 1.0 FADTs (revision 1 or 2), ensure that reserved fields which
|
||||
* For ACPI 1.0 FADTs (revision 1), ensure that reserved fields which
|
||||
* should be zero are indeed zero. This will workaround BIOSs that
|
||||
* inadvertently place values in these fields.
|
||||
*
|
||||
* The ACPI 1.0 reserved fields that will be zeroed are the bytes located
|
||||
* at offset 45, 55, 95, and the word located at offset 109, 110.
|
||||
*
|
||||
* Note: The FADT revision value is unreliable. Only the length can be
|
||||
* trusted.
|
||||
* Note: The FADT revision value is unreliable because of BIOS errors.
|
||||
* The table length is instead used as the final word on the version.
|
||||
*
|
||||
* Note: FADT revision 3 is the ACPI 2.0 version of the FADT.
|
||||
*/
|
||||
if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V2_SIZE)
|
||||
if (AcpiGbl_FADT.Header.Length <= ACPI_FADT_V3_SIZE)
|
||||
{
|
||||
AcpiGbl_FADT.PreferredProfile = 0;
|
||||
AcpiGbl_FADT.PstateControl = 0;
|
||||
|
|
|
@ -273,7 +273,7 @@ AcpiTbGetRootTableEntry (
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiTbParseRootTable (
|
||||
ACPI_PHYSICAL_ADDRESS RsdpAddress)
|
||||
{
|
||||
|
|
|
@ -103,7 +103,7 @@ AcpiAllocateRootTable (
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeTables (
|
||||
ACPI_TABLE_DESC *InitialTableArray,
|
||||
UINT32 InitialTableCount,
|
||||
|
@ -179,7 +179,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeTables)
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiReallocateRootTable (
|
||||
void)
|
||||
{
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiLoadTables (
|
||||
void)
|
||||
{
|
||||
|
@ -300,7 +300,7 @@ UnlockAndExit:
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInstallTable (
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
BOOLEAN Physical)
|
||||
|
|
|
@ -156,7 +156,7 @@ AcpiTbValidateRsdp (
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiFindRootPointer (
|
||||
ACPI_PHYSICAL_ADDRESS *TableAddress)
|
||||
{
|
||||
|
@ -262,7 +262,7 @@ AcpiFindRootPointer (
|
|||
return_ACPI_STATUS (AE_NOT_FOUND);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiFindRootPointer)
|
||||
ACPI_EXPORT_SYMBOL_INIT (AcpiFindRootPointer)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -264,7 +264,7 @@ AcpiUtDumpBufferToFile (
|
|||
|
||||
if (!Buffer)
|
||||
{
|
||||
AcpiUtFilePrintf (File, "Null Buffer Pointer in DumpBuffer!\n");
|
||||
fprintf (File, "Null Buffer Pointer in DumpBuffer!\n");
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -279,7 +279,7 @@ AcpiUtDumpBufferToFile (
|
|||
{
|
||||
/* Print current offset */
|
||||
|
||||
AcpiUtFilePrintf (File, "%6.4X: ", (BaseOffset + i));
|
||||
fprintf (File, "%6.4X: ", (BaseOffset + i));
|
||||
|
||||
/* Print 16 hex chars */
|
||||
|
||||
|
@ -289,7 +289,7 @@ AcpiUtDumpBufferToFile (
|
|||
{
|
||||
/* Dump fill spaces */
|
||||
|
||||
AcpiUtFilePrintf (File, "%*s", ((Display * 2) + 1), " ");
|
||||
fprintf (File, "%*s", ((Display * 2) + 1), " ");
|
||||
j += Display;
|
||||
continue;
|
||||
}
|
||||
|
@ -299,28 +299,28 @@ AcpiUtDumpBufferToFile (
|
|||
case DB_BYTE_DISPLAY:
|
||||
default: /* Default is BYTE display */
|
||||
|
||||
AcpiUtFilePrintf (File, "%02X ", Buffer[(ACPI_SIZE) i + j]);
|
||||
fprintf (File, "%02X ", Buffer[(ACPI_SIZE) i + j]);
|
||||
break;
|
||||
|
||||
case DB_WORD_DISPLAY:
|
||||
|
||||
ACPI_MOVE_16_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
|
||||
AcpiUtFilePrintf (File, "%04X ", Temp32);
|
||||
fprintf (File, "%04X ", Temp32);
|
||||
break;
|
||||
|
||||
case DB_DWORD_DISPLAY:
|
||||
|
||||
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
|
||||
AcpiUtFilePrintf (File, "%08X ", Temp32);
|
||||
fprintf (File, "%08X ", Temp32);
|
||||
break;
|
||||
|
||||
case DB_QWORD_DISPLAY:
|
||||
|
||||
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j]);
|
||||
AcpiUtFilePrintf (File, "%08X", Temp32);
|
||||
fprintf (File, "%08X", Temp32);
|
||||
|
||||
ACPI_MOVE_32_TO_32 (&Temp32, &Buffer[(ACPI_SIZE) i + j + 4]);
|
||||
AcpiUtFilePrintf (File, "%08X ", Temp32);
|
||||
fprintf (File, "%08X ", Temp32);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -331,29 +331,29 @@ AcpiUtDumpBufferToFile (
|
|||
* Print the ASCII equivalent characters but watch out for the bad
|
||||
* unprintable ones (printable chars are 0x20 through 0x7E)
|
||||
*/
|
||||
AcpiUtFilePrintf (File, " ");
|
||||
fprintf (File, " ");
|
||||
for (j = 0; j < 16; j++)
|
||||
{
|
||||
if (i + j >= Count)
|
||||
{
|
||||
AcpiUtFilePrintf (File, "\n");
|
||||
fprintf (File, "\n");
|
||||
return;
|
||||
}
|
||||
|
||||
BufChar = Buffer[(ACPI_SIZE) i + j];
|
||||
if (isprint (BufChar))
|
||||
{
|
||||
AcpiUtFilePrintf (File, "%c", BufChar);
|
||||
fprintf (File, "%c", BufChar);
|
||||
}
|
||||
else
|
||||
{
|
||||
AcpiUtFilePrintf (File, ".");
|
||||
fprintf (File, ".");
|
||||
}
|
||||
}
|
||||
|
||||
/* Done with that line. */
|
||||
|
||||
AcpiUtFilePrintf (File, "\n");
|
||||
fprintf (File, "\n");
|
||||
i += 16;
|
||||
}
|
||||
|
||||
|
|
|
@ -708,33 +708,3 @@ AcpiTracePoint (
|
|||
ACPI_EXPORT_SYMBOL (AcpiTracePoint)
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef ACPI_APPLICATION
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiLogError
|
||||
*
|
||||
* PARAMETERS: Format - Printf format field
|
||||
* ... - Optional printf arguments
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Print error message to the console, used by applications.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
void ACPI_INTERNAL_VAR_XFACE
|
||||
AcpiLogError (
|
||||
const char *Format,
|
||||
...)
|
||||
{
|
||||
va_list Args;
|
||||
|
||||
va_start (Args, Format);
|
||||
(void) AcpiUtFileVprintf (ACPI_FILE_ERR, Format, Args);
|
||||
va_end (Args);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL (AcpiLogError)
|
||||
#endif
|
||||
|
|
|
@ -226,7 +226,7 @@ AcpiUtInitGlobals (
|
|||
AcpiGbl_NextOwnerIdOffset = 0;
|
||||
AcpiGbl_DebuggerConfiguration = DEBUGGER_THREADING;
|
||||
AcpiGbl_OsiMutex = NULL;
|
||||
AcpiGbl_MaxLoopIterations = 0xFFFF;
|
||||
AcpiGbl_MaxLoopIterations = ACPI_MAX_LOOP_COUNT;
|
||||
|
||||
/* Hardware oriented */
|
||||
|
||||
|
|
|
@ -196,8 +196,6 @@ AcpiUtGetExpectedReturnTypes (
|
|||
******************************************************************************/
|
||||
|
||||
#if (defined ACPI_ASL_COMPILER || defined ACPI_HELP_APP)
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
/* Local prototypes */
|
||||
|
||||
|
|
|
@ -416,7 +416,7 @@ AcpiUtFormatNumber (
|
|||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtVsnprintf
|
||||
* FUNCTION: vsnprintf
|
||||
*
|
||||
* PARAMETERS: String - String with boundary
|
||||
* Size - Boundary of the string
|
||||
|
@ -430,7 +430,7 @@ AcpiUtFormatNumber (
|
|||
******************************************************************************/
|
||||
|
||||
int
|
||||
AcpiUtVsnprintf (
|
||||
vsnprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
|
@ -713,7 +713,7 @@ AcpiUtVsnprintf (
|
|||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtSnprintf
|
||||
* FUNCTION: snprintf
|
||||
*
|
||||
* PARAMETERS: String - String with boundary
|
||||
* Size - Boundary of the string
|
||||
|
@ -726,7 +726,7 @@ AcpiUtVsnprintf (
|
|||
******************************************************************************/
|
||||
|
||||
int
|
||||
AcpiUtSnprintf (
|
||||
snprintf (
|
||||
char *String,
|
||||
ACPI_SIZE Size,
|
||||
const char *Format,
|
||||
|
@ -737,7 +737,38 @@ AcpiUtSnprintf (
|
|||
|
||||
|
||||
va_start (Args, Format);
|
||||
Length = AcpiUtVsnprintf (String, Size, Format, Args);
|
||||
Length = vsnprintf (String, Size, Format, Args);
|
||||
va_end (Args);
|
||||
|
||||
return (Length);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: sprintf
|
||||
*
|
||||
* PARAMETERS: String - String with boundary
|
||||
* Format, ... - Standard printf format
|
||||
*
|
||||
* RETURN: Number of bytes actually written.
|
||||
*
|
||||
* DESCRIPTION: Formatted output to a string.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
int
|
||||
sprintf (
|
||||
char *String,
|
||||
const char *Format,
|
||||
...)
|
||||
{
|
||||
va_list Args;
|
||||
int Length;
|
||||
|
||||
|
||||
va_start (Args, Format);
|
||||
Length = vsnprintf (String, ACPI_UINT32_MAX, Format, Args);
|
||||
va_end (Args);
|
||||
|
||||
return (Length);
|
||||
|
@ -747,7 +778,69 @@ AcpiUtSnprintf (
|
|||
#ifdef ACPI_APPLICATION
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtFileVprintf
|
||||
* FUNCTION: vprintf
|
||||
*
|
||||
* PARAMETERS: Format - Standard printf format
|
||||
* Args - Argument list
|
||||
*
|
||||
* RETURN: Number of bytes actually written.
|
||||
*
|
||||
* DESCRIPTION: Formatted output to stdout using argument list pointer.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
int
|
||||
vprintf (
|
||||
const char *Format,
|
||||
va_list Args)
|
||||
{
|
||||
ACPI_CPU_FLAGS Flags;
|
||||
int Length;
|
||||
|
||||
|
||||
Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
|
||||
Length = vsnprintf (AcpiGbl_PrintBuffer,
|
||||
sizeof (AcpiGbl_PrintBuffer), Format, Args);
|
||||
|
||||
(void) fwrite (AcpiGbl_PrintBuffer, Length, 1, ACPI_FILE_OUT);
|
||||
AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
|
||||
|
||||
return (Length);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: printf
|
||||
*
|
||||
* PARAMETERS: Format, ... - Standard printf format
|
||||
*
|
||||
* RETURN: Number of bytes actually written.
|
||||
*
|
||||
* DESCRIPTION: Formatted output to stdout.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
int
|
||||
printf (
|
||||
const char *Format,
|
||||
...)
|
||||
{
|
||||
va_list Args;
|
||||
int Length;
|
||||
|
||||
|
||||
va_start (Args, Format);
|
||||
Length = vprintf (Format, Args);
|
||||
va_end (Args);
|
||||
|
||||
return (Length);
|
||||
}
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: vfprintf
|
||||
*
|
||||
* PARAMETERS: File - File descriptor
|
||||
* Format - Standard printf format
|
||||
|
@ -760,8 +853,8 @@ AcpiUtSnprintf (
|
|||
******************************************************************************/
|
||||
|
||||
int
|
||||
AcpiUtFileVprintf (
|
||||
ACPI_FILE File,
|
||||
vfprintf (
|
||||
FILE *File,
|
||||
const char *Format,
|
||||
va_list Args)
|
||||
{
|
||||
|
@ -770,10 +863,10 @@ AcpiUtFileVprintf (
|
|||
|
||||
|
||||
Flags = AcpiOsAcquireLock (AcpiGbl_PrintLock);
|
||||
Length = AcpiUtVsnprintf (AcpiGbl_PrintBuffer,
|
||||
Length = vsnprintf (AcpiGbl_PrintBuffer,
|
||||
sizeof (AcpiGbl_PrintBuffer), Format, Args);
|
||||
|
||||
(void) AcpiOsWriteFile (File, AcpiGbl_PrintBuffer, Length, 1);
|
||||
(void) fwrite (AcpiGbl_PrintBuffer, Length, 1, File);
|
||||
AcpiOsReleaseLock (AcpiGbl_PrintLock, Flags);
|
||||
|
||||
return (Length);
|
||||
|
@ -782,7 +875,7 @@ AcpiUtFileVprintf (
|
|||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiUtFilePrintf
|
||||
* FUNCTION: fprintf
|
||||
*
|
||||
* PARAMETERS: File - File descriptor
|
||||
* Format, ... - Standard printf format
|
||||
|
@ -794,8 +887,8 @@ AcpiUtFileVprintf (
|
|||
******************************************************************************/
|
||||
|
||||
int
|
||||
AcpiUtFilePrintf (
|
||||
ACPI_FILE File,
|
||||
fprintf (
|
||||
FILE *File,
|
||||
const char *Format,
|
||||
...)
|
||||
{
|
||||
|
@ -804,7 +897,7 @@ AcpiUtFilePrintf (
|
|||
|
||||
|
||||
va_start (Args, Format);
|
||||
Length = AcpiUtFileVprintf (File, Format, Args);
|
||||
Length = vfprintf (File, Format, Args);
|
||||
va_end (Args);
|
||||
|
||||
return (Length);
|
||||
|
|
|
@ -107,14 +107,12 @@ AcpiUtCreateList (
|
|||
ACPI_MEMORY_LIST *Cache;
|
||||
|
||||
|
||||
Cache = AcpiOsAllocate (sizeof (ACPI_MEMORY_LIST));
|
||||
Cache = AcpiOsAllocateZeroed (sizeof (ACPI_MEMORY_LIST));
|
||||
if (!Cache)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
}
|
||||
|
||||
memset (Cache, 0, sizeof (ACPI_MEMORY_LIST));
|
||||
|
||||
Cache->ListName = ListName;
|
||||
Cache->ObjectSize = ObjectSize;
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiTerminate (
|
||||
void)
|
||||
{
|
||||
|
|
|
@ -72,7 +72,7 @@ AeDoObjectOverrides (
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeSubsystem (
|
||||
void)
|
||||
{
|
||||
|
@ -151,7 +151,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiInitializeSubsystem)
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiEnableSubsystem (
|
||||
UINT32 Flags)
|
||||
{
|
||||
|
@ -263,7 +263,7 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiEnableSubsystem)
|
|||
*
|
||||
******************************************************************************/
|
||||
|
||||
ACPI_STATUS
|
||||
ACPI_STATUS ACPI_INIT_FUNCTION
|
||||
AcpiInitializeObjects (
|
||||
UINT32 Flags)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue