mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ACPICA] Update to version 20201113. CORE-17382
This commit is contained in:
parent
07cc0b5a2b
commit
9cc1a26b70
8 changed files with 79 additions and 77 deletions
|
@ -56,8 +56,10 @@ extern UINT8 AcpiGbl_DefaultAddressSpaces[];
|
|||
/* Local prototypes */
|
||||
|
||||
static void
|
||||
AcpiEvOrphanEcRegMethod (
|
||||
ACPI_NAMESPACE_NODE *EcDeviceNode);
|
||||
AcpiEvExecuteOrphanRegMethod (
|
||||
ACPI_NAMESPACE_NODE *DeviceNode,
|
||||
ACPI_ADR_SPACE_TYPE SpaceId);
|
||||
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiEvRegRun (
|
||||
|
@ -761,11 +763,13 @@ AcpiEvExecuteRegMethods (
|
|||
(void) AcpiNsWalkNamespace (ACPI_TYPE_ANY, Node, ACPI_UINT32_MAX,
|
||||
ACPI_NS_WALK_UNLOCK, AcpiEvRegRun, NULL, &Info, NULL);
|
||||
|
||||
/* Special case for EC: handle "orphan" _REG methods with no region */
|
||||
|
||||
if (SpaceId == ACPI_ADR_SPACE_EC)
|
||||
/*
|
||||
* Special case for EC and GPIO: handle "orphan" _REG methods with
|
||||
* no region.
|
||||
*/
|
||||
if (SpaceId == ACPI_ADR_SPACE_EC || SpaceId == ACPI_ADR_SPACE_GPIO)
|
||||
{
|
||||
AcpiEvOrphanEcRegMethod (Node);
|
||||
AcpiEvExecuteOrphanRegMethod (Node, SpaceId);
|
||||
}
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES,
|
||||
|
@ -846,32 +850,29 @@ AcpiEvRegRun (
|
|||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiEvOrphanEcRegMethod
|
||||
* FUNCTION: AcpiEvExecuteOrphanRegMethod
|
||||
*
|
||||
* PARAMETERS: EcDeviceNode - Namespace node for an EC device
|
||||
* PARAMETERS: DeviceNode - Namespace node for an ACPI device
|
||||
* SpaceId - The address space ID
|
||||
*
|
||||
* RETURN: None
|
||||
*
|
||||
* DESCRIPTION: Execute an "orphan" _REG method that appears under the EC
|
||||
* DESCRIPTION: Execute an "orphan" _REG method that appears under an ACPI
|
||||
* device. This is a _REG method that has no corresponding region
|
||||
* within the EC device scope. The orphan _REG method appears to
|
||||
* have been enabled by the description of the ECDT in the ACPI
|
||||
* specification: "The availability of the region space can be
|
||||
* detected by providing a _REG method object underneath the
|
||||
* Embedded Controller device."
|
||||
*
|
||||
* To quickly access the EC device, we use the EcDeviceNode used
|
||||
* during EC handler installation. Otherwise, we would need to
|
||||
* perform a time consuming namespace walk, executing _HID
|
||||
* methods to find the EC device.
|
||||
* within the device's scope. ACPI tables depending on these
|
||||
* "orphan" _REG methods have been seen for both EC and GPIO
|
||||
* Operation Regions. Presumably the Windows ACPI implementation
|
||||
* always calls the _REG method independent of the presence of
|
||||
* an actual Operation Region with the correct address space ID.
|
||||
*
|
||||
* MUTEX: Assumes the namespace is locked
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static void
|
||||
AcpiEvOrphanEcRegMethod (
|
||||
ACPI_NAMESPACE_NODE *EcDeviceNode)
|
||||
AcpiEvExecuteOrphanRegMethod (
|
||||
ACPI_NAMESPACE_NODE *DeviceNode,
|
||||
ACPI_ADR_SPACE_TYPE SpaceId)
|
||||
{
|
||||
ACPI_HANDLE RegMethod;
|
||||
ACPI_NAMESPACE_NODE *NextNode;
|
||||
|
@ -880,10 +881,10 @@ AcpiEvOrphanEcRegMethod (
|
|||
ACPI_OBJECT Objects[2];
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (EvOrphanEcRegMethod);
|
||||
ACPI_FUNCTION_TRACE (EvExecuteOrphanRegMethod);
|
||||
|
||||
|
||||
if (!EcDeviceNode)
|
||||
if (!DeviceNode)
|
||||
{
|
||||
return_VOID;
|
||||
}
|
||||
|
@ -894,7 +895,7 @@ AcpiEvOrphanEcRegMethod (
|
|||
|
||||
/* Get a handle to a _REG method immediately under the EC device */
|
||||
|
||||
Status = AcpiGetHandle (EcDeviceNode, METHOD_NAME__REG, &RegMethod);
|
||||
Status = AcpiGetHandle (DeviceNode, METHOD_NAME__REG, &RegMethod);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
goto Exit; /* There is no _REG method present */
|
||||
|
@ -907,25 +908,25 @@ AcpiEvOrphanEcRegMethod (
|
|||
* with other space IDs to be present; but the code below will then
|
||||
* execute the _REG method with the EmbeddedControl SpaceID argument.
|
||||
*/
|
||||
NextNode = AcpiNsGetNextNode (EcDeviceNode, NULL);
|
||||
NextNode = AcpiNsGetNextNode (DeviceNode, NULL);
|
||||
while (NextNode)
|
||||
{
|
||||
if ((NextNode->Type == ACPI_TYPE_REGION) &&
|
||||
(NextNode->Object) &&
|
||||
(NextNode->Object->Region.SpaceId == ACPI_ADR_SPACE_EC))
|
||||
(NextNode->Object->Region.SpaceId == SpaceId))
|
||||
{
|
||||
goto Exit; /* Do not execute the _REG */
|
||||
}
|
||||
|
||||
NextNode = AcpiNsGetNextNode (EcDeviceNode, NextNode);
|
||||
NextNode = AcpiNsGetNextNode (DeviceNode, NextNode);
|
||||
}
|
||||
|
||||
/* Evaluate the _REG(EmbeddedControl,Connect) method */
|
||||
/* Evaluate the _REG(SpaceId,Connect) method */
|
||||
|
||||
Args.Count = 2;
|
||||
Args.Pointer = Objects;
|
||||
Objects[0].Type = ACPI_TYPE_INTEGER;
|
||||
Objects[0].Integer.Value = ACPI_ADR_SPACE_EC;
|
||||
Objects[0].Integer.Value = SpaceId;
|
||||
Objects[1].Type = ACPI_TYPE_INTEGER;
|
||||
Objects[1].Integer.Value = ACPI_REG_CONNECT;
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@
|
|||
/*
|
||||
* Common set of includes for all ACPICA source files.
|
||||
* We put them here because we don't want to duplicate them
|
||||
* in the the source code again and again.
|
||||
* in the source code again and again.
|
||||
*
|
||||
* Note: The order of these include files is important.
|
||||
*/
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20200925
|
||||
#define ACPI_CA_VERSION 0x20201113
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
|
|
@ -73,6 +73,7 @@
|
|||
|
||||
/* NVDIMM - NFIT table */
|
||||
|
||||
#define UUID_NFIT_DIMM "4309ac30-0d11-11e4-9191-0800200c9a66"
|
||||
#define UUID_VOLATILE_MEMORY "7305944f-fdda-44e3-b16c-3f22d252e5d0"
|
||||
#define UUID_PERSISTENT_MEMORY "66f0d379-b4f3-4074-ac43-0d3318b78cdb"
|
||||
#define UUID_CONTROL_REGION "92f701f6-13b4-405d-910b-299367e8234c"
|
||||
|
@ -81,6 +82,10 @@
|
|||
#define UUID_VOLATILE_VIRTUAL_CD "3d5abd30-4175-87ce-6d64-d2ade523c4bb"
|
||||
#define UUID_PERSISTENT_VIRTUAL_DISK "5cea02c9-4d07-69d3-269f-4496fbe096f9"
|
||||
#define UUID_PERSISTENT_VIRTUAL_CD "08018188-42cd-bb48-100f-5387d53ded3d"
|
||||
#define UUID_NFIT_DIMM_N_MSFT "1ee68b36-d4bd-4a1a-9a16-4f8e53d46e05"
|
||||
#define UUID_NFIT_DIMM_N_HPE1 "9002c334-acf3-4c0e-9642-a235f0d53bc6"
|
||||
#define UUID_NFIT_DIMM_N_HPE2 "5008664b-b758-41a0-a03c-27c2f2d04f7e"
|
||||
#define UUID_NFIT_DIMM_N_HYPERV "5746c5f2-a9a2-4264-ad0e-e4ddc9e09e80"
|
||||
|
||||
/* Processor Properties (ACPI 6.2) */
|
||||
|
||||
|
|
|
@ -115,13 +115,14 @@ AcpiNsCheckReturnValue (
|
|||
ACPI_STATUS Status;
|
||||
const ACPI_PREDEFINED_INFO *Predefined;
|
||||
|
||||
ACPI_FUNCTION_TRACE (NsCheckReturnValue);
|
||||
|
||||
/* If not a predefined name, we cannot validate the return object */
|
||||
|
||||
Predefined = Info->Predefined;
|
||||
if (!Predefined)
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -131,7 +132,7 @@ AcpiNsCheckReturnValue (
|
|||
if ((ReturnStatus != AE_OK) &&
|
||||
(ReturnStatus != AE_CTRL_RETURN_VALUE))
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -151,7 +152,7 @@ AcpiNsCheckReturnValue (
|
|||
(!Predefined->Info.ExpectedBtypes) ||
|
||||
(Predefined->Info.ExpectedBtypes == ACPI_RTYPE_ALL))
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -217,7 +218,7 @@ Exit:
|
|||
Node->Flags |= ANOBJ_EVALUATED;
|
||||
}
|
||||
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -106,7 +106,7 @@ AcpiNsCheckPackage (
|
|||
UINT32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME (NsCheckPackage);
|
||||
ACPI_FUNCTION_TRACE (NsCheckPackage);
|
||||
|
||||
|
||||
/* The package info for this name is in the next table entry */
|
||||
|
@ -137,13 +137,13 @@ AcpiNsCheckPackage (
|
|||
{
|
||||
if (Package->RetInfo.Type == ACPI_PTYPE1_VAR)
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname, Info->NodeFlags,
|
||||
"Return Package has no elements (empty)"));
|
||||
|
||||
return (AE_AML_OPERAND_VALUE);
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -197,7 +197,7 @@ AcpiNsCheckPackage (
|
|||
Package->RetInfo.ObjectType1, i);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Elements++;
|
||||
|
@ -230,7 +230,7 @@ AcpiNsCheckPackage (
|
|||
Package->RetInfo3.ObjectType[i], i);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -241,7 +241,7 @@ AcpiNsCheckPackage (
|
|||
Package->RetInfo3.TailObjectType, i);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -257,7 +257,7 @@ AcpiNsCheckPackage (
|
|||
Info, Elements, ACPI_RTYPE_INTEGER, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Elements++;
|
||||
|
@ -276,7 +276,7 @@ AcpiNsCheckPackage (
|
|||
Info, Elements, ACPI_RTYPE_INTEGER, 0);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -320,7 +320,7 @@ AcpiNsCheckPackage (
|
|||
Info, ReturnObject, ReturnObjectPtr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Update locals to point to the new package (of 1 element) */
|
||||
|
@ -358,7 +358,7 @@ AcpiNsCheckPackage (
|
|||
Package->RetInfo.ObjectType1, 0);
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Validate length of the UUID buffer */
|
||||
|
@ -367,14 +367,14 @@ AcpiNsCheckPackage (
|
|||
{
|
||||
ACPI_WARN_PREDEFINED ((AE_INFO, Info->FullPathname,
|
||||
Info->NodeFlags, "Invalid length for UUID Buffer"));
|
||||
return (AE_AML_OPERAND_VALUE);
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
}
|
||||
|
||||
Status = AcpiNsCheckObjectType(Info, Elements + 1,
|
||||
Package->RetInfo.ObjectType2, 0);
|
||||
if (ACPI_FAILURE(Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
Elements += 2;
|
||||
|
@ -390,10 +390,10 @@ AcpiNsCheckPackage (
|
|||
"Invalid internal return type in table entry: %X",
|
||||
Package->RetInfo.Type));
|
||||
|
||||
return (AE_AML_INTERNAL);
|
||||
return_ACPI_STATUS (AE_AML_INTERNAL);
|
||||
}
|
||||
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
|
||||
|
||||
PackageTooSmall:
|
||||
|
@ -404,7 +404,7 @@ PackageTooSmall:
|
|||
"Return Package is too small - found %u elements, expected %u",
|
||||
Count, ExpectedCount));
|
||||
|
||||
return (AE_AML_OPERAND_VALUE);
|
||||
return_ACPI_STATUS (AE_AML_OPERAND_VALUE);
|
||||
}
|
||||
|
||||
|
||||
|
@ -757,6 +757,8 @@ AcpiNsCheckPackageElements (
|
|||
UINT32 i;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (NsCheckPackageElements);
|
||||
|
||||
/*
|
||||
* Up to two groups of package elements are supported by the data
|
||||
* structure. All elements in each group must be of the same type.
|
||||
|
@ -768,7 +770,7 @@ AcpiNsCheckPackageElements (
|
|||
Type1, i + StartIndex);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ThisElement++;
|
||||
|
@ -780,11 +782,11 @@ AcpiNsCheckPackageElements (
|
|||
Type2, (i + Count1 + StartIndex));
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
ThisElement++;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
|
|
@ -213,16 +213,18 @@ AcpiNsComplexRepairs (
|
|||
ACPI_STATUS Status;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (NsComplexRepairs);
|
||||
|
||||
/* Check if this name is in the list of repairable names */
|
||||
|
||||
Predefined = AcpiNsMatchComplexRepair (Node);
|
||||
if (!Predefined)
|
||||
{
|
||||
return (ValidateStatus);
|
||||
return_ACPI_STATUS (ValidateStatus);
|
||||
}
|
||||
|
||||
Status = Predefined->RepairFunction (Info, ReturnObjectPtr);
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
|
@ -418,20 +420,21 @@ AcpiNsRepair_CID (
|
|||
UINT16 OriginalRefCount;
|
||||
UINT32 i;
|
||||
|
||||
ACPI_FUNCTION_TRACE (NsRepair_CID);
|
||||
|
||||
/* Check for _CID as a simple string */
|
||||
|
||||
if (ReturnObject->Common.Type == ACPI_TYPE_STRING)
|
||||
{
|
||||
Status = AcpiNsRepair_HID (Info, ReturnObjectPtr);
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
/* Exit if not a Package */
|
||||
|
||||
if (ReturnObject->Common.Type != ACPI_TYPE_PACKAGE)
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/* Examine each element of the _CID package */
|
||||
|
@ -445,7 +448,7 @@ AcpiNsRepair_CID (
|
|||
Status = AcpiNsRepair_HID (Info, ElementPtr);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (Status);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
if (OriginalElement != *ElementPtr)
|
||||
|
@ -459,7 +462,7 @@ AcpiNsRepair_CID (
|
|||
ElementPtr++;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -579,9 +582,8 @@ AcpiNsRepair_HID (
|
|||
ACPI_OPERAND_OBJECT **ReturnObjectPtr)
|
||||
{
|
||||
ACPI_OPERAND_OBJECT *ReturnObject = *ReturnObjectPtr;
|
||||
ACPI_OPERAND_OBJECT *NewString;
|
||||
char *Source;
|
||||
char *Dest;
|
||||
char *Source;
|
||||
|
||||
|
||||
ACPI_FUNCTION_NAME (NsRepair_HID);
|
||||
|
@ -591,7 +593,7 @@ AcpiNsRepair_HID (
|
|||
|
||||
if (ReturnObject->Common.Type != ACPI_TYPE_STRING)
|
||||
{
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
if (ReturnObject->String.Length == 0)
|
||||
|
@ -603,15 +605,7 @@ AcpiNsRepair_HID (
|
|||
/* Return AE_OK anyway, let driver handle it */
|
||||
|
||||
Info->ReturnFlags |= ACPI_OBJECT_REPAIRED;
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
/* It is simplest to always create a new string object */
|
||||
|
||||
NewString = AcpiUtCreateStringObject (ReturnObject->String.Length);
|
||||
if (!NewString)
|
||||
{
|
||||
return (AE_NO_MEMORY);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -624,7 +618,7 @@ AcpiNsRepair_HID (
|
|||
if (*Source == '*')
|
||||
{
|
||||
Source++;
|
||||
NewString->String.Length--;
|
||||
ReturnObject->String.Length--;
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_REPAIR,
|
||||
"%s: Removed invalid leading asterisk\n", Info->FullPathname));
|
||||
|
@ -638,14 +632,13 @@ AcpiNsRepair_HID (
|
|||
* "NNNN####" where N is an uppercase letter or decimal digit, and
|
||||
* # is a hex digit.
|
||||
*/
|
||||
for (Dest = NewString->String.Pointer; *Source; Dest++, Source++)
|
||||
for (Dest = ReturnObject->String.Pointer; *Source; Dest++, Source++)
|
||||
{
|
||||
*Dest = (char) toupper ((int) *Source);
|
||||
}
|
||||
ReturnObject->String.Pointer[ReturnObject->String.Length] = 0;
|
||||
|
||||
AcpiUtRemoveReference (ReturnObject);
|
||||
*ReturnObjectPtr = NewString;
|
||||
return (AE_OK);
|
||||
return_ACPI_STATUS (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -69,7 +69,7 @@ URL: https://gitlab.freedesktop.org/mesa/glu, ftp://ftp.freedesktop.org/pub/mesa
|
|||
|
||||
Title: ACPICA
|
||||
Path: drivers/bus/acpi/acpica
|
||||
Used Version: 20200925
|
||||
Used Version: 20201113
|
||||
License: GPL-2.0 (https://spdx.org/licenses/GPL-2.0.html)
|
||||
URL: https://acpica.org/
|
||||
|
||||
|
|
Loading…
Reference in a new issue