diff options
author | msmith <msmith@FreeBSD.org> | 2002-03-16 02:18:13 +0000 |
---|---|---|
committer | msmith <msmith@FreeBSD.org> | 2002-03-16 02:18:13 +0000 |
commit | cd4afd325750a7cf9cb020bfd2a399a530cb5f11 (patch) | |
tree | fdbc031e4c717324e48ba7f3a8f70e2afd8d5e25 /sys/contrib/dev | |
parent | ca6c4362b883d262f446f990da7e0da17251abcd (diff) | |
parent | 918310234a7ff346da92f4f10b72dac878b415f2 (diff) | |
download | FreeBSD-src-cd4afd325750a7cf9cb020bfd2a399a530cb5f11.zip FreeBSD-src-cd4afd325750a7cf9cb020bfd2a399a530cb5f11.tar.gz |
This commit was generated by cvs2svn to compensate for changes in r92388,
which included commits to RCS files with non-trunk default branches.
Diffstat (limited to 'sys/contrib/dev')
-rw-r--r-- | sys/contrib/dev/acpica/acdebug.h | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acefi.h | 15 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acenv.h | 27 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acevents.h | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/actypes.h | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/acutils.h | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbexec.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dbinput.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/dswload.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evevent.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evmisc.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evrgnini.c | 15 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/evsci.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exprep.c | 14 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exregion.c | 27 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/exresnte.c | 4 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/nssearch.c | 6 | ||||
-rw-r--r-- | sys/contrib/dev/acpica/utdebug.c | 6 |
18 files changed, 112 insertions, 50 deletions
diff --git a/sys/contrib/dev/acpica/acdebug.h b/sys/contrib/dev/acpica/acdebug.h index a129869..127bfee 100644 --- a/sys/contrib/dev/acpica/acdebug.h +++ b/sys/contrib/dev/acpica/acdebug.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acdebug.h - ACPI/AML debugger - * $Revision: 56 $ + * $Revision: 57 $ * *****************************************************************************/ @@ -389,7 +389,7 @@ AcpiDbCommandDispatch ( ACPI_WALK_STATE *WalkState, ACPI_PARSE_OBJECT *Op); -void +void ACPI_SYSTEM_XFACE AcpiDbExecuteThread ( void *Context); diff --git a/sys/contrib/dev/acpica/acefi.h b/sys/contrib/dev/acpica/acefi.h index ea9402f..f37afe5 100644 --- a/sys/contrib/dev/acpica/acefi.h +++ b/sys/contrib/dev/acpica/acefi.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acefi.h - OS specific defines, etc. - * $Revision: 7 $ + * $Revision: 9 $ * *****************************************************************************/ @@ -128,6 +128,19 @@ #define COMPILER_DEPENDENT_UINT64 unsigned __int64 +/* + * Calling conventions: + * + * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) + * ACPI_EXTERNAL_XFACE - External ACPI interfaces + * ACPI_INTERNAL_XFACE - Internal ACPI interfaces + * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces + */ +#define ACPI_SYSTEM_XFACE +#define ACPI_EXTERNAL_XFACE +#define ACPI_INTERNAL_XFACE +#define ACPI_INTERNAL_VAR_XFACE + /* warn C4142: redefinition of type */ #pragma warning(disable:4142) diff --git a/sys/contrib/dev/acpica/acenv.h b/sys/contrib/dev/acpica/acenv.h index 57e79b9..44306ad 100644 --- a/sys/contrib/dev/acpica/acenv.h +++ b/sys/contrib/dev/acpica/acenv.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acenv.h - Generation environment specific items - * $Revision: 83 $ + * $Revision: 85 $ * *****************************************************************************/ @@ -202,6 +202,9 @@ #elif defined(_AED_EFI) #include "acefi.h" +#elif defined(MSDOS) +#include "acdos16.h" + #elif defined(WIN32) #include "acwin.h" @@ -355,8 +358,22 @@ typedef char *va_list; */ /* Unrecognized compiler, use defaults */ + #ifndef ACPI_ASM_MACROS +/* + * Calling conventions: + * + * ACPI_SYSTEM_XFACE - Interfaces to host OS (handlers, threads) + * ACPI_EXTERNAL_XFACE - External ACPI interfaces + * ACPI_INTERNAL_XFACE - Internal ACPI interfaces + * ACPI_INTERNAL_VAR_XFACE - Internal variable-parameter list interfaces + */ +#define ACPI_SYSTEM_XFACE +#define ACPI_EXTERNAL_XFACE +#define ACPI_INTERNAL_XFACE +#define ACPI_INTERNAL_VAR_XFACE + #define ACPI_ASM_MACROS #define causeinterrupt(level) #define BREAKPOINT3 @@ -382,12 +399,8 @@ typedef char *va_list; /****************************************************************************** * - * Compiler-specific + * Compiler-specific information is contained in the compiler-specific + * headers. * *****************************************************************************/ - -/* this has been moved to compiler-specific headers, which are included from the - platform header. */ - - #endif /* __ACENV_H__ */ diff --git a/sys/contrib/dev/acpica/acevents.h b/sys/contrib/dev/acpica/acevents.h index 134642b..21de799 100644 --- a/sys/contrib/dev/acpica/acevents.h +++ b/sys/contrib/dev/acpica/acevents.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acevents.h - Event subcomponent prototypes and defines - * $Revision: 74 $ + * $Revision: 75 $ * *****************************************************************************/ @@ -173,7 +173,7 @@ AcpiEvQueueNotifyRequest ( ACPI_NAMESPACE_NODE *Node, UINT32 NotifyValue); -void +void ACPI_SYSTEM_XFACE AcpiEvNotifyDispatch ( void *Context); diff --git a/sys/contrib/dev/acpica/actypes.h b/sys/contrib/dev/acpica/actypes.h index a8d88c3..1bb8603 100644 --- a/sys/contrib/dev/acpica/actypes.h +++ b/sys/contrib/dev/acpica/actypes.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: actypes.h - Common data types for the entire ACPI subsystem - * $Revision: 223 $ + * $Revision: 224 $ * *****************************************************************************/ @@ -868,6 +868,8 @@ typedef struct typedef struct { + UINT32 Length; + ACPI_PHYSICAL_ADDRESS Address; ACPI_PHYSICAL_ADDRESS MappedPhysicalAddress; UINT8 *MappedLogicalAddress; UINT32 MappedLength; diff --git a/sys/contrib/dev/acpica/acutils.h b/sys/contrib/dev/acpica/acutils.h index 651d180..8c2f5f0 100644 --- a/sys/contrib/dev/acpica/acutils.h +++ b/sys/contrib/dev/acpica/acutils.h @@ -1,7 +1,7 @@ /****************************************************************************** * * Name: acutils.h -- prototypes for the common (subsystem-wide) procedures - * $Revision: 129 $ + * $Revision: 130 $ * *****************************************************************************/ @@ -444,7 +444,7 @@ AcpiUtDumpBuffer ( UINT32 Display, UINT32 componentId); -void +void ACPI_INTERNAL_VAR_XFACE AcpiUtDebugPrint ( UINT32 RequestedDebugLevel, UINT32 LineNumber, @@ -452,7 +452,7 @@ AcpiUtDebugPrint ( char *Format, ...) ACPI_PRINTF_LIKE_FUNC; -void +void ACPI_INTERNAL_VAR_XFACE AcpiUtDebugPrintRaw ( UINT32 RequestedDebugLevel, UINT32 LineNumber, diff --git a/sys/contrib/dev/acpica/dbexec.c b/sys/contrib/dev/acpica/dbexec.c index d8505ab..28cb0b3 100644 --- a/sys/contrib/dev/acpica/dbexec.c +++ b/sys/contrib/dev/acpica/dbexec.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbexec - debugger control method execution - * $Revision: 38 $ + * $Revision: 39 $ * ******************************************************************************/ @@ -389,7 +389,7 @@ AcpiDbExecute ( * ******************************************************************************/ -void +void ACPI_SYSTEM_XFACE AcpiDbMethodThread ( void *Context) { diff --git a/sys/contrib/dev/acpica/dbinput.c b/sys/contrib/dev/acpica/dbinput.c index e5e938b..f669ddb 100644 --- a/sys/contrib/dev/acpica/dbinput.c +++ b/sys/contrib/dev/acpica/dbinput.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: dbinput - user front-end to the AML debugger - * $Revision: 80 $ + * $Revision: 81 $ * ******************************************************************************/ @@ -839,7 +839,7 @@ AcpiDbCommandDispatch ( * ******************************************************************************/ -void +void ACPI_SYSTEM_XFACE AcpiDbExecuteThread ( void *Context) { diff --git a/sys/contrib/dev/acpica/dswload.c b/sys/contrib/dev/acpica/dswload.c index 6479744..64bef0c 100644 --- a/sys/contrib/dev/acpica/dswload.c +++ b/sys/contrib/dev/acpica/dswload.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: dswload - Dispatcher namespace load callbacks - * $Revision: 60 $ + * $Revision: 61 $ * *****************************************************************************/ @@ -560,8 +560,8 @@ AcpiDsLoad2EndOp ( ACPI_FUNCTION_NAME ("DsLoad2EndOp"); Op = WalkState->Op; - ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Opcode [%4.4X] Op %p State %p\n", - Op->Opcode, Op, WalkState)); + ACPI_DEBUG_PRINT ((ACPI_DB_DISPATCH, "Opcode [%s] Op %p State %p\n", + WalkState->OpInfo->Name, Op, WalkState)); /* Only interested in opcodes that have namespace objects */ diff --git a/sys/contrib/dev/acpica/evevent.c b/sys/contrib/dev/acpica/evevent.c index b11adce..8b86893 100644 --- a/sys/contrib/dev/acpica/evevent.c +++ b/sys/contrib/dev/acpica/evevent.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evevent - Fixed and General Purpose Even handling and dispatch - * $Revision: 69 $ + * $Revision: 71 $ * *****************************************************************************/ @@ -543,7 +543,7 @@ AcpiEvGpeInitialize (void) GpeNumber = GpeRegisterInfo->BaseGpeNumber + j; AcpiGbl_GpeNumberToIndex[GpeNumber].NumberIndex = (UINT8) GpeNumberIndex; - AcpiGbl_GpeNumberInfo[GpeNumberIndex].BitMask = AcpiGbl_DecodeTo8bit[i]; + AcpiGbl_GpeNumberInfo[GpeNumberIndex].BitMask = AcpiGbl_DecodeTo8bit[j]; GpeNumberIndex++; } @@ -823,7 +823,7 @@ AcpiEvGpeDetect (void) * ******************************************************************************/ -static void +static void ACPI_SYSTEM_XFACE AcpiEvAsynchExecuteGpeMethod ( void *Context) { diff --git a/sys/contrib/dev/acpica/evmisc.c b/sys/contrib/dev/acpica/evmisc.c index 05aac5e..cb80387 100644 --- a/sys/contrib/dev/acpica/evmisc.c +++ b/sys/contrib/dev/acpica/evmisc.c @@ -2,7 +2,7 @@ * * Module Name: evmisc - ACPI device notification handler dispatch * and ACPI Global Lock support - * $Revision: 46 $ + * $Revision: 47 $ * *****************************************************************************/ @@ -324,7 +324,7 @@ AcpiEvQueueNotifyRequest ( * ******************************************************************************/ -void +void ACPI_SYSTEM_XFACE AcpiEvNotifyDispatch ( void *Context) { @@ -396,7 +396,7 @@ AcpiEvNotifyDispatch ( * ******************************************************************************/ -static void +static void ACPI_SYSTEM_XFACE AcpiEvGlobalLockThread ( void *Context) { diff --git a/sys/contrib/dev/acpica/evrgnini.c b/sys/contrib/dev/acpica/evrgnini.c index cf801a8..d5d0f48 100644 --- a/sys/contrib/dev/acpica/evrgnini.c +++ b/sys/contrib/dev/acpica/evrgnini.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: evrgnini- ACPI AddressSpace (OpRegion) init - * $Revision: 56 $ + * $Revision: 57 $ * *****************************************************************************/ @@ -149,6 +149,9 @@ AcpiEvSystemMemoryRegionSetup ( void *HandlerContext, void **RegionContext) { + ACPI_OPERAND_OBJECT *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle; + ACPI_MEM_SPACE_CONTEXT *LocalRegionContext; + ACPI_FUNCTION_TRACE ("EvSystemMemoryRegionSetup"); @@ -165,12 +168,18 @@ AcpiEvSystemMemoryRegionSetup ( /* Activate. Create a new context */ - *RegionContext = ACPI_MEM_CALLOCATE (sizeof (ACPI_MEM_SPACE_CONTEXT)); - if (!(*RegionContext)) + LocalRegionContext = ACPI_MEM_CALLOCATE (sizeof (ACPI_MEM_SPACE_CONTEXT)); + if (!(LocalRegionContext)) { return_ACPI_STATUS (AE_NO_MEMORY); } + /* Save the region length and address for use in the handler */ + + LocalRegionContext->Length = RegionDesc->Region.Length; + LocalRegionContext->Address = RegionDesc->Region.Address; + + *RegionContext = LocalRegionContext; return_ACPI_STATUS (AE_OK); } diff --git a/sys/contrib/dev/acpica/evsci.c b/sys/contrib/dev/acpica/evsci.c index 76f0529..2cb887c 100644 --- a/sys/contrib/dev/acpica/evsci.c +++ b/sys/contrib/dev/acpica/evsci.c @@ -2,7 +2,7 @@ * * Module Name: evsci - System Control Interrupt configuration and * legacy to ACPI mode state transition functions - * $Revision: 82 $ + * $Revision: 83 $ * ******************************************************************************/ @@ -140,7 +140,7 @@ * ******************************************************************************/ -static UINT32 +static UINT32 ACPI_SYSTEM_XFACE AcpiEvSciHandler ( void *Context) { diff --git a/sys/contrib/dev/acpica/exprep.c b/sys/contrib/dev/acpica/exprep.c index 24d73c7..ed24884 100644 --- a/sys/contrib/dev/acpica/exprep.c +++ b/sys/contrib/dev/acpica/exprep.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exprep - ACPI AML (p-code) execution - field prep utilities - * $Revision: 113 $ + * $Revision: 114 $ * *****************************************************************************/ @@ -165,6 +165,17 @@ AcpiExDecodeFieldAccess ( case AML_FIELD_ACCESS_ANY: ByteAlignment = 1; + BitLength = 8; + +#if 0 + /* + * TBD: optimize + * + * Any attempt to optimize the access size to the size of the field + * must take into consideration the length of the region and take + * care that an access to the field will not attempt to access + * beyond the end of the region. + */ /* Use the length to set the access type */ @@ -190,6 +201,7 @@ AcpiExDecodeFieldAccess ( BitLength = 8; } +#endif break; case AML_FIELD_ACCESS_BYTE: diff --git a/sys/contrib/dev/acpica/exregion.c b/sys/contrib/dev/acpica/exregion.c index 4e8dedd..79b8b64 100644 --- a/sys/contrib/dev/acpica/exregion.c +++ b/sys/contrib/dev/acpica/exregion.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exregion - ACPI default OpRegion (address space) handlers - * $Revision: 71 $ + * $Revision: 72 $ * *****************************************************************************/ @@ -161,6 +161,8 @@ AcpiExSystemMemorySpaceHandler ( void *LogicalAddrPtr = NULL; ACPI_MEM_SPACE_CONTEXT *MemInfo = RegionContext; UINT32 Length; + UINT32 WindowSize; + UINT32 Remaining; ACPI_FUNCTION_TRACE ("ExSystemMemorySpaceHandler"); @@ -192,7 +194,6 @@ AcpiExSystemMemorySpaceHandler ( return_ACPI_STATUS (AE_AML_OPERAND_VALUE); } - /* * Does the request fit into the cached memory mapping? * Is 1) Address below the current mapping? OR @@ -214,24 +215,36 @@ AcpiExSystemMemorySpaceHandler ( MemInfo->MappedLength); } - MemInfo->MappedLength = 0; /* In case of failure below */ - + /* + * Don't attempt to map memory beyond the end of the region, and + * constrain the maximum mapping size to something reasonable. + */ + Remaining = (UINT32) ((MemInfo->Address + (ACPI_PHYSICAL_ADDRESS) MemInfo->Length) - Address); + if (Remaining > SYSMEM_REGION_WINDOW_SIZE) + { + WindowSize = SYSMEM_REGION_WINDOW_SIZE; + } + else + { + WindowSize = Remaining; + } + /* Create a new mapping starting at the address given */ - Status = AcpiOsMapMemory (Address, SYSMEM_REGION_WINDOW_SIZE, + Status = AcpiOsMapMemory (Address, WindowSize, (void **) &MemInfo->MappedLogicalAddress); if (ACPI_FAILURE (Status)) { + MemInfo->MappedLength = 0; return_ACPI_STATUS (Status); } /* Save the physical address and mapping size */ MemInfo->MappedPhysicalAddress = Address; - MemInfo->MappedLength = SYSMEM_REGION_WINDOW_SIZE; + MemInfo->MappedLength = WindowSize; } - /* * Generate a logical pointer corresponding to the address we want to * access diff --git a/sys/contrib/dev/acpica/exresnte.c b/sys/contrib/dev/acpica/exresnte.c index 3219f73..dfbc5be 100644 --- a/sys/contrib/dev/acpica/exresnte.c +++ b/sys/contrib/dev/acpica/exresnte.c @@ -2,7 +2,7 @@ /****************************************************************************** * * Module Name: exresnte - AML Interpreter object resolution - * $Revision: 49 $ + * $Revision: 50 $ * *****************************************************************************/ @@ -136,7 +136,7 @@ * FUNCTION: AcpiExResolveNodeToValue * * PARAMETERS: ObjectPtr - Pointer to a location that contains - * a pointer to a NS node, and will recieve a + * a pointer to a NS node, and will receive a * pointer to the resolved object. * WalkState - Current state. Valid only if executing AML * code. NULL if simply resolving an object diff --git a/sys/contrib/dev/acpica/nssearch.c b/sys/contrib/dev/acpica/nssearch.c index 3944ee5..fb01c78 100644 --- a/sys/contrib/dev/acpica/nssearch.c +++ b/sys/contrib/dev/acpica/nssearch.c @@ -1,7 +1,7 @@ /******************************************************************************* * * Module Name: nssearch - Namespace search - * $Revision: 82 $ + * $Revision: 83 $ * ******************************************************************************/ @@ -220,8 +220,8 @@ AcpiNsSearchNode ( } ACPI_DEBUG_PRINT ((ACPI_DB_NAMES, - "Name %4.4s (actual type %X) found at %p\n", - (char *) &TargetName, NextNode->Type, NextNode)); + "Name %4.4s Type [%s] found at %p\n", + (char *) &TargetName, AcpiUtGetTypeName (NextNode->Type), NextNode)); *ReturnNode = NextNode; return_ACPI_STATUS (AE_OK); diff --git a/sys/contrib/dev/acpica/utdebug.c b/sys/contrib/dev/acpica/utdebug.c index 16b32a9..bf2116d 100644 --- a/sys/contrib/dev/acpica/utdebug.c +++ b/sys/contrib/dev/acpica/utdebug.c @@ -1,7 +1,7 @@ /****************************************************************************** * * Module Name: utdebug - Debug print routines - * $Revision: 95 $ + * $Revision: 96 $ * *****************************************************************************/ @@ -206,7 +206,7 @@ AcpiUtTrackStackPtr ( * ****************************************************************************/ -void +void ACPI_INTERNAL_VAR_XFACE AcpiUtDebugPrint ( UINT32 RequestedDebugLevel, UINT32 LineNumber, @@ -283,7 +283,7 @@ AcpiUtDebugPrint ( * ****************************************************************************/ -void +void ACPI_INTERNAL_VAR_XFACE AcpiUtDebugPrintRaw ( UINT32 RequestedDebugLevel, UINT32 LineNumber, |