diff options
author | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
---|---|---|
committer | Jung-uk Kim <jkim@FreeBSD.org> | 2014-03-27 23:50:54 +0000 |
commit | 7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd (patch) | |
tree | d3e9e38245f10de28c87606c945c7fdd4bed0d76 /source/include | |
parent | 526d99544ba42a5a2155021975b3b97da425819e (diff) | |
download | src-test2-7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd.tar.gz src-test2-7c6f304a2eb855cf2d71ca0638d4f3c72f436fcd.zip |
Notes
Diffstat (limited to 'source/include')
34 files changed, 161 insertions, 162 deletions
diff --git a/source/include/acapps.h b/source/include/acapps.h index ad676cbc13e9..fa8e3866db09 100644 --- a/source/include/acapps.h +++ b/source/include/acapps.h @@ -45,8 +45,6 @@ #define _ACAPPS -#pragma pack(push) /* Set default struct packing */ - #ifdef _MSC_VER /* disable some level-4 warnings */ #pragma warning(disable:4100) /* warning C4100: unreferenced formal parameter */ #endif @@ -116,6 +114,14 @@ extern int AcpiGbl_SubOptChar; extern char *AcpiGbl_Optarg; +/* + * cmfsize - Common get file size function + */ +UINT32 +CmGetFileSize ( + FILE *File); + + #ifndef ACPI_DUMP_APP /* * adisasm @@ -221,6 +227,4 @@ AdWriteTable ( char *OemTableId); #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACAPPS */ diff --git a/source/include/acbuffer.h b/source/include/acbuffer.h index 8e3cb3d831be..a36a980aa954 100644 --- a/source/include/acbuffer.h +++ b/source/include/acbuffer.h @@ -44,9 +44,6 @@ #ifndef __ACBUFFER_H__ #define __ACBUFFER_H__ - -#pragma pack(push) /* Set default struct packing */ - /* * Contains buffer structures for these predefined names: * _FDE, _GRT, _GTM, _PLD, _SRT @@ -246,6 +243,4 @@ typedef struct acpi_pld_info #define ACPI_PLD_SET_HORIZ_OFFSET(dword,value) ACPI_SET_BITS (dword, 16, ACPI_16BIT_MASK, value) /* Offset 128+16=144, Len 16 */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* ACBUFFER_H */ diff --git a/source/include/acconfig.h b/source/include/acconfig.h index 3327d191ed13..4cad6f4b7edc 100644 --- a/source/include/acconfig.h +++ b/source/include/acconfig.h @@ -45,8 +45,6 @@ #define _ACCONFIG_H -#pragma pack(push) /* Set default struct packing */ - /****************************************************************************** * * Configuration options @@ -236,6 +234,4 @@ #define ACPI_DEBUGGER_EXECUTE_PROMPT '%' -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACCONFIG_H */ diff --git a/source/include/acdebug.h b/source/include/acdebug.h index 59f8830e9ffb..f85ec01ac29a 100644 --- a/source/include/acdebug.h +++ b/source/include/acdebug.h @@ -45,8 +45,6 @@ #define __ACDEBUG_H__ -#pragma pack(push) /* Set default struct packing */ - #define ACPI_DEBUG_BUFFER_SIZE 0x4000 /* 16K buffer for return objects */ typedef struct acpi_db_command_info @@ -468,6 +466,4 @@ AcpiDbUint32ToHexString ( UINT32 Value, char *Buffer); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACDEBUG_H__ */ diff --git a/source/include/acdisasm.h b/source/include/acdisasm.h index 00a469946da8..ae1fdf8ab3aa 100644 --- a/source/include/acdisasm.h +++ b/source/include/acdisasm.h @@ -47,8 +47,6 @@ #include "amlresrc.h" -#pragma pack(push) /* Set default struct packing */ - #define BLOCK_NONE 0 #define BLOCK_PAREN 1 #define BLOCK_BRACE 2 @@ -554,6 +552,14 @@ AcpiDmMethodFlags ( ACPI_PARSE_OBJECT *Op); void +AcpiDmDisplayTargetPathname ( + ACPI_PARSE_OBJECT *Op); + +void +AcpiDmNotifyDescription ( + ACPI_PARSE_OBJECT *Op); + +void AcpiDmPredefinedDescription ( ACPI_PARSE_OBJECT *Op); @@ -633,11 +639,11 @@ AcpiDmByteList ( ACPI_PARSE_OBJECT *Op); void -AcpiDmIsEisaId ( +AcpiDmCheckForHardwareId ( ACPI_PARSE_OBJECT *Op); void -AcpiDmEisaId ( +AcpiDmDecompressEisaId ( UINT32 EncodedId); BOOLEAN @@ -931,6 +937,4 @@ AdDisassemblerHeader ( char *Filename); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACDISASM_H__ */ diff --git a/source/include/acdispat.h b/source/include/acdispat.h index d20373d410f2..5715ab3b7c7b 100644 --- a/source/include/acdispat.h +++ b/source/include/acdispat.h @@ -46,8 +46,6 @@ #define _ACDISPAT_H_ -#pragma pack(push) /* Set default struct packing */ - #define NAMEOF_LOCAL_NTE "__L0" #define NAMEOF_ARG_NTE "__A0" @@ -464,6 +462,4 @@ AcpiDsResultPush ( ACPI_OPERAND_OBJECT *Object, ACPI_WALK_STATE *WalkState); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* _ACDISPAT_H_ */ diff --git a/source/include/acevents.h b/source/include/acevents.h index da998fb8ee95..3db603534a6b 100644 --- a/source/include/acevents.h +++ b/source/include/acevents.h @@ -45,8 +45,6 @@ #define __ACEVENTS_H__ -#pragma pack(push) /* Set default struct packing */ - /* * evevent */ @@ -358,6 +356,4 @@ void AcpiEvTerminate ( void)) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACEVENTS_H__ */ diff --git a/source/include/acexcep.h b/source/include/acexcep.h index 40ea039c4836..aab6941a3c7e 100644 --- a/source/include/acexcep.h +++ b/source/include/acexcep.h @@ -45,8 +45,6 @@ #define __ACEXCEP_H__ -#pragma pack(push) /* Set default struct packing */ - /* This module contains all possible exception codes for ACPI_STATUS */ /* @@ -347,6 +345,4 @@ static const ACPI_EXCEPTION_INFO AcpiGbl_ExceptionNames_Ctrl[] = #endif /* EXCEPTION_TABLE */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACEXCEP_H__ */ diff --git a/source/include/acglobal.h b/source/include/acglobal.h index 701955e9f7a2..f33b720d0db9 100644 --- a/source/include/acglobal.h +++ b/source/include/acglobal.h @@ -45,8 +45,6 @@ #define __ACGLOBAL_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Ensure that the globals are actually defined and initialized only once. * @@ -107,8 +105,8 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_AutoSerializeMethods, TRUE); /* * Create the predefined _OSI method in the namespace? Default is TRUE - * because ACPI CA is fully compatible with other ACPI implementations. - * Changing this will revert ACPI CA (and machine ASL) to pre-OSI behavior. + * because ACPICA is fully compatible with other ACPI implementations. + * Changing this will revert ACPICA (and machine ASL) to pre-OSI behavior. */ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_CreateOsiMethod, TRUE); @@ -164,10 +162,10 @@ ACPI_INIT_GLOBAL (UINT8, AcpiGbl_TruncateIoAddresses, FALSE); ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableAutoRepair, FALSE); /* - * Optionally do not load any SSDTs from the RSDT/XSDT during initialization. + * Optionally do not install any SSDTs from the RSDT/XSDT during initialization. * This can be useful for debugging ACPI problems on some machines. */ -ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableLoad, FALSE); +ACPI_INIT_GLOBAL (UINT8, AcpiGbl_DisableSsdtTableInstall, FALSE); /* * We keep track of the latest version of Windows that has been requested by @@ -362,7 +360,7 @@ ACPI_GLOBAL (UINT32, AcpiGbl_MaxConcurrentNodeCount); ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_EntryStackPointer); ACPI_GLOBAL (ACPI_SIZE *, AcpiGbl_LowestStackPointer); ACPI_GLOBAL (UINT32, AcpiGbl_DeepestNesting); -ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); +ACPI_INIT_GLOBAL (UINT32, AcpiGbl_NestingLevel, 0); #endif @@ -519,8 +517,7 @@ ACPI_INIT_GLOBAL (ACPI_FILE, AcpiGbl_DebugFile, NULL); ****************************************************************************/ extern const AH_PREDEFINED_NAME AslPredefinedInfo[]; +extern const AH_DEVICE_ID AslDeviceIds[]; -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACGLOBAL_H__ */ diff --git a/source/include/achware.h b/source/include/achware.h index 81d1bbf30bc5..1b1331879983 100644 --- a/source/include/achware.h +++ b/source/include/achware.h @@ -45,8 +45,6 @@ #define __ACHWARE_H__ -#pragma pack(push) /* Set default struct packing */ - /* Values for the _SST predefined method */ #define ACPI_SST_INDICATOR_OFF 0 @@ -226,6 +224,4 @@ AcpiHwDerivePciId ( ACPI_HANDLE PciRegion); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACHWARE_H__ */ diff --git a/source/include/acinterp.h b/source/include/acinterp.h index bcb306cff53e..b77864034b72 100644 --- a/source/include/acinterp.h +++ b/source/include/acinterp.h @@ -45,8 +45,6 @@ #define __ACINTERP_H__ -#pragma pack(push) /* Set default struct packing */ - #define ACPI_WALK_OPERANDS (&(WalkState->Operands [WalkState->NumOperands -1])) /* Macros for tables used for debug output */ @@ -721,6 +719,4 @@ AcpiExDataTableSpaceHandler ( void *HandlerContext, void *RegionContext); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __INTERP_H__ */ diff --git a/source/include/aclocal.h b/source/include/aclocal.h index 3234066bf29f..50a4a8e92383 100644 --- a/source/include/aclocal.h +++ b/source/include/aclocal.h @@ -45,8 +45,6 @@ #define __ACLOCAL_H__ -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ #define ACPI_SERIALIZED 0xFF @@ -883,7 +881,8 @@ typedef union acpi_parse_value #define ACPI_DASM_MATCHOP 0x06 /* Parent opcode is a Match() operator */ #define ACPI_DASM_LNOT_PREFIX 0x07 /* Start of a LNotEqual (etc.) pair of opcodes */ #define ACPI_DASM_LNOT_SUFFIX 0x08 /* End of a LNotEqual (etc.) pair of opcodes */ -#define ACPI_DASM_IGNORE 0x09 /* Not used at this time */ +#define ACPI_DASM_HID_STRING 0x09 /* String is a _HID or _CID */ +#define ACPI_DASM_IGNORE 0x0A /* Not used at this time */ /* * Generic operation (for example: If, While, Store) @@ -1351,6 +1350,11 @@ typedef struct ah_predefined_name } AH_PREDEFINED_NAME; -#pragma pack(pop) /* Restore original struct packing */ +typedef struct ah_device_id +{ + char *Name; + char *Description; + +} AH_DEVICE_ID; #endif /* __ACLOCAL_H__ */ diff --git a/source/include/acmacros.h b/source/include/acmacros.h index 1212d0516b9f..19a3e8e23542 100644 --- a/source/include/acmacros.h +++ b/source/include/acmacros.h @@ -45,8 +45,6 @@ #define __ACMACROS_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Extract data using a pointer. Any more than a byte and we * get into potential aligment issues -- see the STORE macros below. @@ -435,6 +433,4 @@ #define ACPI_IS_OCTAL_DIGIT(d) (((char)(d) >= '0') && ((char)(d) <= '7')) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* ACMACROS_H */ diff --git a/source/include/acnamesp.h b/source/include/acnamesp.h index a9c7d2212f45..9fd3841c6c72 100644 --- a/source/include/acnamesp.h +++ b/source/include/acnamesp.h @@ -45,8 +45,6 @@ #define __ACNAMESP_H__ -#pragma pack(push) /* Set default struct packing */ - /* To search the entire name space, pass this as SearchBase */ #define ACPI_NS_ALL ((ACPI_HANDLE)0) @@ -537,6 +535,4 @@ void AcpiNsTerminate ( void); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACNAMESP_H__ */ diff --git a/source/include/acobject.h b/source/include/acobject.h index 040f5b6277e1..367004908a9a 100644 --- a/source/include/acobject.h +++ b/source/include/acobject.h @@ -44,8 +44,6 @@ #ifndef _ACOBJECT_H #define _ACOBJECT_H -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ @@ -234,7 +232,8 @@ typedef struct acpi_object_method #define ACPI_METHOD_INTERNAL_ONLY 0x02 /* Method is implemented internally (_OSI) */ #define ACPI_METHOD_SERIALIZED 0x04 /* Method is serialized */ #define ACPI_METHOD_SERIALIZED_PENDING 0x08 /* Method is to be marked serialized */ -#define ACPI_METHOD_MODIFIED_NAMESPACE 0x10 /* Method modified the namespace */ +#define ACPI_METHOD_IGNORE_SYNC_LEVEL 0x10 /* Method was auto-serialized at table load time */ +#define ACPI_METHOD_MODIFIED_NAMESPACE 0x20 /* Method modified the namespace */ /****************************************************************************** @@ -583,6 +582,6 @@ typedef union acpi_descriptor } ACPI_DESCRIPTOR; -#pragma pack(pop) /* Restore original struct packing */ +#pragma pack() #endif /* _ACOBJECT_H */ diff --git a/source/include/acoutput.h b/source/include/acoutput.h index ff42023e2d96..8f054ae11929 100644 --- a/source/include/acoutput.h +++ b/source/include/acoutput.h @@ -44,8 +44,6 @@ #ifndef __ACOUTPUT_H__ #define __ACOUTPUT_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Debug levels and component IDs. These are used to control the * granularity of the output of the ACPI_DEBUG_PRINT macro -- on a @@ -466,6 +464,4 @@ #endif /* ACPI_DEBUG_OUTPUT */ -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACOUTPUT_H__ */ diff --git a/source/include/acparser.h b/source/include/acparser.h index 74389d2ef778..bddd3c114296 100644 --- a/source/include/acparser.h +++ b/source/include/acparser.h @@ -46,8 +46,6 @@ #define __ACPARSER_H__ -#pragma pack(push) /* Set default struct packing */ - #define OP_HAS_RETURN_VALUE 1 /* Variable number of arguments. This field must be 32 bits */ @@ -355,6 +353,4 @@ AcpiPsShow ( ACPI_PARSE_OBJECT *op); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACPARSER_H__ */ diff --git a/source/include/acpiosxf.h b/source/include/acpiosxf.h index a97921e169d8..ebbcb6bd6f61 100644 --- a/source/include/acpiosxf.h +++ b/source/include/acpiosxf.h @@ -50,8 +50,6 @@ #include "actypes.h" -#pragma pack(push) /* Set default struct packing */ - /* Types for AcpiOsExecute */ typedef enum @@ -553,6 +551,4 @@ AcpiOsCloseDirectory ( #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACPIOSXF_H__ */ diff --git a/source/include/acpixf.h b/source/include/acpixf.h index a88491f50396..0b010470d0f9 100644 --- a/source/include/acpixf.h +++ b/source/include/acpixf.h @@ -47,15 +47,13 @@ /* Current ACPICA subsystem version in YYYYMMDD format */ -#define ACPI_CA_VERSION 0x20140214 +#define ACPI_CA_VERSION 0x20140325 #include "acconfig.h" #include "actypes.h" #include "actbl.h" #include "acbuffer.h" -#pragma pack(push) /* Set default struct packing */ - /* * Globals that are publically available */ @@ -76,7 +74,7 @@ extern UINT8 AcpiGbl_AutoSerializeMethods; extern UINT8 AcpiGbl_CopyDsdtLocally; extern UINT8 AcpiGbl_CreateOsiMethod; extern UINT8 AcpiGbl_DisableAutoRepair; -extern UINT8 AcpiGbl_DisableSsdtTableLoad; +extern UINT8 AcpiGbl_DisableSsdtTableInstall; extern UINT8 AcpiGbl_DoNotUseXsdt; extern UINT8 AcpiGbl_EnableAmlDebugObject; extern UINT8 AcpiGbl_EnableInterpreterSlack; @@ -204,6 +202,11 @@ AcpiDecodePldBuffer ( * ACPI table load/unload interfaces */ ACPI_STATUS +AcpiInstallTable ( + ACPI_PHYSICAL_ADDRESS Address, + BOOLEAN Physical); + +ACPI_STATUS AcpiLoadTable ( ACPI_TABLE_HEADER *Table); @@ -833,6 +836,4 @@ AcpiDebugPrintRaw ( ...); #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACXFACE_H__ */ diff --git a/source/include/acpredef.h b/source/include/acpredef.h index b8b75997edeb..e5caaf650ae5 100644 --- a/source/include/acpredef.h +++ b/source/include/acpredef.h @@ -45,8 +45,6 @@ #define __ACPREDEF_H__ -#pragma pack(push) /* Set default struct packing */ - /****************************************************************************** * * Return Package types @@ -1069,6 +1067,4 @@ static const ACPI_PREDEFINED_INFO AcpiGbl_ScopeNames[] = { extern const ACPI_PREDEFINED_INFO AcpiGbl_ResourceNames[]; #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif diff --git a/source/include/acresrc.h b/source/include/acresrc.h index 5f658a63933b..f761d3f09957 100644 --- a/source/include/acresrc.h +++ b/source/include/acresrc.h @@ -49,8 +49,6 @@ #include "amlresrc.h" -#pragma pack(push) /* Set default struct packing */ - /* * If possible, pack the following structures to byte alignment, since we * don't care about performance for debug output. Two cases where we cannot @@ -439,6 +437,4 @@ extern ACPI_RSDUMP_INFO AcpiRsDumpUartSerialBus[]; extern ACPI_RSDUMP_INFO AcpiRsDumpGeneralFlags[]; #endif -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACRESRC_H__ */ diff --git a/source/include/acrestyp.h b/source/include/acrestyp.h index eaea4375db14..b0412aa63cca 100644 --- a/source/include/acrestyp.h +++ b/source/include/acrestyp.h @@ -45,8 +45,6 @@ #define __ACRESTYP_H__ -#pragma pack(push) /* Set default struct packing */ - /* * Definitions for Resource Attributes */ @@ -699,6 +697,4 @@ typedef struct acpi_pci_routing_table } ACPI_PCI_ROUTING_TABLE; -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACRESTYP_H__ */ diff --git a/source/include/acstruct.h b/source/include/acstruct.h index c52db8f4e177..5a0baf4001b0 100644 --- a/source/include/acstruct.h +++ b/source/include/acstruct.h @@ -44,9 +44,6 @@ #ifndef __ACSTRUCT_H__ #define __ACSTRUCT_H__ - -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ /***************************************************************************** @@ -273,6 +270,4 @@ typedef struct acpi_walk_info #define ACPI_DISPLAY_SHORT (UINT8) 2 -#pragma pack(pop) /* Restore original struct packing */ - #endif diff --git a/source/include/actables.h b/source/include/actables.h index 19f4e6d626ac..672b6b40632b 100644 --- a/source/include/actables.h +++ b/source/include/actables.h @@ -45,8 +45,6 @@ #define __ACTABLES_H__ -#pragma pack(push) /* Set default struct packing */ - ACPI_STATUS AcpiAllocateRootTable ( UINT32 InitialTableCount); @@ -65,6 +63,40 @@ AcpiTbScanMemoryForRsdp ( /* + * tbdata - table data structure management + */ +ACPI_STATUS +AcpiTbGetNextRootIndex ( + UINT32 *TableIndex); + +void +AcpiTbInitTableDescriptor ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + ACPI_TABLE_HEADER *Table); + +ACPI_STATUS +AcpiTbAcquireTempTable ( + ACPI_TABLE_DESC *TableDesc, + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags); + +void +AcpiTbReleaseTempTable ( + ACPI_TABLE_DESC *TableDesc); + +BOOLEAN +AcpiTbIsTableLoaded ( + UINT32 TableIndex); + +void +AcpiTbSetTableLoadedFlag ( + UINT32 TableIndex, + BOOLEAN IsLoaded); + + +/* * tbfadt - FADT parse/convert/validate */ void @@ -96,17 +128,41 @@ AcpiTbResizeRootTableList ( void); ACPI_STATUS -AcpiTbVerifyTable ( +AcpiTbValidateTable ( ACPI_TABLE_DESC *TableDesc); -ACPI_TABLE_HEADER * -AcpiTbTableOverride ( - ACPI_TABLE_HEADER *TableHeader, +void +AcpiTbInvalidateTable ( ACPI_TABLE_DESC *TableDesc); ACPI_STATUS -AcpiTbAddTable ( +AcpiTbVerifyTable ( + ACPI_TABLE_DESC *TableDesc, + char *Signature); + +void +AcpiTbOverrideTable ( + ACPI_TABLE_DESC *OldTableDesc); + +ACPI_STATUS +AcpiTbAcquireTable ( ACPI_TABLE_DESC *TableDesc, + ACPI_TABLE_HEADER **TablePtr, + UINT32 *TableLength, + UINT8 *TableFlags); + +void +AcpiTbReleaseTable ( + ACPI_TABLE_HEADER *Table, + UINT32 TableLength, + UINT8 TableFlags); + +ACPI_STATUS +AcpiTbInstallStandardTable ( + ACPI_PHYSICAL_ADDRESS Address, + UINT8 Flags, + BOOLEAN Reload, + BOOLEAN Override, UINT32 *TableIndex); ACPI_STATUS @@ -118,7 +174,7 @@ AcpiTbStoreTable ( UINT32 *TableIndex); void -AcpiTbDeleteTable ( +AcpiTbUninstallTable ( ACPI_TABLE_DESC *TableDesc); void @@ -142,15 +198,6 @@ AcpiTbGetOwnerId ( UINT32 TableIndex, ACPI_OWNER_ID *OwnerId); -BOOLEAN -AcpiTbIsTableLoaded ( - UINT32 TableIndex); - -void -AcpiTbSetTableLoadedFlag ( - UINT32 TableIndex, - BOOLEAN IsLoaded); - /* * tbutils - table manager utilities @@ -187,7 +234,13 @@ AcpiTbCopyDsdt ( UINT32 TableIndex); void -AcpiTbInstallTable ( +AcpiTbInstallTableWithOverride ( + UINT32 TableIndex, + ACPI_TABLE_DESC *NewTableDesc, + BOOLEAN Override); + +ACPI_STATUS +AcpiTbInstallFixedTable ( ACPI_PHYSICAL_ADDRESS Address, char *Signature, UINT32 TableIndex); @@ -196,6 +249,4 @@ ACPI_STATUS AcpiTbParseRootTable ( ACPI_PHYSICAL_ADDRESS RsdpAddress); -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTABLES_H__ */ diff --git a/source/include/actbl.h b/source/include/actbl.h index 980529e02dea..a41919504266 100644 --- a/source/include/actbl.h +++ b/source/include/actbl.h @@ -45,8 +45,6 @@ #define __ACTBL_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Fundamental ACPI tables @@ -404,12 +402,11 @@ typedef struct acpi_table_desc /* Masks for Flags field above */ -#define ACPI_TABLE_ORIGIN_UNKNOWN (0) -#define ACPI_TABLE_ORIGIN_MAPPED (1) -#define ACPI_TABLE_ORIGIN_ALLOCATED (2) -#define ACPI_TABLE_ORIGIN_OVERRIDE (4) -#define ACPI_TABLE_ORIGIN_MASK (7) -#define ACPI_TABLE_IS_LOADED (8) +#define ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL (0) /* Virtual address, external maintained */ +#define ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL (1) /* Physical address, internally mapped */ +#define ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL (2) /* Virtual address, internallly allocated */ +#define ACPI_TABLE_ORIGIN_MASK (3) +#define ACPI_TABLE_IS_LOADED (8) /* @@ -442,6 +439,4 @@ typedef struct acpi_table_desc #define ACPI_FADT_V3_SIZE (UINT32) (ACPI_FADT_OFFSET (SleepControl)) #define ACPI_FADT_V5_SIZE (UINT32) (sizeof (ACPI_TABLE_FADT)) -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTBL_H__ */ diff --git a/source/include/actbl1.h b/source/include/actbl1.h index bd2df958be99..ace4da91d878 100644 --- a/source/include/actbl1.h +++ b/source/include/actbl1.h @@ -45,8 +45,6 @@ #define __ACTBL1_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (1) @@ -1143,6 +1141,8 @@ typedef struct acpi_srat_x2apic_cpu_affinity #define ACPI_SRAT_CPU_ENABLED (1) /* 00: Use affinity structure */ -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL1_H__ */ diff --git a/source/include/actbl2.h b/source/include/actbl2.h index 514ecb0dc93e..ae46ad8d8124 100644 --- a/source/include/actbl2.h +++ b/source/include/actbl2.h @@ -45,8 +45,6 @@ #define __ACTBL2_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (2) @@ -1418,6 +1416,8 @@ typedef struct acpi_table_wdrt } ACPI_TABLE_WDRT; -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL2_H__ */ diff --git a/source/include/actbl3.h b/source/include/actbl3.h index 1afc341d3159..ce69acd4549c 100644 --- a/source/include/actbl3.h +++ b/source/include/actbl3.h @@ -45,8 +45,6 @@ #define __ACTBL3_H__ -#pragma pack(push) /* Set default struct packing */ - /******************************************************************************* * * Additional ACPI Tables (3) @@ -734,6 +732,8 @@ typedef struct acpi_tpm2_control } ACPI_TPM2_CONTROL; -#pragma pack(pop) /* Restore original struct packing */ +/* Reset to default packing */ + +#pragma pack() #endif /* __ACTBL3_H__ */ diff --git a/source/include/actypes.h b/source/include/actypes.h index 1fa6c696c599..4a6e492fc95f 100644 --- a/source/include/actypes.h +++ b/source/include/actypes.h @@ -44,8 +44,6 @@ #ifndef __ACTYPES_H__ #define __ACTYPES_H__ -#pragma pack(push) /* Set default struct packing */ - /* acpisrc:StructDefs -- for acpisrc conversion */ /* @@ -1317,6 +1315,4 @@ typedef struct acpi_memory_list #define ACPI_OSI_WIN_8 0x0C -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __ACTYPES_H__ */ diff --git a/source/include/acutils.h b/source/include/acutils.h index 355e5752bf7d..5c873133801c 100644 --- a/source/include/acutils.h +++ b/source/include/acutils.h @@ -45,8 +45,6 @@ #define _ACUTILS_H -#pragma pack(push) /* Set default struct packing */ - extern const UINT8 AcpiGbl_ResourceAmlSizes[]; extern const UINT8 AcpiGbl_ResourceAmlSerialBusSizes[]; @@ -191,8 +189,8 @@ AcpiUtGetMutexName ( const char * AcpiUtGetNotifyName ( - UINT32 NotifyValue); - + UINT32 NotifyValue, + ACPI_OBJECT_TYPE Type); #endif char * @@ -1101,7 +1099,15 @@ AcpiUtMethodError ( const char *Path, ACPI_STATUS LookupStatus); +/* + * Utility functions for ACPI names and IDs + */ +const AH_PREDEFINED_NAME * +AcpiAhMatchPredefinedName ( + char *Nameseg); -#pragma pack(pop) /* Restore original struct packing */ +const AH_DEVICE_ID * +AcpiAhMatchHardwareId ( + char *Hid); #endif /* _ACUTILS_H */ diff --git a/source/include/amlcode.h b/source/include/amlcode.h index 0695185e522a..bc8c0b0d3dd0 100644 --- a/source/include/amlcode.h +++ b/source/include/amlcode.h @@ -46,9 +46,6 @@ #ifndef __AMLCODE_H__ #define __AMLCODE_H__ -#pragma pack(push) /* Set default struct packing */ - - /* primary opcodes */ #define AML_NULL_CHAR (UINT16) 0x00 @@ -512,6 +509,4 @@ typedef enum #define AML_METHOD_SYNC_LEVEL 0xF0 -#pragma pack(pop) /* Restore original struct packing */ - #endif /* __AMLCODE_H__ */ diff --git a/source/include/amlresrc.h b/source/include/amlresrc.h index 03b1317bf0d9..23c4400a0dea 100644 --- a/source/include/amlresrc.h +++ b/source/include/amlresrc.h @@ -47,8 +47,6 @@ #define __AMLRESRC_H -#pragma pack(push) /* Set default struct packing */ - /* * Resource descriptor tags, as defined in the ACPI specification. * Used to symbolically reference fields within a descriptor. @@ -576,7 +574,4 @@ typedef union aml_resource } AML_RESOURCE; - -#pragma pack(pop) /* Restore original struct packing */ - #endif diff --git a/source/include/platform/acgcc.h b/source/include/platform/acgcc.h index 501bf2bf1379..23db3248f520 100644 --- a/source/include/platform/acgcc.h +++ b/source/include/platform/acgcc.h @@ -64,4 +64,15 @@ */ #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 + #endif /* __ACGCC_H__ */ diff --git a/source/include/platform/aclinux.h b/source/include/platform/aclinux.h index 097ba3e6254e..994c9415a42d 100644 --- a/source/include/platform/aclinux.h +++ b/source/include/platform/aclinux.h @@ -84,12 +84,23 @@ #include <ctype.h> #include <unistd.h> +/* Define/disable kernel-specific declarators */ + +#ifndef __init +#define __init +#endif + +#ifndef __iomem +#define __iomem +#endif + /* Host-dependent types and defines for user-space ACPICA */ #define ACPI_FLUSH_CPU_CACHE() #define ACPI_CAST_PTHREAD_T(Pthread) ((ACPI_THREAD_ID) (Pthread)) -#if defined(__ia64__) || defined(__x86_64__) || defined(__aarch64__) +#if defined(__ia64__) || defined(__x86_64__) ||\ + defined(__aarch64__) || defined(__PPC64__) #define ACPI_MACHINE_WIDTH 64 #define COMPILER_DEPENDENT_INT64 long #define COMPILER_DEPENDENT_UINT64 unsigned long |