diff options
Diffstat (limited to 'sys/contrib/dev/acpica/Subsystem/Include')
24 files changed, 1071 insertions, 260 deletions
diff --git a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h index e2e12183ac91d..bf5ffef8652ec 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/accommon.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/accommon.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: accommon.h -- prototypes for the common (subsystem-wide) procedures - * $Revision: 80 $ + * $Revision: 81 $ * *****************************************************************************/ @@ -154,7 +154,7 @@ AcpiCmSubsystemShutdown ( void); ACPI_STATUS -AcpiCmValidateFacp ( +AcpiCmValidateFadt ( void); /* diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h b/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h index 116c0201161f9..fe24fbb24e85e 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acconfig.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acconfig.h - Global configuration constants - * $Revision: 44 $ + * $Revision: 48 $ * *****************************************************************************/ @@ -147,21 +147,6 @@ #define ACPI_CA_VERSION __DATE__ -/* - * How and when control methods will be parsed - * The default action is to parse all methods at table load time to verify them, but delete the parse trees - * to conserve memory. Methods are parsed just in time before execution and the parse tree is deleted - * when execution completes. - */ -#define METHOD_PARSE_AT_INIT 0x0 /* Parse at table init, never delete the method parse tree */ -#define METHOD_PARSE_JUST_IN_TIME 0x1 /* Parse only when a method is invoked */ -#define METHOD_DELETE_AT_COMPLETION 0x2 /* Delete parse tree on method completion */ - -/* Default parsing configuration */ - -#define METHOD_PARSE_CONFIGURATION (METHOD_PARSE_JUST_IN_TIME | METHOD_DELETE_AT_COMPLETION) - - /* Maximum objects in the various object caches */ #define MAX_STATE_CACHE_DEPTH 64 /* State objects for stacks */ @@ -170,15 +155,6 @@ #define MAX_OBJECT_CACHE_DEPTH 64 /* Interpreter operand objects */ #define MAX_WALK_CACHE_DEPTH 2 /* Objects for parse tree walks (method execution) */ -/* - * NameSpace Table size - * - * All tables are the same size to simplify the implementation. - * Tables may be extended by allocating additional tables that - * are in turn linked together to form a chain of tables. - */ - -#define NS_TABLE_SIZE 4 /* String size constants */ @@ -247,14 +223,14 @@ /* Names within the namespace are 4 bytes long */ #define ACPI_NAME_SIZE 4 -#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */ +#define PATH_SEGMENT_LENGTH 5 /* 4 chars for name + 1 INT8 for separator */ #define PATH_SEPARATOR '.' /* Constants used in searching for the RSDP in low memory */ -#define LO_RSDP_WINDOW_BASE (void *) 0 -#define HI_RSDP_WINDOW_BASE (void *) 0xE0000 +#define LO_RSDP_WINDOW_BASE 0 /* Physical Address */ +#define HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */ #define LO_RSDP_WINDOW_SIZE 0x400 #define HI_RSDP_WINDOW_SIZE 0x20000 #define RSDP_SCAN_STEP 16 diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h index 2266e9fc80544..88e21ff848bb4 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acdispat.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acdispat.h - dispatcher (parser to interpreter interface) - * $Revision: 31 $ + * $Revision: 32 $ * *****************************************************************************/ @@ -129,8 +129,6 @@ #define MTH_TYPE_ARG 1 - - /* Common interfaces */ ACPI_STATUS diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h index 6875d04d072dc..58bd46a9725b4 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acefi.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acefi.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acefi.h - OS specific defines, etc. - * $Revision: 1 $ + * $Revision: 3 $ * *****************************************************************************/ @@ -123,5 +123,14 @@ #include <efistdarg.h> #include <efilib.h> +#undef UINT8 +#undef BOOLEAN +#undef UCHAR +#undef UINT16 +#undef INT32 +#undef UINT32 +#undef INT64 +#undef UINT64 -#endif /* __ACEFI_H__ */
\ No newline at end of file + +#endif /* __ACEFI_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acenv.h b/sys/contrib/dev/acpica/Subsystem/Include/acenv.h index 1d44537d6e502..8ff8452075dd1 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acenv.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acenv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acenv.h - Generation environment specific items - * $Revision: 61 $ + * $Revision: 65 $ * *****************************************************************************/ @@ -139,6 +139,13 @@ #define ACPI_USE_SYSTEM_CLIBRARY #endif +#ifdef _ACPI_ASL_COMPILER +#define ACPI_DEBUG +#define ACPI_APPLICATION +#define ENABLE_DEBUGGER +#define ACPI_USE_SYSTEM_CLIBRARY +#endif + /* * Environment configuration. The purpose of this file is to interface to the @@ -359,16 +366,4 @@ typedef char *va_list; platform header. */ - -/* TBD: move this elsewhere! */ - -#ifdef __ia64__ -/* Look at interim FADT to determine IO or memory mapped */ -#define IoAddressSpace(flag) (AcpiGbl_FACP->AddressSpace & flag) -#else -/* always IO space */ -#define IoAddressSpace(flag) (1) -#endif - - #endif /* __ACENV_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acevents.h b/sys/contrib/dev/acpica/Subsystem/Include/acevents.h index 5253b95dc6436..0af38980d2354 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acevents.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acevents.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acevents.h - Event subcomponent prototypes and defines - * $Revision: 59 $ + * $Revision: 60 $ * *****************************************************************************/ @@ -200,7 +200,7 @@ ACPI_STATUS AcpiEvAddressSpaceDispatch ( ACPI_OPERAND_OBJECT *RegionObj, UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value); diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h b/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h index 36ba77a4cd3dc..3f9a9abb3f116 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acfreebsd.h @@ -131,4 +131,4 @@ #define __sti() enable_intr() -#endif /* __ACFREEBSD_H__ */
\ No newline at end of file +#endif /* __ACFREEBSD_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h b/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h index 45bfa70961aaa..d207efca89976 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acglobal.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acglobal.h - Declarations for global variables - * $Revision: 85 $ + * $Revision: 92 $ * *****************************************************************************/ @@ -165,13 +165,12 @@ extern UINT32 AcpiGbl_NestingLevel; * of each in the system. Each global points to the actual table. * */ -ACPI_EXTERN ROOT_SYSTEM_DESCRIPTOR_POINTER *AcpiGbl_RSDP; -ACPI_EXTERN ROOT_SYSTEM_DESCRIPTION_TABLE *AcpiGbl_RSDT; -ACPI_EXTERN FIRMWARE_ACPI_CONTROL_STRUCTURE *AcpiGbl_FACS; -ACPI_EXTERN FIXED_ACPI_DESCRIPTION_TABLE *AcpiGbl_FACP; -ACPI_EXTERN APIC_TABLE *AcpiGbl_APIC; -ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT; -ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_SBST; +ACPI_EXTERN RSDP_DESCRIPTOR *AcpiGbl_RSDP; +ACPI_EXTERN XSDT_DESCRIPTOR *AcpiGbl_XSDT; +ACPI_EXTERN FADT_DESCRIPTOR *AcpiGbl_FADT; +ACPI_EXTERN ACPI_TABLE_HEADER *AcpiGbl_DSDT; +ACPI_EXTERN ACPI_COMMON_FACS *AcpiGbl_FACS; + /* * Since there may be multiple SSDTs and PSDTS, a single pointer is not * sufficient; Therefore, there isn't one! @@ -254,6 +253,7 @@ ACPI_EXTERN ACPI_OBJECT_NOTIFY_HANDLER AcpiGbl_SysNotify; extern BOOLEAN AcpiGbl_Shutdown; extern UINT32 AcpiGbl_SystemFlags; extern UINT32 AcpiGbl_StartupFlags; +extern UINT8 AcpiGbl_DecodeTo8bit[]; /***************************************************************************** @@ -288,23 +288,8 @@ ACPI_EXTERN ALLOCATION_INFO *AcpiGbl_TailAllocPtr; ****************************************************************************/ -ACPI_EXTERN UINT32 AcpiGbl_WhenToParseMethods; ACPI_EXTERN ACPI_WALK_LIST *AcpiGbl_CurrentWalkList; -/* Base of AML block, and pointer to current location in it */ - -ACPI_EXTERN UINT8 *AcpiGbl_PCodeBase; -ACPI_EXTERN UINT8 *AcpiGbl_PCode; - -/* - * Length of AML block, and remaining length of current package. - */ -ACPI_EXTERN UINT32 AcpiGbl_PCodeBlockLen; -ACPI_EXTERN UINT32 AcpiGbl_PCodeLen; - -ACPI_EXTERN UINT32 AcpiGbl_BufSeq; /* Counts allocated Buffer descriptors */ -ACPI_EXTERN UINT32 AcpiGbl_NodeErr; /* Indicate if inc_error should be called */ - /* * Handle to the last method found - used during pass1 of load */ @@ -330,10 +315,6 @@ ACPI_EXTERN UINT8 AcpiGbl_CmSingleStep; ACPI_EXTERN ACPI_PARSE_OBJECT *AcpiGbl_ParsedNamespaceRoot; -extern ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[]; -extern UINT8 AcpiGbl_AmlOpInfoIndex[256]; - - /***************************************************************************** * * Hardware globals @@ -380,9 +361,10 @@ ACPI_EXTERN UINT32 AcpiGbl_EventCount[NUM_FIXED_EVENTS]; * ****************************************************************************/ +#ifdef ENABLE_DEBUGGER ACPI_EXTERN BOOLEAN AcpiGbl_MethodExecuting; ACPI_EXTERN BOOLEAN AcpiGbl_DbTerminateThreads; - +#endif /* Memory allocation metrics - Debug Only! */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/achware.h b/sys/contrib/dev/acpica/Subsystem/Include/achware.h index 046bbaf879177..fe1c1b1c501dd 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/achware.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/achware.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: achware.h -- hardware specific interfaces - * $Revision: 42 $ + * $Revision: 48 $ * *****************************************************************************/ @@ -147,11 +147,37 @@ AcpiHwGetModeCapabilities ( /* Register I/O Prototypes */ + UINT32 -AcpiHwRegisterAccess ( +AcpiHwRegisterBitAccess ( NATIVE_UINT ReadWrite, BOOLEAN UseLock, - UINT32 RegisterId, ... /* DWORD Value */); + UINT32 RegisterId, + ... /* DWORD Write Value */); + +UINT32 +AcpiHwRegisterRead ( + BOOLEAN UseLock, + UINT32 RegisterId); + +void +AcpiHwRegisterWrite ( + BOOLEAN UseLock, + UINT32 RegisterId, + UINT32 Value); + +UINT32 +AcpiHwLowLevelRead ( + UINT32 Width, + ACPI_GAS *Reg, + UINT32 Offset); + +void +AcpiHwLowLevelWrite ( + UINT32 Width, + UINT32 Value, + ACPI_GAS *Reg, + UINT32 Offset); void AcpiHwClearAcpiStatus ( @@ -216,6 +242,16 @@ ACPI_STATUS AcpiHwGetCxInfo ( UINT32 CxStates[]); +ACPI_STATUS +AcpiHwGetCxHandler ( + UINT32 CxState, + ACPI_C_STATE_HANDLER *Handler); + +ACPI_STATUS +AcpiHwSetCxHandler ( + UINT32 CxState, + ACPI_C_STATE_HANDLER Handler); + /* Throttling Prototypes */ @@ -256,5 +292,9 @@ UINT32 AcpiHwPmtResolution ( void); +ACPI_STATUS +AcpiGetTimer ( + UINT32 *OutTicks); + #endif /* __ACHWARE_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h index 0a4e7a8c33371..73ccc379095eb 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acinterp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acinterp.h - Interpreter subcomponent prototypes and defines - * $Revision: 82 $ + * $Revision: 85 $ * *****************************************************************************/ @@ -417,7 +417,8 @@ AcpiAmlResolveToValue ( ACPI_STATUS AcpiAmlResolveNodeToValue ( - ACPI_NAMESPACE_NODE **StackPtr); + ACPI_NAMESPACE_NODE **StackPtr, + ACPI_WALK_STATE *WalkState); ACPI_STATUS AcpiAmlResolveObjectToValue ( @@ -533,6 +534,11 @@ void AcpiAmlExitInterpreter ( void); +void +AcpiAmlTruncateFor32bitTable ( + ACPI_OPERAND_OBJECT *ObjDesc, + ACPI_WALK_STATE *WalkState); + BOOLEAN AcpiAmlValidateObjectType ( ACPI_OBJECT_TYPE Type); @@ -546,10 +552,6 @@ AcpiAmlReleaseGlobalLock ( BOOLEAN Locked); UINT32 -AcpiAmlBufSeq ( - void); - -UINT32 AcpiAmlDigitsNeeded ( ACPI_INTEGER Value, UINT32 Base); @@ -578,7 +580,7 @@ AcpiAmlBuildCopyInternalPackageObject ( ACPI_STATUS AcpiAmlSystemMemorySpaceHandler ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, @@ -587,7 +589,7 @@ AcpiAmlSystemMemorySpaceHandler ( ACPI_STATUS AcpiAmlSystemIoSpaceHandler ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, @@ -596,7 +598,7 @@ AcpiAmlSystemIoSpaceHandler ( ACPI_STATUS AcpiAmlPciConfigSpaceHandler ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, @@ -605,7 +607,7 @@ AcpiAmlPciConfigSpaceHandler ( ACPI_STATUS AcpiAmlEmbeddedControllerSpaceHandler ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, @@ -614,7 +616,7 @@ AcpiAmlEmbeddedControllerSpaceHandler ( ACPI_STATUS AcpiAmlSmBusSpaceHandler ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, diff --git a/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h b/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h index 163c2903bab12..8f6443c23ae80 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/aclinux.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: aclinux.h - OS specific defines, etc. - * $Revision: 1 $ + * $Revision: 4 $ * *****************************************************************************/ @@ -131,6 +131,14 @@ #include "acgcc.h" +#undef DEBUGGER_THREADING +#define DEBUGGER_THREADING DEBUGGER_SINGLE_THREADED + +/* Linux ia32 can't do int64 well */ +#ifndef _IA64 +#define ACPI_NO_INTEGER64_SUPPORT +#endif + #if 0 /* Use native Linux string library */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h index 0a3868b88f777..2378345b05b6a 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/aclocal.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: aclocal.h - Internal data types used across the ACPI subsystem - * $Revision: 82 $ + * $Revision: 89 $ * *****************************************************************************/ @@ -268,6 +268,7 @@ typedef struct acpi_node #define ANOBJ_AML_ATTACHMENT 0x1 #define ANOBJ_END_OF_PEER_LIST 0x2 +#define ANOBJ_DATA_WIDTH_32 0x4 /* Parent table is 64-bits */ /* @@ -281,6 +282,7 @@ typedef struct AcpiTableDesc ACPI_TABLE_HEADER *Pointer; void *BasePointer; UINT8 *AmlPointer; + UINT64 PhysicalAddress; UINT32 AmlLength; UINT32 Length; UINT32 Count; @@ -544,8 +546,7 @@ typedef struct acpi_opcode_info UINT32 ParseArgs; /* Grammar/Parse time arguments */ UINT32 RuntimeArgs; /* Interpret time arguments */ - DEBUG_ONLY_MEMBERS ( - NATIVE_CHAR *Name) /* op name (debug only) */ + DEBUG_ONLY_MEMBERS (NATIVE_CHAR *Name) /* op name (debug only) */ } ACPI_OPCODE_INFO; @@ -572,7 +573,7 @@ typedef union acpi_parse_val DEBUG_ONLY_MEMBERS (\ NATIVE_CHAR OpName[16]) /* op name (debug only) */\ /* NON-DEBUG members below: */\ - ACPI_NAMESPACE_NODE *Node;/* for use by interpreter */\ + ACPI_NAMESPACE_NODE *Node; /* for use by interpreter */\ ACPI_PARSE_VALUE Value; /* Value or args associated with the opcode */\ @@ -649,7 +650,7 @@ typedef struct acpi_walk_state UINT8 CurrentResult; /* */ struct acpi_walk_state *Next; /* Next WalkState in list */ - ACPI_PARSE_OBJECT *Origin; /* Start of walk */ + ACPI_PARSE_OBJECT *Origin; /* Start of walk [Obsolete] */ /* TBD: Obsolete with removal of WALK procedure ? */ ACPI_PARSE_OBJECT *PrevOp; /* Last op that was processed */ @@ -769,72 +770,92 @@ typedef struct acpi_get_devices_info #define MAX_CX_STATE_LATENCY 0xFFFFFFFF #define MAX_CX_STATES 4 + /* * The #define's and enum below establish an abstract way of identifying what * register block and register is to be accessed. Do not change any of the * values as they are used in switch statements and offset calculations. */ -#define REGISTER_BLOCK_MASK 0xFF00 -#define BIT_IN_REGISTER_MASK 0x00FF -#define PM1_EVT 0x0100 -#define PM1_CONTROL 0x0200 -#define PM2_CONTROL 0x0300 -#define PM_TIMER 0x0400 -#define PROCESSOR_BLOCK 0x0500 -#define GPE0_STS_BLOCK 0x0600 -#define GPE0_EN_BLOCK 0x0700 -#define GPE1_STS_BLOCK 0x0800 -#define GPE1_EN_BLOCK 0x0900 - -enum -{ - /* PM1 status register ids */ +#define REGISTER_BLOCK_MASK 0xFF00 /* Register Block Id */ +#define BIT_IN_REGISTER_MASK 0x00FF /* Bit Id in the Register Block Id */ +#define BYTE_IN_REGISTER_MASK 0x00FF /* Register Offset in the Register Block */ - TMR_STS = (PM1_EVT | 0x01), - BM_STS, - GBL_STS, - PWRBTN_STS, - SLPBTN_STS, - RTC_STS, - WAK_STS, +#define REGISTER_BLOCK_ID(RegId) (RegId & REGISTER_BLOCK_MASK) +#define REGISTER_BIT_ID(RegId) (RegId & BIT_IN_REGISTER_MASK) +#define REGISTER_OFFSET(RegId) (RegId & BYTE_IN_REGISTER_MASK) - /* PM1 enable register ids */ +/* + * Access Rule + * To access a Register Bit: + * -> Use Bit Name (= Register Block Id | Bit Id) defined in the enum. + * + * To access a Register: + * -> Use Register Id (= Register Block Id | Register Offset) + */ - TMR_EN, - /* need to skip 1 enable number since there's no bus master enable register */ - GBL_EN = (PM1_EVT | 0x0A), - PWRBTN_EN, - SLPBTN_EN, - RTC_EN, - /* PM1 control register ids */ +/* + * Register Block Id + */ +#define PM1_STS 0x0100 +#define PM1_EN 0x0200 +#define PM1_CONTROL 0x0300 +#define PM2_CONTROL 0x0400 +#define PM_TIMER 0x0500 +#define PROCESSOR_BLOCK 0x0600 +#define GPE0_STS_BLOCK 0x0700 +#define GPE0_EN_BLOCK 0x0800 +#define GPE1_STS_BLOCK 0x0900 +#define GPE1_EN_BLOCK 0x0A00 +#define SMI_CMD_BLOCK 0x0B00 - SCI_EN = (PM1_CONTROL | 0x01), - BM_RLD, - GBL_RLS, - SLP_TYPE_A, - SLP_TYPE_B, - SLP_EN, +/* + * Address space bitmasks for mmio or io spaces + */ - /* PM2 control register ids */ +#define SMI_CMD_ADDRESS_SPACE 0x01 +#define PM1_BLK_ADDRESS_SPACE 0x02 +#define PM2_CNT_BLK_ADDRESS_SPACE 0x04 +#define PM_TMR_BLK_ADDRESS_SPACE 0x08 +#define GPE0_BLK_ADDRESS_SPACE 0x10 +#define GPE1_BLK_ADDRESS_SPACE 0x20 - ARB_DIS = (PM2_CONTROL | 0x01), +/* + * Control bit definitions + */ +#define TMR_STS (PM1_STS | 0x01) +#define BM_STS (PM1_STS | 0x02) +#define GBL_STS (PM1_STS | 0x03) +#define PWRBTN_STS (PM1_STS | 0x04) +#define SLPBTN_STS (PM1_STS | 0x05) +#define RTC_STS (PM1_STS | 0x06) +#define WAK_STS (PM1_STS | 0x07) - /* PM Timer register ids */ +#define TMR_EN (PM1_EN | 0x01) + /* no BM_EN */ +#define GBL_EN (PM1_EN | 0x03) +#define PWRBTN_EN (PM1_EN | 0x04) +#define SLPBTN_EN (PM1_EN | 0x05) +#define RTC_EN (PM1_EN | 0x06) +#define WAK_EN (PM1_EN | 0x07) - TMR_VAL = (PM_TIMER | 0x01), +#define SCI_EN (PM1_CONTROL | 0x01) +#define BM_RLD (PM1_CONTROL | 0x02) +#define GBL_RLS (PM1_CONTROL | 0x03) +#define SLP_TYPE_A (PM1_CONTROL | 0x04) +#define SLP_TYPE_B (PM1_CONTROL | 0x05) +#define SLP_EN (PM1_CONTROL | 0x06) - GPE0_STS = (GPE0_STS_BLOCK | 0x01), - GPE0_EN = (GPE0_EN_BLOCK | 0x01), +#define ARB_DIS (PM2_CONTROL | 0x01) - GPE1_STS = (GPE1_STS_BLOCK | 0x01), - GPE1_EN = (GPE0_EN_BLOCK | 0x01), +#define TMR_VAL (PM_TIMER | 0x01) - /* Last register value is one less than LAST_REG */ +#define GPE0_STS (GPE0_STS_BLOCK | 0x01) +#define GPE0_EN (GPE0_EN_BLOCK | 0x01) - LAST_REG -}; +#define GPE1_STS (GPE1_STS_BLOCK | 0x01) +#define GPE1_EN (GPE1_EN_BLOCK | 0x01) #define TMR_STS_MASK 0x0001 @@ -845,8 +866,9 @@ enum #define RTC_STS_MASK 0x0400 #define WAK_STS_MASK 0x8000 -#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK | PWRBTN_STS_MASK | \ - SLPBTN_STS_MASK | RTC_STS_MASK | WAK_STS_MASK) +#define ALL_FIXED_STS_BITS (TMR_STS_MASK | BM_STS_MASK | GBL_STS_MASK \ + | PWRBTN_STS_MASK | SLPBTN_STS_MASK \ + | RTC_STS_MASK | WAK_STS_MASK) #define TMR_EN_MASK 0x0001 #define GBL_EN_MASK 0x0020 @@ -861,6 +883,7 @@ enum #define SLP_EN_MASK 0x2000 #define ARB_DIS_MASK 0x0001 +#define TMR_VAL_MASK 0xFFFFFFFF #define GPE0_STS_MASK #define GPE0_EN_MASK @@ -872,16 +895,6 @@ enum #define ACPI_READ 1 #define ACPI_WRITE 2 -#define LOW_BYTE 0x00FF -#define ONE_BYTE 0x08 - -#ifndef SET - #define SET 1 -#endif -#ifndef CLEAR - #define CLEAR 0 -#endif - /* Plug and play */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h b/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h index e594b506d6fb2..2cfcf119e757a 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acmacros.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acmacros.h - C macros for the entire subsystem. - * $Revision: 50 $ + * $Revision: 56 $ * *****************************************************************************/ @@ -219,6 +219,11 @@ #define MUL_16(a) _MUL(a,4) #define MOD_16(a) _MOD(a,16) +/* + * Divide and Modulo + */ +#define ACPI_DIVIDE(n,d) ((n) / (d)) +#define ACPI_MODULO(n,d) ((n) % (d)) /* * Rounding macros (Power of two boundaries only) @@ -228,18 +233,35 @@ #define ROUND_UP(value,boundary) (((value) + ((boundary)-1)) & (~((boundary)-1))) #define ROUND_DOWN_TO_32_BITS(a) ROUND_DOWN(a,4) +#define ROUND_DOWN_TO_64_BITS(a) ROUND_DOWN(a,8) #define ROUND_DOWN_TO_NATIVE_WORD(a) ROUND_DOWN(a,ALIGNED_ADDRESS_BOUNDARY) #define ROUND_UP_TO_32BITS(a) ROUND_UP(a,4) +#define ROUND_UP_TO_64BITS(a) ROUND_UP(a,8) #define ROUND_UP_TO_NATIVE_WORD(a) ROUND_UP(a,ALIGNED_ADDRESS_BOUNDARY) #define ROUND_PTR_UP_TO_4(a,b) ((b *)(((NATIVE_UINT)(a) + 3) & ~3)) +#define ROUND_PTR_UP_TO_8(a,b) ((b *)(((NATIVE_UINT)(a) + 7) & ~7)) + +#define ROUND_UP_TO_1K(a) (((a) + 1023) >> 10) #ifdef DEBUG_ASSERT #undef DEBUG_ASSERT #endif +/* Macros for GAS addressing */ + +#define ACPI_PCI_DEVICE_MASK (UINT64) 0x0000FFFF00000000 +#define ACPI_PCI_FUNCTION_MASK (UINT64) 0x00000000FFFF0000 +#define ACPI_PCI_REGISTER_MASK (UINT64) 0x000000000000FFFF + +#define ACPI_PCI_FUNCTION(a) (UINT32) ((((a) & ACPI_PCI_FUNCTION_MASK) >> 16)) +#define ACPI_PCI_DEVICE(a) (UINT32) ((((a) & ACPI_PCI_DEVICE_MASK) >> 32)) +#define ACPI_PCI_REGISTER(a) (UINT32) (((a) & ACPI_PCI_REGISTER_MASK)) +#define ACPI_PCI_DEVFUN(a) (UINT32) ((ACPI_PCI_DEVICE(a) << 16) | ACPI_PCI_FUNCTION(a)) + + /* * An ACPI_HANDLE (which is actually an ACPI_NAMESPACE_NODE *) can appear in some contexts, * such as on apObjStack, where a pointer to an ACPI_OPERAND_OBJECT can also @@ -335,11 +357,11 @@ #else -#define REPORT_INFO(fp) {_ReportInfo("",__LINE__,_COMPONENT); \ +#define REPORT_INFO(fp) {_ReportInfo("ACPI",__LINE__,_COMPONENT); \ DebugPrintRaw PARAM_LIST(fp);} -#define REPORT_ERROR(fp) {_ReportError("",__LINE__,_COMPONENT); \ +#define REPORT_ERROR(fp) {_ReportError("ACPI",__LINE__,_COMPONENT); \ DebugPrintRaw PARAM_LIST(fp);} -#define REPORT_WARNING(fp) {_ReportWarning("",__LINE__,_COMPONENT); \ +#define REPORT_WARNING(fp) {_ReportWarning("ACPI",__LINE__,_COMPONENT); \ DebugPrintRaw PARAM_LIST(fp);} #endif @@ -394,7 +416,7 @@ /* Conditional execution */ -#define DEBUG_EXEC(a) a; +#define DEBUG_EXEC(a) a #define NORMAL_EXEC(a) #define DEBUG_DEFINE(a) a; @@ -499,7 +521,7 @@ * DEBUG_PRINT stuff (set by ACPI_DEBUG) is on, or not. */ #ifdef ENABLE_DEBUGGER -#define DEBUGGER_EXEC(a) a; +#define DEBUGGER_EXEC(a) a #else #define DEBUGGER_EXEC(a) #endif @@ -533,4 +555,5 @@ #endif + #endif /* ACMACROS_H */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h b/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h index 3ca121d2057d1..c30c964f703c2 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acmsvc.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acmsvc.h - VC specific defines, etc. - * $Revision: 1 $ + * $Revision: 2 $ * *****************************************************************************/ @@ -125,5 +125,8 @@ /* warn C4127: conditional expression is constant */ #pragma warning(disable:4127) +/* warn C4706: assignment within conditional expression */ +#pragma warning(disable:4706) + #endif /* __ACMSVC_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h b/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h index 8681df7b733b9..40ddb25ad8ea7 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acnamesp.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acnamesp.h - Namespace subcomponent prototypes and defines - * $Revision: 97 $ + * $Revision: 98 $ * *****************************************************************************/ @@ -446,10 +446,6 @@ AcpiNsSearchNode ( OBJECT_TYPE_INTERNAL Type, ACPI_NAMESPACE_NODE **RetNode); -ACPI_NAMESPACE_NODE * -AcpiNsCreateNode ( - UINT32 AcpiName); - void AcpiNsInstallNode ( ACPI_WALK_STATE *WalkState, diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acobject.h b/sys/contrib/dev/acpica/Subsystem/Include/acobject.h index a3b9d4065b814..0226dbdd80e31 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acobject.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acobject.h @@ -2,7 +2,7 @@ /****************************************************************************** * * Name: acobject.h - Definition of ACPI_OPERAND_OBJECT (Internal object only) - * $Revision: 74 $ + * $Revision: 75 $ * *****************************************************************************/ @@ -310,7 +310,7 @@ typedef struct /* REGION */ UINT8 SpaceId; UINT32 Length; - ACPI_INTEGER Address; + ACPI_PHYSICAL_ADDRESS Address; union acpi_operand_obj *Extra; /* Pointer to executable AML (in region definition) */ union acpi_operand_obj *AddrHandler; /* Handler for system notifies */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h b/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h index c371c49e13906..42730d25f8445 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acpiosxf.h @@ -203,7 +203,7 @@ AcpiOsFree ( ACPI_STATUS AcpiOsMapMemory ( - void *PhysicalAddress, + ACPI_PHYSICAL_ADDRESS PhysicalAddress, UINT32 Length, void **LogicalAddress); @@ -286,30 +286,29 @@ AcpiOsOut32 ( UINT8 AcpiOsMemIn8 ( - ACPI_MEM_ADDRESS InAddr); - + ACPI_PHYSICAL_ADDRESS InAddr); UINT16 AcpiOsMemIn16 ( - ACPI_MEM_ADDRESS InAddr); + ACPI_PHYSICAL_ADDRESS InAddr); UINT32 AcpiOsMemIn32 ( - ACPI_MEM_ADDRESS InAddr); + ACPI_PHYSICAL_ADDRESS InAddr); void AcpiOsMemOut8 ( - ACPI_MEM_ADDRESS OutAddr, + ACPI_PHYSICAL_ADDRESS OutAddr, UINT8 Value); void AcpiOsMemOut16 ( - ACPI_MEM_ADDRESS OutAddr, + ACPI_PHYSICAL_ADDRESS OutAddr, UINT16 Value); void AcpiOsMemOut32 ( - ACPI_MEM_ADDRESS OutAddr, + ACPI_PHYSICAL_ADDRESS OutAddr, UINT32 Value); diff --git a/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h b/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h index b1c52c87fe52a..59480ae85bcdf 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/acpixf.h @@ -161,11 +161,11 @@ AcpiFormatException ( ACPI_STATUS AcpiFindRootPointer ( - void **RsdpPhysicalAddress); + ACPI_PHYSICAL_ADDRESS *RsdpPhysicalAddress); ACPI_STATUS AcpiLoadTables ( - void *RsdpPhysicalAddress); + ACPI_PHYSICAL_ADDRESS RsdpPhysicalAddress); ACPI_STATUS AcpiLoadTable ( @@ -201,7 +201,6 @@ AcpiWalkNamespace ( void *Context, void * *ReturnValue); - ACPI_STATUS AcpiGetDevices ( NATIVE_CHAR *HID, @@ -370,11 +369,11 @@ AcpiGetIrqRoutingTable ( ACPI_STATUS AcpiSetFirmwareWakingVector ( - void *PhysicalAddress); + ACPI_PHYSICAL_ADDRESS PhysicalAddress); ACPI_STATUS AcpiGetFirmwareWakingVector ( - void **PhysicalAddress); + ACPI_PHYSICAL_ADDRESS *PhysicalAddress); ACPI_STATUS AcpiGetProcessorThrottlingInfo ( diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actables.h b/sys/contrib/dev/acpica/Subsystem/Include/actables.h index 18fe18b9e07d0..00aa56b8a6d4e 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/actables.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/actables.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actables.h - ACPI table management - * $Revision: 22 $ + * $Revision: 27 $ * *****************************************************************************/ @@ -128,6 +128,23 @@ AcpiTbHandleToObject ( UINT16 TableId, ACPI_TABLE_DESC **TableDesc); +/* + * tbconvrt - Table conversion routines + */ + +ACPI_STATUS +AcpiTbConvertToXsdt ( + ACPI_TABLE_DESC *TableInfo, + UINT32 *NumberOfTables); + +ACPI_STATUS +AcpiTbConvertTableFadt ( + void); + +ACPI_STATUS +AcpiTbBuildCommonFacs ( + ACPI_TABLE_DESC *TableInfo); + /* * tbget - Table "get" routines @@ -141,13 +158,13 @@ AcpiTbGetTablePtr ( ACPI_STATUS AcpiTbGetTable ( - void *PhysicalAddress, + ACPI_PHYSICAL_ADDRESS PhysicalAddress, ACPI_TABLE_HEADER *BufferPtr, ACPI_TABLE_DESC *TableInfo); ACPI_STATUS AcpiTbVerifyRsdp ( - void *RSDP_PhysicalAddress); + ACPI_PHYSICAL_ADDRESS RSDP_PhysicalAddress); ACPI_STATUS AcpiTbGetTableFacs ( @@ -238,7 +255,7 @@ AcpiTbSystemTablePointer ( ACPI_STATUS AcpiTbMapAcpiTable ( - void *PhysicalAddress, + ACPI_PHYSICAL_ADDRESS PhysicalAddress, UINT32 *Size, void **LogicalAddress); diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl.h index 53232e350607f..170ac4dc062c6 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/actbl.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actbl.h - Table data structures defined in ACPI specification - * $Revision: 35 $ + * $Revision: 43 $ * *****************************************************************************/ @@ -122,33 +122,47 @@ * Values for description table header signatures */ -#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ -#define APIC_SIG "APIC" /* Multiple APIC Description Table */ -#define DSDT_SIG "DSDT" /* Differentiated System Description Table */ -#define FACP_SIG "FACP" /* Fixed ACPI Description Table */ -#define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ -#define PSDT_SIG "PSDT" /* Persistent System Description Table */ -#define RSDT_SIG "RSDT" /* Root System Description Table */ -#define SSDT_SIG "SSDT" /* Secondary System Description Table */ -#define SBST_SIG "SBST" /* Smart Battery Specification Table */ -#define SPIC_SIG "SPIC" /* iosapic table */ -#define BOOT_SIG "BOOT" /* Boot table */ +#define RSDP_NAME "RSDP" +#define RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ +#define APIC_SIG "APIC" /* Multiple APIC Description Table */ +#define DSDT_SIG "DSDT" /* Differentiated System Description Table */ +#define FADT_SIG "FACP" /* Fixed ACPI Description Table */ +#define FACS_SIG "FACS" /* Firmware ACPI Control Structure */ +#define PSDT_SIG "PSDT" /* Persistent System Description Table */ +#define RSDT_SIG "RSDT" /* Root System Description Table */ +#define XSDT_SIG "XSDT" /* Extended System Description Table */ +#define SSDT_SIG "SSDT" /* Secondary System Description Table */ +#define SBST_SIG "SBST" /* Smart Battery Specification Table */ +#define SPIC_SIG "SPIC" /* iosapic table */ +#define BOOT_SIG "BOOT" /* Boot table */ -#define GL_OWNED 0x02 /* Ownership of global lock is bit 1 */ +#define GL_OWNED 0x02 /* Ownership of global lock is bit 1 */ /* values of Mapic.Model */ -#define DUAL_PIC 0 -#define MULTIPLE_APIC 1 +#define DUAL_PIC 0 +#define MULTIPLE_APIC 1 /* values of Type in APIC_HEADER */ -#define APIC_PROC 0 -#define APIC_IO 1 +#define APIC_PROC 0 +#define APIC_IO 1 /* + * Common table types. The base code can remain + * constant if the underlying tables are changed + */ +#define RSDT_DESCRIPTOR RSDT_DESCRIPTOR_REV2 +#define XSDT_DESCRIPTOR XSDT_DESCRIPTOR_REV2 +#define FACS_DESCRIPTOR FACS_DESCRIPTOR_REV2 +#define FADT_DESCRIPTOR FADT_DESCRIPTOR_REV2 + + +#pragma pack(1) + +/* * Architecture-independent tables * The architecture dependent tables are in separate files */ @@ -158,10 +172,14 @@ typedef struct /* Root System Descriptor Pointer */ NATIVE_CHAR Signature [8]; /* contains "RSD PTR " */ UINT8 Checksum; /* to make sum of struct == 0 */ NATIVE_CHAR OemId [6]; /* OEM identification */ - UINT8 Reserved; /* reserved - must be zero */ - UINT32 RsdtPhysicalAddress; /* physical address of RSDT */ + UINT8 Revision; /* Must be 0 for 1.0, 2 for 2.0 */ + UINT32 RsdtPhysicalAddress; /* 32-bit physical address of RSDT */ + UINT32 Length; /* XSDT Length in bytes including hdr */ + UINT64 XsdtPhysicalAddress; /* 64-bit physical address of XSDT */ + UINT8 ExtendedChecksum; /* Checksum of entire table */ + NATIVE_CHAR Reserved [3]; /* reserved field must be 0 */ -} ROOT_SYSTEM_DESCRIPTOR_POINTER; +} RSDP_DESCRIPTOR; typedef struct /* ACPI common table header */ @@ -180,6 +198,15 @@ typedef struct /* ACPI common table header */ } ACPI_TABLE_HEADER; +typedef struct /* Common FACS for internal use */ +{ + UINT32 *GlobalLock; + UINT64 *FirmwareWakingVector; + UINT8 VectorWidth; + +} ACPI_COMMON_FACS; + + typedef struct /* APIC Table */ { ACPI_TABLE_HEADER header; /* table header */ @@ -238,6 +265,9 @@ typedef struct /* Smart Battery Description Table */ } SMART_BATTERY_DESCRIPTION_TABLE; +#pragma pack() + + /* * ACPI Table information. We save the table address, length, * and type of memory allocation (mapped or allocated) for each @@ -267,16 +297,12 @@ typedef struct _AcpiTableSupport } ACPI_TABLE_SUPPORT; - /* * Get the architecture-specific tables */ -#ifdef IA64 -#include "actbl64.h" -#else -#include "actbl32.h" -#endif - +#include "actbl1.h" /* Acpi 1.0 table defintions */ +#include "actbl71.h" /* Acpi 0.71 IA-64 Extension table defintions */ +#include "actbl2.h" /* Acpi 2.0 table definitions */ #endif /* __ACTBL_H__ */ diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h new file mode 100644 index 0000000000000..b51096147eabe --- /dev/null +++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl1.h @@ -0,0 +1,214 @@ +/****************************************************************************** + * + * Name: actbl1.h - ACPI 1.0 tables + * $Revision: 15 $ + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights + * reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#ifndef __ACTBL1_H__ +#define __ACTBL1_H__ + +#pragma pack(1) + +/*************************************/ +/* ACPI Specification Rev 1.0 for */ +/* the Root System Description Table */ +/*************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* Table header */ + UINT32 TableOffsetEntry [1]; /* Array of pointers to other */ + /* ACPI tables */ +} RSDT_DESCRIPTOR_REV1; + + +/***************************************/ +/* ACPI Specification Rev 1.0 for */ +/* the Firmware ACPI Control Structure */ +/***************************************/ +typedef struct +{ + NATIVE_CHAR Signature[4]; /* signature "FACS" */ + UINT32 Length; /* length of structure, in bytes */ + UINT32 HardwareSignature; /* hardware configuration signature */ + UINT32 FirmwareWakingVector; /* ACPI OS waking vector */ + UINT32 GlobalLock; /* Global Lock */ + UINT32_BIT S4Bios_f : 1; /* Indicates if S4BIOS support is present */ + UINT32_BIT Reserved1 : 31; /* must be 0 */ + UINT8 Resverved3 [40]; /* reserved - must be zero */ + +} FACS_DESCRIPTOR_REV1; + + +/************************************/ +/* ACPI Specification Rev 1.0 for */ +/* the Fixed ACPI Description Table */ +/************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* table header */ + UINT32 FirmwareCtrl; /* Physical address of FACS */ + UINT32 Dsdt; /* Physical address of DSDT */ + UINT8 Model; /* System Interrupt Model */ + UINT8 Reserved1; /* reserved */ + UINT16 SciInt; /* System vector of SCI interrupt */ + UINT32 SmiCmd; /* 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 S4BiosReq; /* Value to write to SMI CMD to enter S4BIOS state */ + UINT8 Reserved2; /* reserved - must be zero */ + UINT32 Pm1aEvtBlk; /* Port address of Power Mgt 1a AcpiEvent Reg Blk */ + UINT32 Pm1bEvtBlk; /* Port address of Power Mgt 1b AcpiEvent Reg Blk */ + UINT32 Pm1aCntBlk; /* Port address of Power Mgt 1a Control Reg Blk */ + UINT32 Pm1bCntBlk; /* Port address of Power Mgt 1b Control Reg Blk */ + UINT32 Pm2CntBlk; /* Port address of Power Mgt 2 Control Reg Blk */ + UINT32 PmTmrBlk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ + UINT32 Gpe0Blk; /* Port addr of General Purpose AcpiEvent 0 Reg Blk */ + UINT32 Gpe1Blk; /* Port addr of General Purpose AcpiEvent 1 Reg Blk */ + UINT8 Pm1EvtLen; /* Byte Length of ports at pm1X_evt_blk */ + UINT8 Pm1CntLen; /* Byte Length of ports at pm1X_cnt_blk */ + UINT8 Pm2CntLen; /* Byte Length of ports at pm2_cnt_blk */ + UINT8 PmTmLen; /* Byte Length of ports at pm_tm_blk */ + UINT8 Gpe0BlkLen; /* Byte Length of ports at gpe0_blk */ + UINT8 Gpe1BlkLen; /* Byte Length of ports at gpe1_blk */ + UINT8 Gpe1Base; /* offset in gpe model where gpe1 events start */ + UINT8 Reserved3; /* reserved */ + UINT16 Plvl2Lat; /* worst case HW latency to enter/exit C2 state */ + UINT16 Plvl3Lat; /* worst case HW latency to enter/exit C3 state */ + UINT16 FlushSize; /* Size of area read to flush caches */ + UINT16 FlushStride; /* Stride used in flushing caches */ + UINT8 DutyOffset; /* bit location of duty cycle field in p_cnt reg */ + UINT8 DutyWidth; /* bit width of duty cycle field in p_cnt reg */ + UINT8 DayAlrm; /* index to day-of-month alarm in RTC CMOS RAM */ + UINT8 MonAlrm; /* index to month-of-year alarm in RTC CMOS RAM */ + UINT8 Century; /* index to century in RTC CMOS RAM */ + UINT8 Reserved4; /* reserved */ + UINT8 Reserved4a; /* reserved */ + UINT8 Reserved4b; /* reserved */ + UINT32_BIT WbInvd : 1; /* wbinvd instruction works properly */ + UINT32_BIT WbInvdFlush : 1; /* wbinvd flushes but does not invalidate */ + UINT32_BIT ProcC1 : 1; /* all processors support C1 state */ + UINT32_BIT Plvl2Up : 1; /* C2 state works on MP system */ + UINT32_BIT PwrButton : 1; /* Power button is handled as a generic feature */ + UINT32_BIT SleepButton : 1; /* Sleep button is handled as a generic feature, or not present */ + UINT32_BIT FixedRTC : 1; /* RTC wakeup stat not in fixed register space */ + UINT32_BIT Rtcs4 : 1; /* RTC wakeup stat not possible from S4 */ + UINT32_BIT TmrValExt : 1; /* tmr_val is 32 bits */ + UINT32_BIT Reserved5 : 23; /* reserved - must be zero */ + +} FADT_DESCRIPTOR_REV1; + +#pragma pack() + +#endif /* __ACTBL1_H__ */ + + diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h new file mode 100644 index 0000000000000..3016c45d149b0 --- /dev/null +++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl2.h @@ -0,0 +1,280 @@ +/****************************************************************************** + * + * Name: actbl2.h - ACPI Specification Revision 2.0 Tables + * $Revision: 19 $ + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights + * reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#ifndef __ACTBL2_H__ +#define __ACTBL2_H__ + +/**************************************/ +/* Prefered Power Management Profiles */ +/**************************************/ +#define PM_UNSPECIFIED 0 +#define PM_DESKTOP 1 +#define PM_MOBILE 2 +#define PM_WORKSTATION 3 +#define PM_ENTERPRISE_SERVER 4 +#define PM_SOHO_SERVER 5 +#define PM_APPLIANCE_PC 6 + +/*********************************************/ +/* ACPI Boot Arch Flags, See spec Table 5-10 */ +/*********************************************/ +#define BAF_LEGACY_DEVICES 0x0001 +#define BAF_8042_KEYBOARD_CONTROLLER 0x0002 + +#define FADT2_REVISION_ID 3 + +#pragma pack(1) + +/*************************************/ +/* ACPI Specification Rev 2.0 for */ +/* the Root System Description Table */ +/*************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* Table header */ + UINT32 TableOffsetEntry [1]; /* Array of pointers to */ + /* other tables' headers */ +} RSDT_DESCRIPTOR_REV2; + + +/********************************************/ +/* ACPI Specification Rev 2.0 for the */ +/* Extended System Description Table (XSDT) */ +/********************************************/ +typedef struct +{ + ACPI_TABLE_HEADER Header; /* Table header */ + UINT64 TableOffsetEntry [1]; /* Array of pointers to */ + /* other tables' headers */ +} XSDT_DESCRIPTOR_REV2; + +/***************************************/ +/* ACPI Specification Rev 2.0 for */ +/* the Firmware ACPI Control Structure */ +/***************************************/ +typedef struct +{ + NATIVE_CHAR Signature[4]; /* signature "FACS" */ + UINT32 Length; /* length of structure, in bytes */ + UINT32 HardwareSignature; /* hardware configuration signature */ + UINT32 FirmwareWakingVector; /* 32bit physical address of the Firmware Waking Vector. */ + UINT32 GlobalLock; /* Global Lock used to synchronize access to shared hardware resources */ + UINT32_BIT S4Bios_f : 1; /* Indicates if S4BIOS support is present */ + UINT32_BIT Reserved1 : 31; /* must be 0 */ + UINT64 XFirmwareWakingVector; /* 64bit physical address of the Firmware Waking Vector. */ + UINT8 Version; /* Version of this table */ + UINT8 Reserved3 [31]; /* reserved - must be zero */ + +} FACS_DESCRIPTOR_REV2; + + +/***************************************/ +/* ACPI Specification Rev 2.0 for */ +/* the Generic Address Structure (GAS) */ +/***************************************/ +typedef struct +{ + UINT8 AddressSpaceId; /* Address space where struct or register exists. */ + UINT8 RegisterBitWidth; /* Size in bits of given register */ + UINT8 RegisterBitOffset; /* Bit offset within the register */ + UINT8 Reserved; /* Must be 0 */ + UINT64 Address; /* 64-bit address of struct or register */ + +} ACPI_GAS; + + +/************************************/ +/* ACPI Specification Rev 2.0 for */ +/* the Fixed ACPI Description Table */ +/************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* table header */ + UINT32 V1_FirmwareCtrl; /* 32-bit physical address of FACS */ + UINT32 V1_Dsdt; /* 32-bit physical address of DSDT */ + UINT8 Reserved1; /* System Interrupt Model isn't used in ACPI 2.0*/ + UINT8 Prefer_PM_Profile; /* Conveys preferred power management profile to OSPM. */ + UINT16 SciInt; /* System vector of SCI interrupt */ + UINT32 SmiCmd; /* 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 S4BiosReq; /* Value to write to SMI CMD to enter S4BIOS state */ + UINT8 PstateCnt; /* processor performance state control*/ + UINT32 V1_Pm1aEvtBlk; /* Port address of Power Mgt 1a AcpiEvent Reg Blk */ + UINT32 V1_Pm1bEvtBlk; /* Port address of Power Mgt 1b AcpiEvent Reg Blk */ + UINT32 V1_Pm1aCntBlk; /* Port address of Power Mgt 1a Control Reg Blk */ + UINT32 V1_Pm1bCntBlk; /* Port address of Power Mgt 1b Control Reg Blk */ + UINT32 V1_Pm2CntBlk; /* Port address of Power Mgt 2 Control Reg Blk */ + UINT32 V1_PmTmrBlk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ + UINT32 V1_Gpe0Blk; /* Port addr of General Purpose AcpiEvent 0 Reg Blk */ + UINT32 V1_Gpe1Blk; /* Port addr of General Purpose AcpiEvent 1 Reg Blk */ + UINT8 Pm1EvtLen; /* Byte Length of ports at pm1X_evt_blk */ + UINT8 Pm1CntLen; /* Byte Length of ports at pm1X_cnt_blk */ + UINT8 Pm2CntLen; /* Byte Length of ports at pm2_cnt_blk */ + UINT8 PmTmLen; /* Byte Length of ports at pm_tm_blk */ + UINT8 Gpe0BlkLen; /* Byte Length of ports at gpe0_blk */ + UINT8 Gpe1BlkLen; /* Byte Length of ports at gpe1_blk */ + UINT8 Gpe1Base; /* offset in gpe model where gpe1 events start */ + UINT8 CstCnt; /* Support for the _CST object and C States change notification.*/ + UINT16 Plvl2Lat; /* worst case HW latency to enter/exit C2 state */ + UINT16 Plvl3Lat; /* worst case HW latency to enter/exit C3 state */ + UINT16 FlushSize; /* number of flush strides that need to be read */ + UINT16 FlushStride; /* Processor's memory cache line width, in bytes */ + UINT8 DutyOffset; /* Processor’s duty cycle index in processor's P_CNT reg*/ + UINT8 DutyWidth; /* Processor’s duty cycle value bit width in P_CNT register.*/ + UINT8 DayAlrm; /* index to day-of-month alarm in RTC CMOS RAM */ + UINT8 MonAlrm; /* index to month-of-year alarm in RTC CMOS RAM */ + UINT8 Century; /* index to century in RTC CMOS RAM */ + UINT16 IapcBootArch; /* IA-PC Boot Architecture Flags. See Table 5-10 for description*/ + UINT8 Reserved2; /* reserved */ + UINT32_BIT WbInvd : 1; /* wbinvd instruction works properly */ + UINT32_BIT WbInvdFlush : 1; /* wbinvd flushes but does not invalidate */ + UINT32_BIT ProcC1 : 1; /* all processors support C1 state */ + UINT32_BIT Plvl2Up : 1; /* C2 state works on MP system */ + UINT32_BIT PwrButton : 1; /* Power button is handled as a generic feature */ + UINT32_BIT SleepButton : 1; /* Sleep button is handled as a generic feature, or not present */ + UINT32_BIT FixedRTC : 1; /* RTC wakeup stat not in fixed register space */ + UINT32_BIT Rtcs4 : 1; /* RTC wakeup stat not possible from S4 */ + UINT32_BIT TmrValExt : 1; /* tmr_val is 32 bits */ + UINT32_BIT DockCap : 1; /* Supports Docking */ + UINT32_BIT ResetRegSup : 1; /* Indicates system supports system reset via the FADT RESET_REG*/ + UINT32_BIT SealedCase : 1; /* Indicates system has no internal expansion capabilities and case is sealed. */ + UINT32_BIT Headless : 1; /* Indicates system does not have local video capabilities or local input devices.*/ + UINT32_BIT CpuSwSleep : 1; /* Indicates to OSPM that a processor native instruction */ + /* must be executed after writing the SLP_TYPx register. */ + UINT32_BIT Reserved6 : 18; /* reserved - must be zero */ + + ACPI_GAS ResetRegister; /* Reset register address in GAS format */ + UINT8 ResetValue; /* Value to write to the ResetRegister port to reset the system. */ + UINT8 Reserved7[3]; /* These three bytes must be zero */ + UINT64 XFirmwareCtrl; /* 64-bit physical address of FACS */ + UINT64 XDsdt; /* 64-bit physical address of DSDT */ + ACPI_GAS XPm1aEvtBlk; /* Extended Power Mgt 1a AcpiEvent Reg Blk address */ + ACPI_GAS XPm1bEvtBlk; /* Extended Power Mgt 1b AcpiEvent Reg Blk address */ + ACPI_GAS XPm1aCntBlk; /* Extended Power Mgt 1a Control Reg Blk address */ + ACPI_GAS XPm1bCntBlk; /* Extended Power Mgt 1b Control Reg Blk address */ + ACPI_GAS XPm2CntBlk; /* Extended Power Mgt 2 Control Reg Blk address */ + ACPI_GAS XPmTmrBlk; /* Extended Power Mgt Timer Ctrl Reg Blk address */ + ACPI_GAS XGpe0Blk; /* Extended General Purpose AcpiEvent 0 Reg Blk address */ + ACPI_GAS XGpe1Blk; /* Extended General Purpose AcpiEvent 1 Reg Blk address */ + +} FADT_DESCRIPTOR_REV2; + + +#pragma pack() + +#endif /* __ACTBL2_H__ */ + diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h b/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h new file mode 100644 index 0000000000000..8d0a5967a10e1 --- /dev/null +++ b/sys/contrib/dev/acpica/Subsystem/Include/actbl71.h @@ -0,0 +1,235 @@ +/****************************************************************************** + * + * Name: actbl71.h - IA-64 Extensions to the ACPI Spec Rev. 0.71 + * This file includes tables specific to this + * specification revision. + * $Revision: 7 $ + * + *****************************************************************************/ + +/****************************************************************************** + * + * 1. Copyright Notice + * + * Some or all of this work - Copyright (c) 1999, Intel Corp. All rights + * reserved. + * + * 2. License + * + * 2.1. This is your license from Intel Corp. under its intellectual property + * rights. You may have additional license terms from the party that provided + * you this software, covering your right to use that party's intellectual + * property rights. + * + * 2.2. Intel grants, free of charge, to any person ("Licensee") obtaining a + * copy of the source code appearing in this file ("Covered Code") an + * irrevocable, perpetual, worldwide license under Intel's copyrights in the + * base code distributed originally by Intel ("Original Intel Code") to copy, + * make derivatives, distribute, use and display any portion of the Covered + * Code in any form, with the right to sublicense such rights; and + * + * 2.3. Intel grants Licensee a non-exclusive and non-transferable patent + * license (with the right to sublicense), under only those claims of Intel + * patents that are infringed by the Original Intel Code, to make, use, sell, + * offer to sell, and import the Covered Code and derivative works thereof + * solely to the minimum extent necessary to exercise the above copyright + * license, and in no event shall the patent license extend to any additions + * to or modifications of the Original Intel Code. No other license or right + * is granted directly or by implication, estoppel or otherwise; + * + * The above copyright and patent license is granted only if the following + * conditions are met: + * + * 3. Conditions + * + * 3.1. Redistribution of Source with Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification with rights to further distribute source must include + * the above Copyright Notice, the above License, this list of Conditions, + * and the following Disclaimer and Export Compliance provision. In addition, + * Licensee must cause all Covered Code to which Licensee contributes to + * contain a file documenting the changes Licensee made to create that Covered + * Code and the date of any change. Licensee must include in that file the + * documentation of any changes made by any predecessor Licensee. Licensee + * must include a prominent statement that the modification is derived, + * directly or indirectly, from Original Intel Code. + * + * 3.2. Redistribution of Source with no Rights to Further Distribute Source. + * Redistribution of source code of any substantial portion of the Covered + * Code or modification without rights to further distribute source must + * include the following Disclaimer and Export Compliance provision in the + * documentation and/or other materials provided with distribution. In + * addition, Licensee may not authorize further sublicense of source of any + * portion of the Covered Code, and must include terms to the effect that the + * license from Licensee to its licensee is limited to the intellectual + * property embodied in the software Licensee provides to its licensee, and + * not to intellectual property embodied in modifications its licensee may + * make. + * + * 3.3. Redistribution of Executable. Redistribution in executable form of any + * substantial portion of the Covered Code or modification must reproduce the + * above Copyright Notice, and the following Disclaimer and Export Compliance + * provision in the documentation and/or other materials provided with the + * distribution. + * + * 3.4. Intel retains all right, title, and interest in and to the Original + * Intel Code. + * + * 3.5. Neither the name Intel nor any other trademark owned or controlled by + * Intel shall be used in advertising or otherwise to promote the sale, use or + * other dealings in products derived from or relating to the Covered Code + * without prior written authorization from Intel. + * + * 4. Disclaimer and Export Compliance + * + * 4.1. INTEL MAKES NO WARRANTY OF ANY KIND REGARDING ANY SOFTWARE PROVIDED + * HERE. ANY SOFTWARE ORIGINATING FROM INTEL OR DERIVED FROM INTEL SOFTWARE + * IS PROVIDED "AS IS," AND INTEL WILL NOT PROVIDE ANY SUPPORT, ASSISTANCE, + * INSTALLATION, TRAINING OR OTHER SERVICES. INTEL WILL NOT PROVIDE ANY + * UPDATES, ENHANCEMENTS OR EXTENSIONS. INTEL SPECIFICALLY DISCLAIMS ANY + * IMPLIED WARRANTIES OF MERCHANTABILITY, NONINFRINGEMENT AND FITNESS FOR A + * PARTICULAR PURPOSE. + * + * 4.2. IN NO EVENT SHALL INTEL HAVE ANY LIABILITY TO LICENSEE, ITS LICENSEES + * OR ANY OTHER THIRD PARTY, FOR ANY LOST PROFITS, LOST DATA, LOSS OF USE OR + * COSTS OF PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES, OR FOR ANY INDIRECT, + * SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THIS AGREEMENT, UNDER ANY + * CAUSE OF ACTION OR THEORY OF LIABILITY, AND IRRESPECTIVE OF WHETHER INTEL + * HAS ADVANCE NOTICE OF THE POSSIBILITY OF SUCH DAMAGES. THESE LIMITATIONS + * SHALL APPLY NOTWITHSTANDING THE FAILURE OF THE ESSENTIAL PURPOSE OF ANY + * LIMITED REMEDY. + * + * 4.3. Licensee shall not export, either directly or indirectly, any of this + * software or system incorporating such software without first obtaining any + * required license or other approval from the U. S. Department of Commerce or + * any other agency or department of the United States Government. In the + * event Licensee exports any such software from the United States or + * re-exports any such software from a foreign destination, Licensee shall + * ensure that the distribution and export/re-export of the software is in + * compliance with all laws, regulations, orders, or other restrictions of the + * U.S. Export Administration Regulations. Licensee agrees that neither it nor + * any of its subsidiaries will export/re-export any technical data, process, + * software, or service, directly or indirectly, to any country for which the + * United States government or any agency thereof requires an export license, + * other governmental approval, or letter of assurance, without first obtaining + * such license, approval or letter. + * + *****************************************************************************/ + +#ifndef __ACTBL71_H__ +#define __ACTBL71_H__ + +/* 0.71 FADT AddressSpace data item bitmasks defines */ +/* If the associated bit is zero then it is in memory space else in io space */ +#define SMI_CMD_ADDRESS_SPACE 0x01 +#define PM1_BLK_ADDRESS_SPACE 0x02 +#define PM2_CNT_BLK_ADDRESS_SPACE 0x04 +#define PM_TMR_BLK_ADDRESS_SPACE 0x08 +#define GPE0_BLK_ADDRESS_SPACE 0x10 +#define GPE1_BLK_ADDRESS_SPACE 0x20 + +/* Only for clarity in declarations */ +typedef UINT64 IO_ADDRESS; + +#pragma pack(1) + +typedef struct /* Root System Descriptor Pointer */ +{ + NATIVE_CHAR Signature [8]; /* contains "RSD PTR " */ + UINT8 Checksum; /* to make sum of struct == 0 */ + NATIVE_CHAR OemId [6]; /* OEM identification */ + UINT8 Reserved; /* Must be 0 for 1.0, 2 for 2.0 */ + UINT64 RsdtPhysicalAddress; /* 64-bit physical address of RSDT */ +} RSDP_DESCRIPTOR_REV071; + + +/*****************************************/ +/* IA64 Extensions to ACPI Spec Rev 0.71 */ +/* for the Root System Description Table */ +/*****************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* Table header */ + UINT32 ReservedPad; /* IA64 alignment, must be 0 */ + UINT64 TableOffsetEntry [1]; /* Array of pointers to other */ + /* tables' headers */ +} RSDT_DESCRIPTOR_REV071; + + +/*******************************************/ +/* IA64 Extensions to ACPI Spec Rev 0.71 */ +/* for the Firmware ACPI Control Structure */ +/*******************************************/ +typedef struct +{ + NATIVE_CHAR Signature[4]; /* signature "FACS" */ + UINT32 Length; /* length of structure, in bytes */ + UINT32 HardwareSignature; /* hardware configuration signature */ + UINT32 Reserved4; /* must be 0 */ + UINT64 FirmwareWakingVector; /* ACPI OS waking vector */ + UINT64 GlobalLock; /* Global Lock */ + UINT32_BIT S4Bios_f : 1; /* Indicates if S4BIOS support is present */ + UINT32_BIT Reserved1 : 31; /* must be 0 */ + UINT8 Reserved3 [28]; /* reserved - must be zero */ + +} FACS_DESCRIPTOR_REV071; + + +/******************************************/ +/* IA64 Extensions to ACPI Spec Rev 0.71 */ +/* for the Fixed ACPI Description Table */ +/******************************************/ +typedef struct +{ + ACPI_TABLE_HEADER header; /* table header */ + UINT32 ReservedPad; /* IA64 alignment, must be 0 */ + UINT64 FirmwareCtrl; /* 64-bit Physical address of FACS */ + UINT64 Dsdt; /* 64-bit Physical address of DSDT */ + UINT8 Model; /* System Interrupt Model */ + UINT8 AddressSpace; /* Address Space Bitmask */ + UINT16 SciInt; /* System vector of SCI interrupt */ + UINT8 AcpiEnable; /* value to write to smi_cmd to enable ACPI */ + UINT8 AcpiDisable; /* value to write to smi_cmd to disable ACPI */ + UINT8 S4BiosReq; /* Value to write to SMI CMD to enter S4BIOS state */ + UINT8 Reserved2; /* reserved - must be zero */ + UINT64 SmiCmd; /* Port address of SMI command port */ + UINT64 Pm1aEvtBlk; /* Port address of Power Mgt 1a AcpiEvent Reg Blk */ + UINT64 Pm1bEvtBlk; /* Port address of Power Mgt 1b AcpiEvent Reg Blk */ + UINT64 Pm1aCntBlk; /* Port address of Power Mgt 1a Control Reg Blk */ + UINT64 Pm1bCntBlk; /* Port address of Power Mgt 1b Control Reg Blk */ + UINT64 Pm2CntBlk; /* Port address of Power Mgt 2 Control Reg Blk */ + UINT64 PmTmrBlk; /* Port address of Power Mgt Timer Ctrl Reg Blk */ + UINT64 Gpe0Blk; /* Port addr of General Purpose AcpiEvent 0 Reg Blk */ + UINT64 Gpe1Blk; /* Port addr of General Purpose AcpiEvent 1 Reg Blk */ + UINT8 Pm1EvtLen; /* Byte Length of ports at pm1X_evt_blk */ + UINT8 Pm1CntLen; /* Byte Length of ports at pm1X_cnt_blk */ + UINT8 Pm2CntLen; /* Byte Length of ports at pm2_cnt_blk */ + UINT8 PmTmLen; /* Byte Length of ports at pm_tm_blk */ + UINT8 Gpe0BlkLen; /* Byte Length of ports at gpe0_blk */ + UINT8 Gpe1BlkLen; /* Byte Length of ports at gpe1_blk */ + UINT8 Gpe1Base; /* offset in gpe model where gpe1 events start */ + UINT8 Reserved3; /* reserved */ + UINT16 Plvl2Lat; /* worst case HW latency to enter/exit C2 state */ + UINT16 Plvl3Lat; /* worst case HW latency to enter/exit C3 state */ + UINT8 DayAlrm; /* index to day-of-month alarm in RTC CMOS RAM */ + UINT8 MonAlrm; /* index to month-of-year alarm in RTC CMOS RAM */ + UINT8 Century; /* index to century in RTC CMOS RAM */ + UINT8 Reserved4; /* reserved */ + UINT32_BIT FlushCash : 1; /* PAL_FLUSH_CACHE is correctly supported */ + UINT32_BIT Reserved5 : 1; /* reserved - must be zero */ + UINT32_BIT ProcC1 : 1; /* all processors support C1 state */ + UINT32_BIT Plvl2Up : 1; /* C2 state works on MP system */ + UINT32_BIT PwrButton : 1; /* Power button is handled as a generic feature */ + UINT32_BIT SleepButton : 1; /* Sleep button is handled as a generic feature, or not present */ + UINT32_BIT FixedRTC : 1; /* RTC wakeup stat not in fixed register space */ + UINT32_BIT Rtcs4 : 1; /* RTC wakeup stat not possible from S4 */ + UINT32_BIT TmrValExt : 1; /* tmr_val is 32 bits */ + UINT32_BIT DockCap : 1; /* Supports Docking */ + UINT32_BIT Reserved6 : 22; /* reserved - must be zero */ + +} FADT_DESCRIPTOR_REV071; + +#pragma pack() + +#endif /* __ACTBL71_H__ */ + diff --git a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h index 446f01ff6e1fb..cd01bae4380bb 100644 --- a/sys/contrib/dev/acpica/Subsystem/Include/actypes.h +++ b/sys/contrib/dev/acpica/Subsystem/Include/actypes.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actypes.h - Common data types for the entire ACPI subsystem - * $Revision: 143 $ + * $Revision: 152 $ * *****************************************************************************/ @@ -158,7 +158,7 @@ typedef INT64 NATIVE_INT; typedef NATIVE_UINT ACPI_TBLPTR; typedef UINT64 ACPI_IO_ADDRESS; -typedef UINT64 ACPI_MEM_ADDRESS; +typedef UINT64 ACPI_PHYSICAL_ADDRESS; #define ALIGNED_ADDRESS_BOUNDARY 0x00000008 @@ -182,14 +182,16 @@ typedef INT16 NATIVE_INT; typedef UINT32 ACPI_TBLPTR; typedef UINT32 ACPI_IO_ADDRESS; -typedef UINT32 ACPI_MEM_ADDRESS; +typedef UINT32 ACPI_PHYSICAL_ADDRESS; #define ALIGNED_ADDRESS_BOUNDARY 0x00000002 #define _HW_ALIGNMENT_SUPPORT -/* (16-bit only) Force internal integers to be 32, not 64 bits */ - -#define ACPI_VERSION_1 +/* + * (16-bit only) internal integers must be 32-bits, so + * 64-bit integers cannot be supported + */ +#define ACPI_NO_INTEGER64_SUPPORT #else @@ -209,11 +211,10 @@ typedef INT32 NATIVE_INT; typedef NATIVE_UINT ACPI_TBLPTR; typedef UINT32 ACPI_IO_ADDRESS; -typedef UINT32 ACPI_MEM_ADDRESS; +typedef UINT64 ACPI_PHYSICAL_ADDRESS; #define ALIGNED_ADDRESS_BOUNDARY 0x00000004 #define _HW_ALIGNMENT_SUPPORT - #endif @@ -279,19 +280,14 @@ typedef char* ACPI_STRING; /* Null terminated ASCII typedef void* ACPI_HANDLE; /* Actually a ptr to an Node */ -/* TBD: TEMP ONLY! */ - -#define ACPI_VERSION_1 - /* * Acpi integer width. In ACPI version 1, integers are - * 32 bits. In ACPI version 2, integers are 64 bits. Period. + * 32 bits. In ACPI version 2, integers are 64 bits. * Note that this pertains to the ACPI integer type only, not * other integers used in the implementation of the ACPI CA * subsystem. */ - -#ifdef ACPI_VERSION_1 +#ifdef ACPI_NO_INTEGER64_SUPPORT /* 32-bit Integers */ @@ -306,6 +302,7 @@ typedef UINT32 ACPI_INTEGER; typedef UINT64 ACPI_INTEGER; #define ACPI_INTEGER_MAX ACPI_UINT64_MAX; #define ACPI_INTEGER_BIT_SIZE 64 + #endif @@ -345,17 +342,13 @@ typedef UINT64 ACPI_INTEGER; typedef UINT32 ACPI_TABLE_TYPE; #define ACPI_TABLE_RSDP (ACPI_TABLE_TYPE) 0 -#define ACPI_TABLE_APIC (ACPI_TABLE_TYPE) 1 -#define ACPI_TABLE_DSDT (ACPI_TABLE_TYPE) 2 -#define ACPI_TABLE_FACP (ACPI_TABLE_TYPE) 3 -#define ACPI_TABLE_FACS (ACPI_TABLE_TYPE) 4 -#define ACPI_TABLE_PSDT (ACPI_TABLE_TYPE) 5 -#define ACPI_TABLE_RSDT (ACPI_TABLE_TYPE) 6 -#define ACPI_TABLE_SSDT (ACPI_TABLE_TYPE) 7 -#define ACPI_TABLE_SBST (ACPI_TABLE_TYPE) 8 -#define ACPI_TABLE_SPIC (ACPI_TABLE_TYPE) 9 -#define ACPI_TABLE_BOOT (ACPI_TABLE_TYPE) 10 -#define ACPI_TABLE_MAX 10 +#define ACPI_TABLE_DSDT (ACPI_TABLE_TYPE) 1 +#define ACPI_TABLE_FADT (ACPI_TABLE_TYPE) 2 +#define ACPI_TABLE_FACS (ACPI_TABLE_TYPE) 3 +#define ACPI_TABLE_PSDT (ACPI_TABLE_TYPE) 4 +#define ACPI_TABLE_SSDT (ACPI_TABLE_TYPE) 5 +#define ACPI_TABLE_XSDT (ACPI_TABLE_TYPE) 6 +#define ACPI_TABLE_MAX 6 #define NUM_ACPI_TABLES (ACPI_TABLE_MAX+1) @@ -408,26 +401,28 @@ typedef UINT8 OBJECT_TYPE_INTERNAL; #define INTERNAL_TYPE_ALIAS 21 /* 0x15 */ #define INTERNAL_TYPE_NOTIFY 22 /* 0x16 */ #define INTERNAL_TYPE_ADDRESS_HANDLER 23 /* 0x17 */ +#define INTERNAL_TYPE_RESOURCE 24 /* 0x18 */ + -#define INTERNAL_TYPE_NODE_MAX 23 +#define INTERNAL_TYPE_NODE_MAX 24 /* These are pseudo-types because there are never any namespace nodes with these types */ -#define INTERNAL_TYPE_DEF_FIELD_DEFN 24 /* 0x18 Name, ByteConst, multiple FieldElement */ -#define INTERNAL_TYPE_BANK_FIELD_DEFN 25 /* 0x19 2 Name,DWordConst,ByteConst,multi FieldElement */ -#define INTERNAL_TYPE_INDEX_FIELD_DEFN 26 /* 0x1A 2 Name, ByteConst, multiple FieldElement */ -#define INTERNAL_TYPE_IF 27 /* 0x1B OpCode, multiple Code */ -#define INTERNAL_TYPE_ELSE 28 /* 0x1C multiple Code */ -#define INTERNAL_TYPE_WHILE 29 /* 0x1D OpCode, multiple Code */ -#define INTERNAL_TYPE_SCOPE 30 /* 0x1E Name, multiple Node */ -#define INTERNAL_TYPE_DEF_ANY 31 /* 0x1F type is Any, suppress search of enclosing scopes */ -#define INTERNAL_TYPE_METHOD_ARGUMENT 32 /* 0x20 */ -#define INTERNAL_TYPE_METHOD_LOCAL_VAR 33 /* 0x21 */ -#define INTERNAL_TYPE_EXTRA 34 /* 0x22 */ - -#define INTERNAL_TYPE_MAX 34 - -#define INTERNAL_TYPE_INVALID 35 +#define INTERNAL_TYPE_DEF_FIELD_DEFN 25 /* 0x19 Name, ByteConst, multiple FieldElement */ +#define INTERNAL_TYPE_BANK_FIELD_DEFN 26 /* 0x1A 2 Name,DWordConst,ByteConst,multi FieldElement */ +#define INTERNAL_TYPE_INDEX_FIELD_DEFN 27 /* 0x1B 2 Name, ByteConst, multiple FieldElement */ +#define INTERNAL_TYPE_IF 28 /* 0x1C OpCode, multiple Code */ +#define INTERNAL_TYPE_ELSE 29 /* 0x1D multiple Code */ +#define INTERNAL_TYPE_WHILE 30 /* 0x1E OpCode, multiple Code */ +#define INTERNAL_TYPE_SCOPE 31 /* 0x1F Name, multiple Node */ +#define INTERNAL_TYPE_DEF_ANY 32 /* 0x20 type is Any, suppress search of enclosing scopes */ +#define INTERNAL_TYPE_METHOD_ARGUMENT 33 /* 0x21 */ +#define INTERNAL_TYPE_METHOD_LOCAL_VAR 34 /* 0x22 */ +#define INTERNAL_TYPE_EXTRA 35 /* 0x23 */ + +#define INTERNAL_TYPE_MAX 35 + +#define INTERNAL_TYPE_INVALID 36 #define ACPI_TYPE_NOT_FOUND 0xFF /* @@ -482,6 +477,7 @@ typedef UINT32 ACPI_EVENT_TYPE; */ typedef UINT32 ACPI_EVENT_STATUS; +#define ACPI_EVENT_FLAG_DISABLED (ACPI_EVENT_STATUS) 0x00 #define ACPI_EVENT_FLAG_ENABLED (ACPI_EVENT_STATUS) 0x01 #define ACPI_EVENT_FLAG_SET (ACPI_EVENT_STATUS) 0x02 @@ -696,7 +692,7 @@ void (*NOTIFY_HANDLER) ( typedef ACPI_STATUS (*ADDRESS_SPACE_HANDLER) ( UINT32 Function, - ACPI_INTEGER Address, + ACPI_PHYSICAL_ADDRESS Address, UINT32 BitWidth, UINT32 *Value, void *HandlerContext, @@ -772,7 +768,7 @@ typedef struct typedef struct { - UINT8 *MappedPhysicalAddress; + UINT64 MappedPhysicalAddress; UINT8 *MappedLogicalAddress; UINT32 MappedLength; } MEM_HANDLER_CONTEXT; |