Update ACPICA to 20230628
Change-Id: I5cbe5fa52bcca13ef8308ae1d2a1b1c19afcfe7e Reviewed-on: https://review.haiku-os.org/c/haiku/+/7142 Reviewed-by: waddlesplash <[email protected]> Reviewed-by: Jérôme Duval <[email protected]> Tested-by: Commit checker robot <[email protected]>
This commit is contained in:
@@ -164,6 +164,7 @@ local utilities_src =
|
|||||||
utascii.c
|
utascii.c
|
||||||
utbuffer.c
|
utbuffer.c
|
||||||
utcache.c
|
utcache.c
|
||||||
|
utcksum.c
|
||||||
utcopy.c
|
utcopy.c
|
||||||
utdecode.c
|
utdecode.c
|
||||||
utdebug.c
|
utdebug.c
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -797,7 +797,7 @@ AcpiDsInitFieldObjects (
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef ACPI_EXEC_APP
|
#ifdef ACPI_EXEC_APP
|
||||||
Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
|
Flags |= ACPI_NS_OVERRIDE_IF_FOUND;
|
||||||
#endif
|
#endif
|
||||||
/*
|
/*
|
||||||
* Walk the list of entries in the FieldList
|
* Walk the list of entries in the FieldList
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -705,7 +705,7 @@ AcpiDsCallControlMethod (
|
|||||||
if (!Info)
|
if (!Info)
|
||||||
{
|
{
|
||||||
Status = AE_NO_MEMORY;
|
Status = AE_NO_MEMORY;
|
||||||
goto Cleanup;
|
goto PopWalkState;
|
||||||
}
|
}
|
||||||
|
|
||||||
Info->Parameters = &ThisWalkState->Operands[0];
|
Info->Parameters = &ThisWalkState->Operands[0];
|
||||||
@@ -717,7 +717,7 @@ AcpiDsCallControlMethod (
|
|||||||
ACPI_FREE (Info);
|
ACPI_FREE (Info);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
goto PopWalkState;
|
||||||
}
|
}
|
||||||
|
|
||||||
NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1;
|
NextWalkState->MethodNestingDepth = ThisWalkState->MethodNestingDepth + 1;
|
||||||
@@ -764,6 +764,12 @@ AcpiDsCallControlMethod (
|
|||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
|
|
||||||
|
|
||||||
|
PopWalkState:
|
||||||
|
|
||||||
|
/* On error, pop the walk state to be deleted from thread */
|
||||||
|
|
||||||
|
AcpiDsPopWalkState(Thread);
|
||||||
|
|
||||||
Cleanup:
|
Cleanup:
|
||||||
|
|
||||||
/* On error, we must terminate the method properly */
|
/* On error, we must terminate the method properly */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -707,6 +707,7 @@ AcpiDsEvalTableRegionOperands (
|
|||||||
|
|
||||||
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
|
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
|
||||||
ObjDesc->Region.Length = Table->Length;
|
ObjDesc->Region.Length = Table->Length;
|
||||||
|
ObjDesc->Region.Pointer = Table;
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "RgnObj %p Addr %8.8X%8.8X Len %X\n",
|
||||||
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
|
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -173,7 +173,7 @@ static ACPI_EXECUTE_OP AcpiGbl_OpTypeDispatch [] =
|
|||||||
AcpiExOpcode_0A_0T_1R,
|
AcpiExOpcode_0A_0T_1R,
|
||||||
AcpiExOpcode_1A_0T_0R,
|
AcpiExOpcode_1A_0T_0R,
|
||||||
AcpiExOpcode_1A_0T_1R,
|
AcpiExOpcode_1A_0T_1R,
|
||||||
AcpiExOpcode_1A_1T_0R,
|
NULL, /* Was: AcpiExOpcode_1A_0T_0R (Was for Load operator) */
|
||||||
AcpiExOpcode_1A_1T_1R,
|
AcpiExOpcode_1A_1T_1R,
|
||||||
AcpiExOpcode_2A_0T_0R,
|
AcpiExOpcode_2A_0T_0R,
|
||||||
AcpiExOpcode_2A_0T_1R,
|
AcpiExOpcode_2A_0T_1R,
|
||||||
@@ -569,9 +569,11 @@ AcpiDsExecEndOp (
|
|||||||
|
|
||||||
/*
|
/*
|
||||||
* All opcodes require operand resolution, with the only exceptions
|
* All opcodes require operand resolution, with the only exceptions
|
||||||
* being the ObjectType and SizeOf operators.
|
* being the ObjectType and SizeOf operators as well as opcodes that
|
||||||
|
* take no arguments.
|
||||||
*/
|
*/
|
||||||
if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE))
|
if (!(WalkState->OpInfo->Flags & AML_NO_OPERAND_RESOLVE) &&
|
||||||
|
(WalkState->OpInfo->Flags & AML_HAS_ARGS))
|
||||||
{
|
{
|
||||||
/* Resolve all operands */
|
/* Resolve all operands */
|
||||||
|
|
||||||
@@ -737,7 +739,7 @@ AcpiDsExecEndOp (
|
|||||||
if (ACPI_SUCCESS (Status))
|
if (ACPI_SUCCESS (Status))
|
||||||
{
|
{
|
||||||
Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
|
Status = AcpiExWriteDataToField (ObjDesc, Op->Common.Node->Object, NULL);
|
||||||
if ACPI_FAILURE (Status)
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
|
ACPI_EXCEPTION ((AE_INFO, Status, "While writing to buffer field"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -310,8 +310,8 @@ AcpiDsResultPush (
|
|||||||
if (!Object)
|
if (!Object)
|
||||||
{
|
{
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Null Object! Obj=%p State=%p Num=%u",
|
"Null Object! State=%p Num=%u",
|
||||||
Object, WalkState, WalkState->ResultCount));
|
WalkState, WalkState->ResultCount));
|
||||||
return (AE_BAD_PARAMETER);
|
return (AE_BAD_PARAMETER);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -785,9 +785,14 @@ AcpiDsInitAmlWalk (
|
|||||||
|
|
||||||
|
|
||||||
WalkState->ParserState.Aml =
|
WalkState->ParserState.Aml =
|
||||||
WalkState->ParserState.AmlStart = AmlStart;
|
WalkState->ParserState.AmlStart =
|
||||||
WalkState->ParserState.AmlEnd =
|
WalkState->ParserState.AmlEnd =
|
||||||
WalkState->ParserState.PkgEnd = AmlStart + AmlLength;
|
WalkState->ParserState.PkgEnd = AmlStart;
|
||||||
|
/* Avoid undefined behavior: applying zero offset to null pointer */
|
||||||
|
if (AmlLength != 0) {
|
||||||
|
WalkState->ParserState.AmlEnd += AmlLength;
|
||||||
|
WalkState->ParserState.PkgEnd += AmlLength;
|
||||||
|
}
|
||||||
|
|
||||||
/* The NextOp of the NextWalk will be the beginning of the method */
|
/* The NextOp of the NextWalk will be the beginning of the method */
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -563,7 +563,7 @@ AcpiEvInstallSpaceHandler (
|
|||||||
case ACPI_ADR_SPACE_DATA_TABLE:
|
case ACPI_ADR_SPACE_DATA_TABLE:
|
||||||
|
|
||||||
Handler = AcpiExDataTableSpaceHandler;
|
Handler = AcpiExDataTableSpaceHandler;
|
||||||
Setup = NULL;
|
Setup = AcpiEvDataTableRegionSetup;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
@@ -677,6 +677,13 @@ AcpiEvInstallSpaceHandler (
|
|||||||
|
|
||||||
/* Init handler obj */
|
/* Init handler obj */
|
||||||
|
|
||||||
|
Status = AcpiOsCreateMutex (&HandlerObj->AddressSpace.ContextMutex);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
AcpiUtRemoveReference (HandlerObj);
|
||||||
|
goto UnlockAndExit;
|
||||||
|
}
|
||||||
|
|
||||||
HandlerObj->AddressSpace.SpaceId = (UINT8) SpaceId;
|
HandlerObj->AddressSpace.SpaceId = (UINT8) SpaceId;
|
||||||
HandlerObj->AddressSpace.HandlerFlags = Flags;
|
HandlerObj->AddressSpace.HandlerFlags = Flags;
|
||||||
HandlerObj->AddressSpace.RegionList = NULL;
|
HandlerObj->AddressSpace.RegionList = NULL;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -270,6 +270,8 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
ACPI_OPERAND_OBJECT *RegionObj2;
|
ACPI_OPERAND_OBJECT *RegionObj2;
|
||||||
void *RegionContext = NULL;
|
void *RegionContext = NULL;
|
||||||
ACPI_CONNECTION_INFO *Context;
|
ACPI_CONNECTION_INFO *Context;
|
||||||
|
ACPI_MUTEX ContextMutex;
|
||||||
|
BOOLEAN ContextLocked;
|
||||||
ACPI_PHYSICAL_ADDRESS Address;
|
ACPI_PHYSICAL_ADDRESS Address;
|
||||||
|
|
||||||
|
|
||||||
@@ -296,6 +298,8 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
}
|
}
|
||||||
|
|
||||||
Context = HandlerDesc->AddressSpace.Context;
|
Context = HandlerDesc->AddressSpace.Context;
|
||||||
|
ContextMutex = HandlerDesc->AddressSpace.ContextMutex;
|
||||||
|
ContextLocked = FALSE;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* It may be the case that the region has never been initialized.
|
* It may be the case that the region has never been initialized.
|
||||||
@@ -316,6 +320,23 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
return_ACPI_STATUS (AE_NOT_EXIST);
|
return_ACPI_STATUS (AE_NOT_EXIST);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_COMM)
|
||||||
|
{
|
||||||
|
ACPI_PCC_INFO *Ctx = HandlerDesc->AddressSpace.Context;
|
||||||
|
|
||||||
|
Ctx->InternalBuffer = FieldObj->Field.InternalPccBuffer;
|
||||||
|
Ctx->Length = (UINT16) RegionObj->Region.Length;
|
||||||
|
Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)
|
||||||
|
{
|
||||||
|
ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context;
|
||||||
|
|
||||||
|
Ctx->Length = RegionObj->Region.Length;
|
||||||
|
Ctx->Offset = RegionObj->Region.Address;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* We must exit the interpreter because the region setup will
|
* We must exit the interpreter because the region setup will
|
||||||
* potentially execute control methods (for example, the _REG method
|
* potentially execute control methods (for example, the _REG method
|
||||||
@@ -362,43 +383,6 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
Handler = HandlerDesc->AddressSpace.Handler;
|
Handler = HandlerDesc->AddressSpace.Handler;
|
||||||
Address = (RegionObj->Region.Address + RegionOffset);
|
Address = (RegionObj->Region.Address + RegionOffset);
|
||||||
|
|
||||||
/*
|
|
||||||
* Special handling for GenericSerialBus and GeneralPurposeIo:
|
|
||||||
* There are three extra parameters that must be passed to the
|
|
||||||
* handler via the context:
|
|
||||||
* 1) Connection buffer, a resource template from Connection() op
|
|
||||||
* 2) Length of the above buffer
|
|
||||||
* 3) Actual access length from the AccessAs() op
|
|
||||||
*
|
|
||||||
* In addition, for GeneralPurposeIo, the Address and BitWidth fields
|
|
||||||
* are defined as follows:
|
|
||||||
* 1) Address is the pin number index of the field (bit offset from
|
|
||||||
* the previous Connection)
|
|
||||||
* 2) BitWidth is the actual bit length of the field (number of pins)
|
|
||||||
*/
|
|
||||||
if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS) &&
|
|
||||||
Context &&
|
|
||||||
FieldObj)
|
|
||||||
{
|
|
||||||
/* Get the Connection (ResourceTemplate) buffer */
|
|
||||||
|
|
||||||
Context->Connection = FieldObj->Field.ResourceBuffer;
|
|
||||||
Context->Length = FieldObj->Field.ResourceLength;
|
|
||||||
Context->AccessLength = FieldObj->Field.AccessLength;
|
|
||||||
}
|
|
||||||
if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO) &&
|
|
||||||
Context &&
|
|
||||||
FieldObj)
|
|
||||||
{
|
|
||||||
/* Get the Connection (ResourceTemplate) buffer */
|
|
||||||
|
|
||||||
Context->Connection = FieldObj->Field.ResourceBuffer;
|
|
||||||
Context->Length = FieldObj->Field.ResourceLength;
|
|
||||||
Context->AccessLength = FieldObj->Field.AccessLength;
|
|
||||||
Address = FieldObj->Field.PinNumberIndex;
|
|
||||||
BitWidth = FieldObj->Field.BitLength;
|
|
||||||
}
|
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
|
ACPI_DEBUG_PRINT ((ACPI_DB_OPREGION,
|
||||||
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
"Handler %p (@%p) Address %8.8X%8.8X [%s]\n",
|
||||||
&RegionObj->Region.Handler->AddressSpace, Handler,
|
&RegionObj->Region.Handler->AddressSpace, Handler,
|
||||||
@@ -416,11 +400,62 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
AcpiExExitInterpreter();
|
AcpiExExitInterpreter();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Special handling for GenericSerialBus and GeneralPurposeIo:
|
||||||
|
* There are three extra parameters that must be passed to the
|
||||||
|
* handler via the context:
|
||||||
|
* 1) Connection buffer, a resource template from Connection() op
|
||||||
|
* 2) Length of the above buffer
|
||||||
|
* 3) Actual access length from the AccessAs() op
|
||||||
|
*
|
||||||
|
* Since we pass these extra parameters via the context, which is
|
||||||
|
* shared between threads, we must lock the context to avoid these
|
||||||
|
* parameters being changed from another thread before the handler
|
||||||
|
* has completed running.
|
||||||
|
*
|
||||||
|
* In addition, for GeneralPurposeIo, the Address and BitWidth fields
|
||||||
|
* are defined as follows:
|
||||||
|
* 1) Address is the pin number index of the field (bit offset from
|
||||||
|
* the previous Connection)
|
||||||
|
* 2) BitWidth is the actual bit length of the field (number of pins)
|
||||||
|
*/
|
||||||
|
if ((RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
||||||
|
RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO) &&
|
||||||
|
Context &&
|
||||||
|
FieldObj)
|
||||||
|
{
|
||||||
|
|
||||||
|
Status = AcpiOsAcquireMutex (ContextMutex, ACPI_WAIT_FOREVER);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
goto ReEnterInterpreter;
|
||||||
|
}
|
||||||
|
|
||||||
|
ContextLocked = TRUE;
|
||||||
|
|
||||||
|
/* Get the Connection (ResourceTemplate) buffer */
|
||||||
|
|
||||||
|
Context->Connection = FieldObj->Field.ResourceBuffer;
|
||||||
|
Context->Length = FieldObj->Field.ResourceLength;
|
||||||
|
Context->AccessLength = FieldObj->Field.AccessLength;
|
||||||
|
|
||||||
|
if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GPIO)
|
||||||
|
{
|
||||||
|
Address = FieldObj->Field.PinNumberIndex;
|
||||||
|
BitWidth = FieldObj->Field.BitLength;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/* Call the handler */
|
/* Call the handler */
|
||||||
|
|
||||||
Status = Handler (Function, Address, BitWidth, Value, Context,
|
Status = Handler (Function, Address, BitWidth, Value, Context,
|
||||||
RegionObj2->Extra.RegionContext);
|
RegionObj2->Extra.RegionContext);
|
||||||
|
|
||||||
|
if (ContextLocked)
|
||||||
|
{
|
||||||
|
AcpiOsReleaseMutex (ContextMutex);
|
||||||
|
}
|
||||||
|
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
ACPI_EXCEPTION ((AE_INFO, Status, "Returned by Handler for [%s]",
|
ACPI_EXCEPTION ((AE_INFO, Status, "Returned by Handler for [%s]",
|
||||||
@@ -438,6 +473,7 @@ AcpiEvAddressSpaceDispatch (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ReEnterInterpreter:
|
||||||
if (!(HandlerDesc->AddressSpace.HandlerFlags &
|
if (!(HandlerDesc->AddressSpace.HandlerFlags &
|
||||||
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
|
ACPI_ADDR_HANDLER_DEFAULT_INSTALLED))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -599,6 +599,64 @@ AcpiEvCmosRegionSetup (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AcpiEvDataTableRegionSetup
|
||||||
|
*
|
||||||
|
* PARAMETERS: Handle - Region we are interested in
|
||||||
|
* Function - Start or stop
|
||||||
|
* HandlerContext - Address space handler context
|
||||||
|
* RegionContext - Region specific context
|
||||||
|
*
|
||||||
|
* RETURN: Status
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Setup a DataTableRegion
|
||||||
|
*
|
||||||
|
* MUTEX: Assumes namespace is not locked
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AcpiEvDataTableRegionSetup (
|
||||||
|
ACPI_HANDLE Handle,
|
||||||
|
UINT32 Function,
|
||||||
|
void *HandlerContext,
|
||||||
|
void **RegionContext)
|
||||||
|
{
|
||||||
|
ACPI_OPERAND_OBJECT *RegionDesc = (ACPI_OPERAND_OBJECT *) Handle;
|
||||||
|
ACPI_DATA_TABLE_MAPPING *LocalRegionContext;
|
||||||
|
|
||||||
|
|
||||||
|
ACPI_FUNCTION_TRACE (EvDataTableRegionSetup);
|
||||||
|
|
||||||
|
|
||||||
|
if (Function == ACPI_REGION_DEACTIVATE)
|
||||||
|
{
|
||||||
|
if (*RegionContext)
|
||||||
|
{
|
||||||
|
ACPI_FREE (*RegionContext);
|
||||||
|
*RegionContext = NULL;
|
||||||
|
}
|
||||||
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Create a new context */
|
||||||
|
|
||||||
|
LocalRegionContext = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_DATA_TABLE_MAPPING));
|
||||||
|
if (!(LocalRegionContext))
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Save the data table pointer for use in the handler */
|
||||||
|
|
||||||
|
LocalRegionContext->Pointer = RegionDesc->Region.Pointer;
|
||||||
|
|
||||||
|
*RegionContext = LocalRegionContext;
|
||||||
|
return_ACPI_STATUS (AE_OK);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: AcpiEvDefaultRegionSetup
|
* FUNCTION: AcpiEvDefaultRegionSetup
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -163,13 +163,14 @@
|
|||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: AcpiInstallAddressSpaceHandler
|
* FUNCTION: AcpiInstallAddressSpaceHandlerInternal
|
||||||
*
|
*
|
||||||
* PARAMETERS: Device - Handle for the device
|
* PARAMETERS: Device - Handle for the device
|
||||||
* SpaceId - The address space ID
|
* SpaceId - The address space ID
|
||||||
* Handler - Address of the handler
|
* Handler - Address of the handler
|
||||||
* Setup - Address of the setup function
|
* Setup - Address of the setup function
|
||||||
* Context - Value passed to the handler on each access
|
* Context - Value passed to the handler on each access
|
||||||
|
* Run_Reg - Run _REG methods for this address space?
|
||||||
*
|
*
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
@@ -180,16 +181,19 @@
|
|||||||
* are executed here, and these methods can only be safely executed after
|
* are executed here, and these methods can only be safely executed after
|
||||||
* the default handlers have been installed and the hardware has been
|
* the default handlers have been installed and the hardware has been
|
||||||
* initialized (via AcpiEnableSubsystem.)
|
* initialized (via AcpiEnableSubsystem.)
|
||||||
|
* To avoid this problem pass FALSE for Run_Reg and later on call
|
||||||
|
* AcpiExecuteRegMethods() to execute _REG.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
ACPI_STATUS
|
static ACPI_STATUS
|
||||||
AcpiInstallAddressSpaceHandler (
|
AcpiInstallAddressSpaceHandlerInternal (
|
||||||
ACPI_HANDLE Device,
|
ACPI_HANDLE Device,
|
||||||
ACPI_ADR_SPACE_TYPE SpaceId,
|
ACPI_ADR_SPACE_TYPE SpaceId,
|
||||||
ACPI_ADR_SPACE_HANDLER Handler,
|
ACPI_ADR_SPACE_HANDLER Handler,
|
||||||
ACPI_ADR_SPACE_SETUP Setup,
|
ACPI_ADR_SPACE_SETUP Setup,
|
||||||
void *Context)
|
void *Context,
|
||||||
|
BOOLEAN Run_Reg)
|
||||||
{
|
{
|
||||||
ACPI_NAMESPACE_NODE *Node;
|
ACPI_NAMESPACE_NODE *Node;
|
||||||
ACPI_STATUS Status;
|
ACPI_STATUS Status;
|
||||||
@@ -231,16 +235,42 @@ AcpiInstallAddressSpaceHandler (
|
|||||||
|
|
||||||
/* Run all _REG methods for this address space */
|
/* Run all _REG methods for this address space */
|
||||||
|
|
||||||
AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT);
|
if (Run_Reg)
|
||||||
|
{
|
||||||
|
AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT);
|
||||||
|
}
|
||||||
|
|
||||||
UnlockAndExit:
|
UnlockAndExit:
|
||||||
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
|
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AcpiInstallAddressSpaceHandler (
|
||||||
|
ACPI_HANDLE Device,
|
||||||
|
ACPI_ADR_SPACE_TYPE SpaceId,
|
||||||
|
ACPI_ADR_SPACE_HANDLER Handler,
|
||||||
|
ACPI_ADR_SPACE_SETUP Setup,
|
||||||
|
void *Context)
|
||||||
|
{
|
||||||
|
return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandler)
|
ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandler)
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AcpiInstallAddressSpaceHandlerNo_Reg (
|
||||||
|
ACPI_HANDLE Device,
|
||||||
|
ACPI_ADR_SPACE_TYPE SpaceId,
|
||||||
|
ACPI_ADR_SPACE_HANDLER Handler,
|
||||||
|
ACPI_ADR_SPACE_SETUP Setup,
|
||||||
|
void *Context)
|
||||||
|
{
|
||||||
|
return AcpiInstallAddressSpaceHandlerInternal (Device, SpaceId, Handler, Setup, Context, FALSE);
|
||||||
|
}
|
||||||
|
|
||||||
|
ACPI_EXPORT_SYMBOL (AcpiInstallAddressSpaceHandlerNo_Reg)
|
||||||
|
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -362,6 +392,7 @@ AcpiRemoveAddressSpaceHandler (
|
|||||||
|
|
||||||
/* Now we can delete the handler object */
|
/* Now we can delete the handler object */
|
||||||
|
|
||||||
|
AcpiOsReleaseMutex (HandlerObj->AddressSpace.ContextMutex);
|
||||||
AcpiUtRemoveReference (HandlerObj);
|
AcpiUtRemoveReference (HandlerObj);
|
||||||
goto UnlockAndExit;
|
goto UnlockAndExit;
|
||||||
}
|
}
|
||||||
@@ -386,3 +417,62 @@ UnlockAndExit:
|
|||||||
}
|
}
|
||||||
|
|
||||||
ACPI_EXPORT_SYMBOL (AcpiRemoveAddressSpaceHandler)
|
ACPI_EXPORT_SYMBOL (AcpiRemoveAddressSpaceHandler)
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
*
|
||||||
|
* FUNCTION: AcpiExecuteRegMethods
|
||||||
|
*
|
||||||
|
* PARAMETERS: Device - Handle for the device
|
||||||
|
* SpaceId - The address space ID
|
||||||
|
*
|
||||||
|
* RETURN: Status
|
||||||
|
*
|
||||||
|
* DESCRIPTION: Execute _REG for all OpRegions of a given SpaceId.
|
||||||
|
*
|
||||||
|
******************************************************************************/
|
||||||
|
|
||||||
|
ACPI_STATUS
|
||||||
|
AcpiExecuteRegMethods (
|
||||||
|
ACPI_HANDLE Device,
|
||||||
|
ACPI_ADR_SPACE_TYPE SpaceId)
|
||||||
|
{
|
||||||
|
ACPI_NAMESPACE_NODE *Node;
|
||||||
|
ACPI_STATUS Status;
|
||||||
|
|
||||||
|
|
||||||
|
ACPI_FUNCTION_TRACE (AcpiExecuteRegMethods);
|
||||||
|
|
||||||
|
|
||||||
|
/* Parameter validation */
|
||||||
|
|
||||||
|
if (!Device)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_BAD_PARAMETER);
|
||||||
|
}
|
||||||
|
|
||||||
|
Status = AcpiUtAcquireMutex (ACPI_MTX_NAMESPACE);
|
||||||
|
if (ACPI_FAILURE (Status))
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Convert and validate the device handle */
|
||||||
|
|
||||||
|
Node = AcpiNsValidateHandle (Device);
|
||||||
|
if (Node)
|
||||||
|
{
|
||||||
|
/* Run all _REG methods for this address space */
|
||||||
|
|
||||||
|
AcpiEvExecuteRegMethods (Node, SpaceId, ACPI_REG_CONNECT);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
Status = AE_BAD_PARAMETER;
|
||||||
|
}
|
||||||
|
|
||||||
|
(void) AcpiUtReleaseMutex (ACPI_MTX_NAMESPACE);
|
||||||
|
return_ACPI_STATUS (Status);
|
||||||
|
}
|
||||||
|
|
||||||
|
ACPI_EXPORT_SYMBOL (AcpiExecuteRegMethods)
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -244,6 +244,7 @@ AcpiExLoadTableOp (
|
|||||||
ACPI_NAMESPACE_NODE *ParentNode;
|
ACPI_NAMESPACE_NODE *ParentNode;
|
||||||
ACPI_NAMESPACE_NODE *StartNode;
|
ACPI_NAMESPACE_NODE *StartNode;
|
||||||
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
|
ACPI_NAMESPACE_NODE *ParameterNode = NULL;
|
||||||
|
ACPI_OPERAND_OBJECT *ReturnObj;
|
||||||
ACPI_OPERAND_OBJECT *DdbHandle;
|
ACPI_OPERAND_OBJECT *DdbHandle;
|
||||||
UINT32 TableIndex;
|
UINT32 TableIndex;
|
||||||
|
|
||||||
@@ -251,6 +252,16 @@ AcpiExLoadTableOp (
|
|||||||
ACPI_FUNCTION_TRACE (ExLoadTableOp);
|
ACPI_FUNCTION_TRACE (ExLoadTableOp);
|
||||||
|
|
||||||
|
|
||||||
|
/* Create the return object */
|
||||||
|
|
||||||
|
ReturnObj = AcpiUtCreateIntegerObject ((UINT64) 0);
|
||||||
|
if (!ReturnObj)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
|
*ReturnDesc = ReturnObj;
|
||||||
|
|
||||||
/* Find the ACPI table in the RSDT/XSDT */
|
/* Find the ACPI table in the RSDT/XSDT */
|
||||||
|
|
||||||
AcpiExExitInterpreter ();
|
AcpiExExitInterpreter ();
|
||||||
@@ -268,13 +279,6 @@ AcpiExLoadTableOp (
|
|||||||
|
|
||||||
/* Table not found, return an Integer=0 and AE_OK */
|
/* Table not found, return an Integer=0 and AE_OK */
|
||||||
|
|
||||||
DdbHandle = AcpiUtCreateIntegerObject ((UINT64) 0);
|
|
||||||
if (!DdbHandle)
|
|
||||||
{
|
|
||||||
return_ACPI_STATUS (AE_NO_MEMORY);
|
|
||||||
}
|
|
||||||
|
|
||||||
*ReturnDesc = DdbHandle;
|
|
||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -365,7 +369,13 @@ AcpiExLoadTableOp (
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*ReturnDesc = DdbHandle;
|
/* Remove the reference to DdbHandle created by AcpiExAddTable above */
|
||||||
|
|
||||||
|
AcpiUtRemoveReference (DdbHandle);
|
||||||
|
|
||||||
|
/* Return -1 (non-zero) indicates success */
|
||||||
|
|
||||||
|
ReturnObj->Integer.Value = 0xFFFFFFFFFFFFFFFF;
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -423,7 +433,7 @@ AcpiExRegionRead (
|
|||||||
*
|
*
|
||||||
* PARAMETERS: ObjDesc - Region or Buffer/Field where the table will be
|
* PARAMETERS: ObjDesc - Region or Buffer/Field where the table will be
|
||||||
* obtained
|
* obtained
|
||||||
* Target - Where a handle to the table will be stored
|
* Target - Where the status of the load will be stored
|
||||||
* WalkState - Current state
|
* WalkState - Current state
|
||||||
*
|
*
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
@@ -455,6 +465,18 @@ AcpiExLoadOp (
|
|||||||
ACPI_FUNCTION_TRACE (ExLoadOp);
|
ACPI_FUNCTION_TRACE (ExLoadOp);
|
||||||
|
|
||||||
|
|
||||||
|
if (Target->Common.DescriptorType == ACPI_DESC_TYPE_NAMED)
|
||||||
|
{
|
||||||
|
Target = AcpiNsGetAttachedObject (ACPI_CAST_PTR (ACPI_NAMESPACE_NODE, Target));
|
||||||
|
}
|
||||||
|
if (Target->Common.Type != ACPI_TYPE_INTEGER)
|
||||||
|
{
|
||||||
|
ACPI_ERROR ((AE_INFO, "Type not integer: %X", Target->Common.Type));
|
||||||
|
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
|
||||||
|
}
|
||||||
|
|
||||||
|
Target->Integer.Value = 0;
|
||||||
|
|
||||||
/* Source Object can be either an OpRegion or a Buffer/Field */
|
/* Source Object can be either an OpRegion or a Buffer/Field */
|
||||||
|
|
||||||
switch (ObjDesc->Common.Type)
|
switch (ObjDesc->Common.Type)
|
||||||
@@ -596,7 +618,7 @@ AcpiExLoadOp (
|
|||||||
ACPI_INFO (("Dynamic OEM Table Load:"));
|
ACPI_INFO (("Dynamic OEM Table Load:"));
|
||||||
AcpiExExitInterpreter ();
|
AcpiExExitInterpreter ();
|
||||||
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
|
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
|
||||||
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, &TableIndex);
|
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table, TRUE, &TableIndex);
|
||||||
AcpiExEnterInterpreter ();
|
AcpiExEnterInterpreter ();
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
@@ -616,8 +638,6 @@ AcpiExLoadOp (
|
|||||||
Status = AcpiExAddTable (TableIndex, &DdbHandle);
|
Status = AcpiExAddTable (TableIndex, &DdbHandle);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
/* On error, TablePtr was deallocated above */
|
|
||||||
|
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -627,22 +647,13 @@ AcpiExLoadOp (
|
|||||||
AcpiNsInitializeObjects ();
|
AcpiNsInitializeObjects ();
|
||||||
AcpiExEnterInterpreter ();
|
AcpiExEnterInterpreter ();
|
||||||
|
|
||||||
/* Store the DdbHandle into the Target operand */
|
/* Remove the reference to DdbHandle created by AcpiExAddTable above */
|
||||||
|
|
||||||
Status = AcpiExStore (DdbHandle, Target, WalkState);
|
|
||||||
if (ACPI_FAILURE (Status))
|
|
||||||
{
|
|
||||||
(void) AcpiExUnloadTable (DdbHandle);
|
|
||||||
|
|
||||||
/* TablePtr was deallocated above */
|
|
||||||
|
|
||||||
AcpiUtRemoveReference (DdbHandle);
|
|
||||||
return_ACPI_STATUS (Status);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Remove the reference by added by AcpiExStore above */
|
|
||||||
|
|
||||||
AcpiUtRemoveReference (DdbHandle);
|
AcpiUtRemoveReference (DdbHandle);
|
||||||
|
|
||||||
|
/* Return -1 (non-zero) indicates success */
|
||||||
|
|
||||||
|
Target->Integer.Value = 0xFFFFFFFFFFFFFFFF;
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -451,6 +451,7 @@ AcpiExCreateRegion (
|
|||||||
ObjDesc->Region.SpaceId = SpaceId;
|
ObjDesc->Region.SpaceId = SpaceId;
|
||||||
ObjDesc->Region.Address = 0;
|
ObjDesc->Region.Address = 0;
|
||||||
ObjDesc->Region.Length = 0;
|
ObjDesc->Region.Length = 0;
|
||||||
|
ObjDesc->Region.Pointer = NULL;
|
||||||
ObjDesc->Region.Node = Node;
|
ObjDesc->Region.Node = Node;
|
||||||
ObjDesc->Region.Handler = NULL;
|
ObjDesc->Region.Handler = NULL;
|
||||||
ObjDesc->Common.Flags &=
|
ObjDesc->Common.Flags &=
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -295,7 +295,9 @@ AcpiExReadDataFromField (
|
|||||||
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
||||||
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
||||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
||||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
|
||||||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
|
||||||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
|
||||||
{
|
{
|
||||||
/* SMBus, GSBus, IPMI serial */
|
/* SMBus, GSBus, IPMI serial */
|
||||||
|
|
||||||
@@ -467,7 +469,9 @@ AcpiExWriteDataToField (
|
|||||||
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
else if ((ObjDesc->Common.Type == ACPI_TYPE_LOCAL_REGION_FIELD) &&
|
||||||
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
|
||||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
|
||||||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI))
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
|
||||||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
|
||||||
|
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
|
||||||
{
|
{
|
||||||
/* SMBus, GSBus, IPMI serial */
|
/* SMBus, GSBus, IPMI serial */
|
||||||
|
|
||||||
@@ -490,9 +494,7 @@ AcpiExWriteDataToField (
|
|||||||
ObjDesc->Field.BaseByteOffset,
|
ObjDesc->Field.BaseByteOffset,
|
||||||
SourceDesc->Buffer.Pointer, DataLength);
|
SourceDesc->Buffer.Pointer, DataLength);
|
||||||
|
|
||||||
if ((ObjDesc->Field.RegionObj->Region.Address == PCC_MASTER_SUBSPACE &&
|
if (MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
|
||||||
MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset)) ||
|
|
||||||
GENERIC_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
|
|
||||||
{
|
{
|
||||||
/* Perform the write */
|
/* Perform the write */
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -262,7 +262,7 @@ AcpiExSetupRegion (
|
|||||||
#ifdef ACPI_UNDER_DEVELOPMENT
|
#ifdef ACPI_UNDER_DEVELOPMENT
|
||||||
/*
|
/*
|
||||||
* If the Field access is AnyAcc, we can now compute the optimal
|
* If the Field access is AnyAcc, we can now compute the optimal
|
||||||
* access (because we know know the length of the parent region)
|
* access (because we know the length of the parent region)
|
||||||
*/
|
*/
|
||||||
if (!(ObjDesc->Common.Flags & AOPOBJ_DATA_VALID))
|
if (!(ObjDesc->Common.Flags & AOPOBJ_DATA_VALID))
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -323,6 +323,7 @@ AcpiExOpcode_1A_0T_0R (
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef _OBSOLETE_CODE /* Was originally used for Load() operator */
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
* FUNCTION: AcpiExOpcode_1A_1T_0R
|
* FUNCTION: AcpiExOpcode_1A_1T_0R
|
||||||
@@ -352,10 +353,12 @@ AcpiExOpcode_1A_1T_0R (
|
|||||||
|
|
||||||
switch (WalkState->Opcode)
|
switch (WalkState->Opcode)
|
||||||
{
|
{
|
||||||
|
#ifdef _OBSOLETE_CODE
|
||||||
case AML_LOAD_OP:
|
case AML_LOAD_OP:
|
||||||
|
|
||||||
Status = AcpiExLoadOp (Operand[0], Operand[1], WalkState);
|
Status = AcpiExLoadOp (Operand[0], Operand[1], WalkState);
|
||||||
break;
|
break;
|
||||||
|
#endif
|
||||||
|
|
||||||
default: /* Unknown opcode */
|
default: /* Unknown opcode */
|
||||||
|
|
||||||
@@ -370,7 +373,7 @@ Cleanup:
|
|||||||
|
|
||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*******************************************************************************
|
/*******************************************************************************
|
||||||
*
|
*
|
||||||
@@ -382,6 +385,8 @@ Cleanup:
|
|||||||
*
|
*
|
||||||
* DESCRIPTION: Execute opcode with one argument, one target, and a
|
* DESCRIPTION: Execute opcode with one argument, one target, and a
|
||||||
* return value.
|
* return value.
|
||||||
|
* January 2022: Added Load operator, with new ACPI 6.4
|
||||||
|
* semantics.
|
||||||
*
|
*
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
|
|
||||||
@@ -411,6 +416,7 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
case AML_FIND_SET_LEFT_BIT_OP:
|
case AML_FIND_SET_LEFT_BIT_OP:
|
||||||
case AML_FIND_SET_RIGHT_BIT_OP:
|
case AML_FIND_SET_RIGHT_BIT_OP:
|
||||||
case AML_FROM_BCD_OP:
|
case AML_FROM_BCD_OP:
|
||||||
|
case AML_LOAD_OP:
|
||||||
case AML_TO_BCD_OP:
|
case AML_TO_BCD_OP:
|
||||||
case AML_CONDITIONAL_REF_OF_OP:
|
case AML_CONDITIONAL_REF_OF_OP:
|
||||||
|
|
||||||
@@ -512,6 +518,18 @@ AcpiExOpcode_1A_1T_1R (
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case AML_LOAD_OP: /* Result1 = Load (Operand[0], Result1) */
|
||||||
|
|
||||||
|
ReturnDesc->Integer.Value = 0;
|
||||||
|
Status = AcpiExLoadOp (Operand[0], ReturnDesc, WalkState);
|
||||||
|
if (ACPI_SUCCESS (Status))
|
||||||
|
{
|
||||||
|
/* Return -1 (non-zero) indicates success */
|
||||||
|
|
||||||
|
ReturnDesc->Integer.Value = 0xFFFFFFFFFFFFFFFF;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
|
case AML_TO_BCD_OP: /* ToBcd (Operand, Result) */
|
||||||
|
|
||||||
ReturnDesc->Integer.Value = 0;
|
ReturnDesc->Integer.Value = 0;
|
||||||
@@ -1193,7 +1211,7 @@ AcpiExOpcode_1A_0T_1R (
|
|||||||
WalkState, ReturnDesc, &TempDesc);
|
WalkState, ReturnDesc, &TempDesc);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
{
|
{
|
||||||
goto Cleanup;
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnDesc = TempDesc;
|
ReturnDesc = TempDesc;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -692,9 +692,17 @@ AcpiExDataTableSpaceHandler (
|
|||||||
void *HandlerContext,
|
void *HandlerContext,
|
||||||
void *RegionContext)
|
void *RegionContext)
|
||||||
{
|
{
|
||||||
|
ACPI_DATA_TABLE_MAPPING *Mapping;
|
||||||
|
char *Pointer;
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE (ExDataTableSpaceHandler);
|
ACPI_FUNCTION_TRACE (ExDataTableSpaceHandler);
|
||||||
|
|
||||||
|
|
||||||
|
Mapping = (ACPI_DATA_TABLE_MAPPING *) RegionContext;
|
||||||
|
Pointer = ACPI_CAST_PTR (char, Mapping->Pointer) +
|
||||||
|
(Address - ACPI_PTR_TO_PHYSADDR (Mapping->Pointer));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Perform the memory read or write. The BitWidth was already
|
* Perform the memory read or write. The BitWidth was already
|
||||||
* validated.
|
* validated.
|
||||||
@@ -703,14 +711,12 @@ AcpiExDataTableSpaceHandler (
|
|||||||
{
|
{
|
||||||
case ACPI_READ:
|
case ACPI_READ:
|
||||||
|
|
||||||
memcpy (ACPI_CAST_PTR (char, Value), ACPI_PHYSADDR_TO_PTR (Address),
|
memcpy (ACPI_CAST_PTR (char, Value), Pointer, ACPI_DIV_8 (BitWidth));
|
||||||
ACPI_DIV_8 (BitWidth));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case ACPI_WRITE:
|
case ACPI_WRITE:
|
||||||
|
|
||||||
memcpy (ACPI_PHYSADDR_TO_PTR (Address), ACPI_CAST_PTR (char, Value),
|
memcpy (Pointer, ACPI_CAST_PTR (char, Value), ACPI_DIV_8 (BitWidth));
|
||||||
ACPI_DIV_8 (BitWidth));
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -353,6 +353,12 @@ AcpiExReadSerialBus (
|
|||||||
Function = ACPI_READ | (AccessorType << 16);
|
Function = ACPI_READ | (AccessorType << 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ACPI_ADR_SPACE_PLATFORM_RT:
|
||||||
|
|
||||||
|
BufferLength = ACPI_PRM_INPUT_BUFFER_SIZE;
|
||||||
|
Function = ACPI_READ;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
|
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
|
||||||
}
|
}
|
||||||
@@ -472,6 +478,18 @@ AcpiExWriteSerialBus (
|
|||||||
Function = ACPI_WRITE | (AccessorType << 16);
|
Function = ACPI_WRITE | (AccessorType << 16);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
case ACPI_ADR_SPACE_PLATFORM_RT:
|
||||||
|
|
||||||
|
BufferLength = ACPI_PRM_INPUT_BUFFER_SIZE;
|
||||||
|
Function = ACPI_WRITE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ACPI_ADR_SPACE_FIXED_HARDWARE:
|
||||||
|
|
||||||
|
BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE;
|
||||||
|
Function = ACPI_WRITE;
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
|
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
|
||||||
}
|
}
|
||||||
@@ -487,8 +505,7 @@ AcpiExWriteSerialBus (
|
|||||||
/* Copy the input buffer data to the transfer buffer */
|
/* Copy the input buffer data to the transfer buffer */
|
||||||
|
|
||||||
Buffer = BufferDesc->Buffer.Pointer;
|
Buffer = BufferDesc->Buffer.Pointer;
|
||||||
DataLength = (BufferLength < SourceDesc->Buffer.Length ?
|
DataLength = ACPI_MIN (BufferLength, SourceDesc->Buffer.Length);
|
||||||
BufferLength : SourceDesc->Buffer.Length);
|
|
||||||
memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength);
|
memcpy (Buffer, SourceDesc->Buffer.Pointer, DataLength);
|
||||||
|
|
||||||
/* Lock entire transaction if requested */
|
/* Lock entire transaction if requested */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -265,7 +265,7 @@ AcpiExSystemWaitMutex (
|
|||||||
*
|
*
|
||||||
* FUNCTION: AcpiExSystemDoStall
|
* FUNCTION: AcpiExSystemDoStall
|
||||||
*
|
*
|
||||||
* PARAMETERS: HowLong - The amount of time to stall,
|
* PARAMETERS: HowLongUs - The amount of time to stall,
|
||||||
* in microseconds
|
* in microseconds
|
||||||
*
|
*
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
@@ -280,7 +280,7 @@ AcpiExSystemWaitMutex (
|
|||||||
|
|
||||||
ACPI_STATUS
|
ACPI_STATUS
|
||||||
AcpiExSystemDoStall (
|
AcpiExSystemDoStall (
|
||||||
UINT32 HowLong)
|
UINT32 HowLongUs)
|
||||||
{
|
{
|
||||||
ACPI_STATUS Status = AE_OK;
|
ACPI_STATUS Status = AE_OK;
|
||||||
|
|
||||||
@@ -288,21 +288,26 @@ AcpiExSystemDoStall (
|
|||||||
ACPI_FUNCTION_ENTRY ();
|
ACPI_FUNCTION_ENTRY ();
|
||||||
|
|
||||||
|
|
||||||
if (HowLong > 255) /* 255 microseconds */
|
if (HowLongUs > 255)
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
* Longer than 255 usec, this is an error
|
* Longer than 255 microseconds, this is an error
|
||||||
*
|
*
|
||||||
* (ACPI specifies 100 usec as max, but this gives some slack in
|
* (ACPI specifies 100 usec as max, but this gives some slack in
|
||||||
* order to support existing BIOSs)
|
* order to support existing BIOSs)
|
||||||
*/
|
*/
|
||||||
ACPI_ERROR ((AE_INFO,
|
ACPI_ERROR ((AE_INFO,
|
||||||
"Time parameter is too large (%u)", HowLong));
|
"Time parameter is too large (%u)", HowLongUs));
|
||||||
Status = AE_AML_OPERAND_VALUE;
|
Status = AE_AML_OPERAND_VALUE;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
AcpiOsStall (HowLong);
|
if (HowLongUs > 100)
|
||||||
|
{
|
||||||
|
ACPI_WARNING ((AE_INFO,
|
||||||
|
"Time parameter %u us > 100 us violating ACPI spec, please fix the firmware.", HowLongUs));
|
||||||
|
}
|
||||||
|
AcpiOsStall (HowLongUs);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (Status);
|
return (Status);
|
||||||
@@ -313,7 +318,7 @@ AcpiExSystemDoStall (
|
|||||||
*
|
*
|
||||||
* FUNCTION: AcpiExSystemDoSleep
|
* FUNCTION: AcpiExSystemDoSleep
|
||||||
*
|
*
|
||||||
* PARAMETERS: HowLong - The amount of time to sleep,
|
* PARAMETERS: HowLongMs - The amount of time to sleep,
|
||||||
* in milliseconds
|
* in milliseconds
|
||||||
*
|
*
|
||||||
* RETURN: None
|
* RETURN: None
|
||||||
@@ -324,7 +329,7 @@ AcpiExSystemDoStall (
|
|||||||
|
|
||||||
ACPI_STATUS
|
ACPI_STATUS
|
||||||
AcpiExSystemDoSleep (
|
AcpiExSystemDoSleep (
|
||||||
UINT64 HowLong)
|
UINT64 HowLongMs)
|
||||||
{
|
{
|
||||||
ACPI_FUNCTION_ENTRY ();
|
ACPI_FUNCTION_ENTRY ();
|
||||||
|
|
||||||
@@ -337,12 +342,12 @@ AcpiExSystemDoSleep (
|
|||||||
* For compatibility with other ACPI implementations and to prevent
|
* For compatibility with other ACPI implementations and to prevent
|
||||||
* accidental deep sleeps, limit the sleep time to something reasonable.
|
* accidental deep sleeps, limit the sleep time to something reasonable.
|
||||||
*/
|
*/
|
||||||
if (HowLong > ACPI_MAX_SLEEP)
|
if (HowLongMs > ACPI_MAX_SLEEP)
|
||||||
{
|
{
|
||||||
HowLong = ACPI_MAX_SLEEP;
|
HowLongMs = ACPI_MAX_SLEEP;
|
||||||
}
|
}
|
||||||
|
|
||||||
AcpiOsSleep (HowLong);
|
AcpiOsSleep (HowLongMs);
|
||||||
|
|
||||||
/* And now we must get the interpreter again */
|
/* And now we must get the interpreter again */
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -261,7 +261,10 @@ AcpiHwExtendedSleep (
|
|||||||
|
|
||||||
/* Flush caches, as per ACPI specification */
|
/* Flush caches, as per ACPI specification */
|
||||||
|
|
||||||
ACPI_FLUSH_CPU_CACHE ();
|
if (SleepState < ACPI_STATE_S4)
|
||||||
|
{
|
||||||
|
ACPI_FLUSH_CPU_CACHE ();
|
||||||
|
}
|
||||||
|
|
||||||
Status = AcpiOsEnterSleep (SleepState, SleepControl, 0);
|
Status = AcpiOsEnterSleep (SleepState, SleepControl, 0);
|
||||||
if (Status == AE_CTRL_TERMINATE)
|
if (Status == AE_CTRL_TERMINATE)
|
||||||
@@ -312,18 +315,15 @@ ACPI_STATUS
|
|||||||
AcpiHwExtendedWakePrep (
|
AcpiHwExtendedWakePrep (
|
||||||
UINT8 SleepState)
|
UINT8 SleepState)
|
||||||
{
|
{
|
||||||
ACPI_STATUS Status;
|
|
||||||
UINT8 SleepTypeValue;
|
UINT8 SleepTypeValue;
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
|
ACPI_FUNCTION_TRACE (HwExtendedWakePrep);
|
||||||
|
|
||||||
|
|
||||||
Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
|
if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
|
||||||
&AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
|
|
||||||
if (ACPI_SUCCESS (Status))
|
|
||||||
{
|
{
|
||||||
SleepTypeValue = ((AcpiGbl_SleepTypeA << ACPI_X_SLEEP_TYPE_POSITION) &
|
SleepTypeValue = ((AcpiGbl_SleepTypeAS0 << ACPI_X_SLEEP_TYPE_POSITION) &
|
||||||
ACPI_X_SLEEP_TYPE_MASK);
|
ACPI_X_SLEEP_TYPE_MASK);
|
||||||
|
|
||||||
(void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
|
(void) AcpiWrite ((UINT64) (SleepTypeValue | ACPI_X_SLEEP_ENABLE),
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -633,7 +633,7 @@ AcpiHwGetBitRegisterInfo (
|
|||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
* DESCRIPTION: Write the PM1 A/B control registers. These registers are
|
* DESCRIPTION: Write the PM1 A/B control registers. These registers are
|
||||||
* different than than the PM1 A/B status and enable registers
|
* different than the PM1 A/B status and enable registers
|
||||||
* in that different values can be written to the A/B registers.
|
* in that different values can be written to the A/B registers.
|
||||||
* Most notably, the SLP_TYP bits can be different, as per the
|
* Most notably, the SLP_TYP bits can be different, as per the
|
||||||
* values returned from the _Sx predefined methods.
|
* values returned from the _Sx predefined methods.
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -262,7 +262,10 @@ AcpiHwLegacySleep (
|
|||||||
|
|
||||||
/* Flush caches, as per ACPI specification */
|
/* Flush caches, as per ACPI specification */
|
||||||
|
|
||||||
ACPI_FLUSH_CPU_CACHE ();
|
if (SleepState < ACPI_STATE_S4)
|
||||||
|
{
|
||||||
|
ACPI_FLUSH_CPU_CACHE ();
|
||||||
|
}
|
||||||
|
|
||||||
Status = AcpiOsEnterSleep (SleepState, Pm1aControl, Pm1bControl);
|
Status = AcpiOsEnterSleep (SleepState, Pm1aControl, Pm1bControl);
|
||||||
if (Status == AE_CTRL_TERMINATE)
|
if (Status == AE_CTRL_TERMINATE)
|
||||||
@@ -339,7 +342,7 @@ ACPI_STATUS
|
|||||||
AcpiHwLegacyWakePrep (
|
AcpiHwLegacyWakePrep (
|
||||||
UINT8 SleepState)
|
UINT8 SleepState)
|
||||||
{
|
{
|
||||||
ACPI_STATUS Status;
|
ACPI_STATUS Status = AE_OK;
|
||||||
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
|
ACPI_BIT_REGISTER_INFO *SleepTypeRegInfo;
|
||||||
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
|
ACPI_BIT_REGISTER_INFO *SleepEnableRegInfo;
|
||||||
UINT32 Pm1aControl;
|
UINT32 Pm1aControl;
|
||||||
@@ -353,9 +356,7 @@ AcpiHwLegacyWakePrep (
|
|||||||
* This is unclear from the ACPI Spec, but it is required
|
* This is unclear from the ACPI Spec, but it is required
|
||||||
* by some machines.
|
* by some machines.
|
||||||
*/
|
*/
|
||||||
Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
|
if (AcpiGbl_SleepTypeAS0 != ACPI_SLEEP_TYPE_INVALID)
|
||||||
&AcpiGbl_SleepTypeA, &AcpiGbl_SleepTypeB);
|
|
||||||
if (ACPI_SUCCESS (Status))
|
|
||||||
{
|
{
|
||||||
SleepTypeRegInfo =
|
SleepTypeRegInfo =
|
||||||
AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
|
AcpiHwGetBitRegisterInfo (ACPI_BITREG_SLEEP_TYPE);
|
||||||
@@ -376,9 +377,9 @@ AcpiHwLegacyWakePrep (
|
|||||||
|
|
||||||
/* Insert the SLP_TYP bits */
|
/* Insert the SLP_TYP bits */
|
||||||
|
|
||||||
Pm1aControl |= (AcpiGbl_SleepTypeA <<
|
Pm1aControl |= (AcpiGbl_SleepTypeAS0 <<
|
||||||
SleepTypeRegInfo->BitPosition);
|
SleepTypeRegInfo->BitPosition);
|
||||||
Pm1bControl |= (AcpiGbl_SleepTypeB <<
|
Pm1bControl |= (AcpiGbl_SleepTypeBS0 <<
|
||||||
SleepTypeRegInfo->BitPosition);
|
SleepTypeRegInfo->BitPosition);
|
||||||
|
|
||||||
/* Write the control registers and ignore any errors */
|
/* Write the control registers and ignore any errors */
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -169,8 +169,8 @@ AcpiHwValidateIoRequest (
|
|||||||
*
|
*
|
||||||
* The table is used to implement the Microsoft port access rules that
|
* The table is used to implement the Microsoft port access rules that
|
||||||
* first appeared in Windows XP. Some ports are always illegal, and some
|
* first appeared in Windows XP. Some ports are always illegal, and some
|
||||||
* ports are only illegal if the BIOS calls _OSI with a WinXP string or
|
* ports are only illegal if the BIOS calls _OSI with nothing newer than
|
||||||
* later (meaning that the BIOS itelf is post-XP.)
|
* the specific _OSI strings.
|
||||||
*
|
*
|
||||||
* This provides ACPICA with the desired port protections and
|
* This provides ACPICA with the desired port protections and
|
||||||
* Microsoft compatibility.
|
* Microsoft compatibility.
|
||||||
@@ -301,8 +301,8 @@ AcpiHwValidateIoRequest (
|
|||||||
if ((Address <= PortInfo->End) && (LastAddress >= PortInfo->Start))
|
if ((Address <= PortInfo->End) && (LastAddress >= PortInfo->Start))
|
||||||
{
|
{
|
||||||
/* Port illegality may depend on the _OSI calls made by the BIOS */
|
/* Port illegality may depend on the _OSI calls made by the BIOS */
|
||||||
|
if (PortInfo->OsiDependency == ACPI_ALWAYS_ILLEGAL ||
|
||||||
if (AcpiGbl_OsiData >= PortInfo->OsiDependency)
|
AcpiGbl_OsiData == PortInfo->OsiDependency)
|
||||||
{
|
{
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_VALUES,
|
ACPI_DEBUG_PRINT ((ACPI_DB_VALUES,
|
||||||
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
|
"Denied AML access to port 0x%8.8X%8.8X/%X (%s 0x%.4X-0x%.4X)\n",
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -353,8 +353,6 @@ AcpiEnterSleepStateS4bios (
|
|||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_FLUSH_CPU_CACHE ();
|
|
||||||
|
|
||||||
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
|
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
|
||||||
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
|
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
|
||||||
if (ACPI_FAILURE (Status))
|
if (ACPI_FAILURE (Status))
|
||||||
@@ -471,6 +469,12 @@ AcpiEnterSleepStatePrep (
|
|||||||
return_ACPI_STATUS (Status);
|
return_ACPI_STATUS (Status);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Status = AcpiGetSleepTypeData (ACPI_STATE_S0,
|
||||||
|
&AcpiGbl_SleepTypeAS0, &AcpiGbl_SleepTypeBS0);
|
||||||
|
if (ACPI_FAILURE (Status)) {
|
||||||
|
AcpiGbl_SleepTypeAS0 = ACPI_SLEEP_TYPE_INVALID;
|
||||||
|
}
|
||||||
|
|
||||||
/* Execute the _PTS method (Prepare To Sleep) */
|
/* Execute the _PTS method (Prepare To Sleep) */
|
||||||
|
|
||||||
ArgList.Count = 1;
|
ArgList.Count = 1;
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -251,14 +251,13 @@ AcpiNsRootInitialize (
|
|||||||
* predefined names are at the root level. It is much easier to
|
* predefined names are at the root level. It is much easier to
|
||||||
* just create and link the new node(s) here.
|
* just create and link the new node(s) here.
|
||||||
*/
|
*/
|
||||||
NewNode = ACPI_ALLOCATE_ZEROED (sizeof (ACPI_NAMESPACE_NODE));
|
NewNode = AcpiNsCreateNode (*ACPI_CAST_PTR (UINT32, InitVal->Name));
|
||||||
if (!NewNode)
|
if (!NewNode)
|
||||||
{
|
{
|
||||||
Status = AE_NO_MEMORY;
|
Status = AE_NO_MEMORY;
|
||||||
goto UnlockAndExit;
|
goto UnlockAndExit;
|
||||||
}
|
}
|
||||||
|
|
||||||
ACPI_COPY_NAMESEG (NewNode->Name.Ascii, InitVal->Name);
|
|
||||||
NewNode->DescriptorType = ACPI_DESC_TYPE_NAMED;
|
NewNode->DescriptorType = ACPI_DESC_TYPE_NAMED;
|
||||||
NewNode->Type = InitVal->Type;
|
NewNode->Type = InitVal->Type;
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -328,9 +328,10 @@ AcpiNsSimpleRepair (
|
|||||||
*/
|
*/
|
||||||
if (!ReturnObject)
|
if (!ReturnObject)
|
||||||
{
|
{
|
||||||
if (ExpectedBtypes && (!(ExpectedBtypes & ACPI_RTYPE_NONE)))
|
if (ExpectedBtypes)
|
||||||
{
|
{
|
||||||
if (PackageIndex != ACPI_NOT_PACKAGE_ELEMENT)
|
if (!(ExpectedBtypes & ACPI_RTYPE_NONE) &&
|
||||||
|
PackageIndex != ACPI_NOT_PACKAGE_ELEMENT)
|
||||||
{
|
{
|
||||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
|
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
|
||||||
ACPI_WARN_ALWAYS, "Found unexpected NULL package element"));
|
ACPI_WARN_ALWAYS, "Found unexpected NULL package element"));
|
||||||
@@ -342,13 +343,14 @@ AcpiNsSimpleRepair (
|
|||||||
return (AE_OK); /* Repair was successful */
|
return (AE_OK); /* Repair was successful */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
|
||||||
|
if (ExpectedBtypes != ACPI_RTYPE_NONE)
|
||||||
{
|
{
|
||||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
|
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
|
||||||
ACPI_WARN_ALWAYS, "Missing expected return value"));
|
ACPI_WARN_ALWAYS,
|
||||||
|
"Missing expected return value"));
|
||||||
|
return (AE_AML_NO_RETURN_VALUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
return (AE_AML_NO_RETURN_VALUE);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -690,11 +690,12 @@ AcpiNsRepair_HID (
|
|||||||
ACPI_OPERAND_OBJECT **ReturnObjectPtr)
|
ACPI_OPERAND_OBJECT **ReturnObjectPtr)
|
||||||
{
|
{
|
||||||
ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr;
|
ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr;
|
||||||
char *Dest;
|
ACPI_OPERAND_OBJECT *NewString;
|
||||||
char *Source;
|
char *Source;
|
||||||
|
char *Dest;
|
||||||
|
|
||||||
|
|
||||||
ACPI_FUNCTION_NAME (NsRepair_HID);
|
ACPI_FUNCTION_TRACE (NsRepair_HID);
|
||||||
|
|
||||||
|
|
||||||
/* We only care about string _HID objects (not integers) */
|
/* We only care about string _HID objects (not integers) */
|
||||||
@@ -716,6 +717,14 @@ AcpiNsRepair_HID (
|
|||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* It is simplest to always create a new string object */
|
||||||
|
|
||||||
|
NewString = AcpiUtCreateStringObject (ReturnObject->String.Length);
|
||||||
|
if (!NewString)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_NO_MEMORY);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Remove a leading asterisk if present. For some unknown reason, there
|
* Remove a leading asterisk if present. For some unknown reason, there
|
||||||
* are many machines in the field that contains IDs like this.
|
* are many machines in the field that contains IDs like this.
|
||||||
@@ -726,7 +735,7 @@ AcpiNsRepair_HID (
|
|||||||
if (*Source == '*')
|
if (*Source == '*')
|
||||||
{
|
{
|
||||||
Source++;
|
Source++;
|
||||||
ReturnObject->String.Length--;
|
NewString->String.Length--;
|
||||||
|
|
||||||
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
|
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
|
||||||
"%s: Removed invalid leading asterisk\n", Info->FullPathname));
|
"%s: Removed invalid leading asterisk\n", Info->FullPathname));
|
||||||
@@ -740,12 +749,13 @@ AcpiNsRepair_HID (
|
|||||||
* "NNNN####" where N is an uppercase letter or decimal digit, and
|
* "NNNN####" where N is an uppercase letter or decimal digit, and
|
||||||
* # is a hex digit.
|
* # is a hex digit.
|
||||||
*/
|
*/
|
||||||
for (Dest = ReturnObject->String.Pointer; *Source; Dest++, Source++)
|
for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
|
||||||
{
|
{
|
||||||
*Dest = (char) toupper ((int) *Source);
|
*Dest = (char) toupper ((int) *Source);
|
||||||
}
|
}
|
||||||
ReturnObject->String.Pointer[ReturnObject->String.Length] = 0;
|
|
||||||
|
|
||||||
|
AcpiUtRemoveReference (ReturnObject);
|
||||||
|
*ReturnObjectPtr = NewString;
|
||||||
return_ACPI_STATUS (AE_OK);
|
return_ACPI_STATUS (AE_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -500,7 +500,7 @@ AcpiNsBuildInternalName (
|
|||||||
*
|
*
|
||||||
* PARAMETERS: *ExternalName - External representation of name
|
* PARAMETERS: *ExternalName - External representation of name
|
||||||
* **Converted Name - Where to return the resulting
|
* **Converted Name - Where to return the resulting
|
||||||
* internal represention of the name
|
* internal representation of the name
|
||||||
*
|
*
|
||||||
* RETURN: Status
|
* RETURN: Status
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -322,6 +322,10 @@ AcpiNsWalkNamespace (
|
|||||||
if (StartNode == ACPI_ROOT_OBJECT)
|
if (StartNode == ACPI_ROOT_OBJECT)
|
||||||
{
|
{
|
||||||
StartNode = AcpiGbl_RootNode;
|
StartNode = AcpiGbl_RootNode;
|
||||||
|
if (!StartNode)
|
||||||
|
{
|
||||||
|
return_ACPI_STATUS (AE_NO_NAMESPACE);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Null child means "get first node" */
|
/* Null child means "get first node" */
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -192,7 +192,7 @@ AcpiNsCopyDeviceId (
|
|||||||
ACPI_STATUS
|
ACPI_STATUS
|
||||||
AcpiGetHandle (
|
AcpiGetHandle (
|
||||||
ACPI_HANDLE Parent,
|
ACPI_HANDLE Parent,
|
||||||
ACPI_STRING Pathname,
|
const char *Pathname,
|
||||||
ACPI_HANDLE *RetHandle)
|
ACPI_HANDLE *RetHandle)
|
||||||
{
|
{
|
||||||
ACPI_STATUS Status;
|
ACPI_STATUS Status;
|
||||||
|
|||||||
@@ -9,7 +9,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
@@ -375,7 +375,7 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
|
|||||||
/* 47 */ ACPI_OP ("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_TYPE_EVENT, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
|
/* 47 */ ACPI_OP ("Event", ARGP_EVENT_OP, ARGI_EVENT_OP, ACPI_TYPE_EVENT, AML_CLASS_NAMED_OBJECT, AML_TYPE_NAMED_SIMPLE, AML_NSOBJECT | AML_NSOPCODE | AML_NSNODE | AML_NAMED ),
|
||||||
/* 48 */ ACPI_OP ("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R),
|
/* 48 */ ACPI_OP ("CondRefOf", ARGP_COND_REF_OF_OP, ARGI_COND_REF_OF_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R),
|
||||||
/* 49 */ ACPI_OP ("CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE),
|
/* 49 */ ACPI_OP ("CreateField", ARGP_CREATE_FIELD_OP, ARGI_CREATE_FIELD_OP, ACPI_TYPE_BUFFER_FIELD, AML_CLASS_CREATE, AML_TYPE_CREATE_FIELD, AML_HAS_ARGS | AML_NSOBJECT | AML_NSNODE | AML_DEFER | AML_FIELD | AML_CREATE),
|
||||||
/* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_0R, AML_FLAGS_EXEC_1A_1T_0R),
|
/* 4A */ ACPI_OP ("Load", ARGP_LOAD_OP, ARGI_LOAD_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_1T_1R, AML_FLAGS_EXEC_1A_1T_1R),
|
||||||
/* 4B */ ACPI_OP ("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
|
/* 4B */ ACPI_OP ("Stall", ARGP_STALL_OP, ARGI_STALL_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
|
||||||
/* 4C */ ACPI_OP ("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
|
/* 4C */ ACPI_OP ("Sleep", ARGP_SLEEP_OP, ARGI_SLEEP_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_1A_0T_0R, AML_FLAGS_EXEC_1A_0T_0R),
|
||||||
/* 4D */ ACPI_OP ("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R),
|
/* 4D */ ACPI_OP ("Acquire", ARGP_ACQUIRE_OP, ARGI_ACQUIRE_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_2A_0T_1R, AML_FLAGS_EXEC_2A_0T_1R),
|
||||||
@@ -436,7 +436,7 @@ const ACPI_OPCODE_INFO AcpiGbl_AmlOpInfo[AML_NUM_OPCODES] =
|
|||||||
|
|
||||||
/* ACPI 3.0 opcodes */
|
/* ACPI 3.0 opcodes */
|
||||||
|
|
||||||
/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R),
|
/* 7E */ ACPI_OP ("Timer", ARGP_TIMER_OP, ARGI_TIMER_OP, ACPI_TYPE_ANY, AML_CLASS_EXECUTE, AML_TYPE_EXEC_0A_0T_1R, AML_FLAGS_EXEC_0A_0T_1R | AML_NO_OPERAND_RESOLVE),
|
||||||
|
|
||||||
/* ACPI 5.0 opcodes */
|
/* ACPI 5.0 opcodes */
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
* 1. Copyright Notice
|
* 1. Copyright Notice
|
||||||
*
|
*
|
||||||
* Some or all of this work - Copyright (c) 1999 - 2021, Intel Corp.
|
* Some or all of this work - Copyright (c) 1999 - 2023, Intel Corp.
|
||||||
* All rights reserved.
|
* All rights reserved.
|
||||||
*
|
*
|
||||||
* 2. License
|
* 2. License
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user