mirror of
https://github.com/reactos/reactos.git
synced 2024-12-28 01:55:19 +00:00
[ACPICA] Update to version 20200214. CORE-16696
This commit is contained in:
parent
81e6846e06
commit
696cdc635b
14 changed files with 156 additions and 21 deletions
|
@ -191,7 +191,7 @@ AcpiEvFixedEventInitialize (
|
|||
|
||||
/*
|
||||
* Initialize the structure that keeps track of fixed event handlers and
|
||||
* enable the fixed events.
|
||||
* disable all of the fixed events.
|
||||
*/
|
||||
for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
|
||||
{
|
||||
|
|
|
@ -957,6 +957,44 @@ AcpiEnableAllWakeupGpes (
|
|||
ACPI_EXPORT_SYMBOL (AcpiEnableAllWakeupGpes)
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiAnyGpeStatusSet
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Whether or not the status bit is set for any GPE
|
||||
*
|
||||
* DESCRIPTION: Check the status bits of all enabled GPEs and return TRUE if any
|
||||
* of them is set or FALSE otherwise.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT32
|
||||
AcpiAnyGpeStatusSet (
|
||||
void)
|
||||
{
|
||||
ACPI_STATUS Status;
|
||||
UINT8 Ret;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiAnyGpeStatusSet);
|
||||
|
||||
Status = AcpiUtAcquireMutex (ACPI_MTX_EVENTS);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
return (FALSE);
|
||||
}
|
||||
|
||||
Ret = AcpiHwCheckAllGpes ();
|
||||
(void) AcpiUtReleaseMutex (ACPI_MTX_EVENTS);
|
||||
|
||||
return (Ret);
|
||||
}
|
||||
|
||||
ACPI_EXPORT_SYMBOL(AcpiAnyGpeStatusSet)
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiInstallGpeBlock
|
||||
|
|
|
@ -527,6 +527,58 @@ AcpiHwEnableWakeupGpeBlock (
|
|||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwGetGpeBlockStatus
|
||||
*
|
||||
* PARAMETERS: GpeXruptInfo - GPE Interrupt info
|
||||
* GpeBlock - Gpe Block info
|
||||
*
|
||||
* RETURN: Success
|
||||
*
|
||||
* DESCRIPTION: Produce a combined GPE status bits mask for the given block.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
static ACPI_STATUS
|
||||
AcpiHwGetGpeBlockStatus(
|
||||
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
|
||||
ACPI_GPE_BLOCK_INFO *GpeBlock,
|
||||
void *RetPtr)
|
||||
{
|
||||
ACPI_GPE_REGISTER_INFO *GpeRegisterInfo;
|
||||
UINT64 InEnable;
|
||||
UINT64 InStatus;
|
||||
ACPI_STATUS Status;
|
||||
UINT8 *Ret = RetPtr;
|
||||
UINT32 i;
|
||||
|
||||
|
||||
/* Examine each GPE Register within the block */
|
||||
|
||||
for (i = 0; i < GpeBlock->RegisterCount; i++)
|
||||
{
|
||||
GpeRegisterInfo = &GpeBlock->RegisterInfo[i];
|
||||
|
||||
Status = AcpiHwRead (&InEnable, &GpeRegisterInfo->EnableAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
Status = AcpiHwRead (&InStatus, &GpeRegisterInfo->StatusAddress);
|
||||
if (ACPI_FAILURE (Status))
|
||||
{
|
||||
continue;
|
||||
}
|
||||
|
||||
*Ret |= InEnable & InStatus;
|
||||
}
|
||||
|
||||
return (AE_OK);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwDisableAllGpes
|
||||
|
@ -607,4 +659,31 @@ AcpiHwEnableAllWakeupGpes (
|
|||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
*
|
||||
* FUNCTION: AcpiHwCheckAllGpes
|
||||
*
|
||||
* PARAMETERS: None
|
||||
*
|
||||
* RETURN: Combined status of all GPEs
|
||||
*
|
||||
* DESCRIPTION: Check all enabled GPEs in all GPE blocks and return TRUE if the
|
||||
* status bit is set for at least one of them of FALSE otherwise.
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
UINT8
|
||||
AcpiHwCheckAllGpes (
|
||||
void)
|
||||
{
|
||||
UINT8 Ret = 0;
|
||||
|
||||
|
||||
ACPI_FUNCTION_TRACE (AcpiHwCheckAllGpes);
|
||||
|
||||
(void) AcpiEvWalkGpeList (AcpiHwGetGpeBlockStatus, &Ret);
|
||||
return (Ret != 0);
|
||||
}
|
||||
|
||||
#endif /* !ACPI_REDUCED_HARDWARE */
|
||||
|
|
|
@ -356,6 +356,16 @@ AcpiHwLegacyWake (
|
|||
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
|
||||
ACPI_CLEAR_STATUS);
|
||||
|
||||
/* Enable sleep button */
|
||||
|
||||
(void) AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].EnableRegisterId,
|
||||
ACPI_ENABLE_EVENT);
|
||||
|
||||
(void) AcpiWriteBitRegister (
|
||||
AcpiGbl_FixedEventInfo[ACPI_EVENT_SLEEP_BUTTON].StatusRegisterId,
|
||||
ACPI_CLEAR_STATUS);
|
||||
|
||||
AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
|
||||
return_ACPI_STATUS (Status);
|
||||
}
|
||||
|
|
|
@ -129,8 +129,7 @@ CgWriteAmlComment (
|
|||
void
|
||||
CvInitFileTree (
|
||||
ACPI_TABLE_HEADER *Table,
|
||||
UINT8 *AmlStart,
|
||||
UINT32 AmlLength);
|
||||
FILE *RootFile);
|
||||
|
||||
void
|
||||
CvClearOpComments (
|
||||
|
|
|
@ -207,6 +207,10 @@ ACPI_STATUS
|
|||
AcpiHwEnableAllWakeupGpes (
|
||||
void);
|
||||
|
||||
UINT8
|
||||
AcpiHwCheckAllGpes (
|
||||
void);
|
||||
|
||||
ACPI_STATUS
|
||||
AcpiHwEnableRuntimeGpeBlock (
|
||||
ACPI_GPE_XRUPT_INFO *GpeXruptInfo,
|
||||
|
|
|
@ -517,7 +517,7 @@
|
|||
#define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) CvPrintOneCommentType (a,b,c,d);
|
||||
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) CvPrintOneCommentList (a,b);
|
||||
#define ASL_CV_FILE_HAS_SWITCHED(a) CvFileHasSwitched(a)
|
||||
#define ASL_CV_INIT_FILETREE(a,b,c) CvInitFileTree(a,b,c);
|
||||
#define ASL_CV_INIT_FILETREE(a,b) CvInitFileTree(a,b);
|
||||
|
||||
#else
|
||||
|
||||
|
@ -532,7 +532,7 @@
|
|||
#define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d)
|
||||
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b)
|
||||
#define ASL_CV_FILE_HAS_SWITCHED(a) 0
|
||||
#define ASL_CV_INIT_FILETREE(a,b,c)
|
||||
#define ASL_CV_INIT_FILETREE(a,b)
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -46,7 +46,7 @@
|
|||
|
||||
/* Current ACPICA subsystem version in YYYYMMDD format */
|
||||
|
||||
#define ACPI_CA_VERSION 0x20200110
|
||||
#define ACPI_CA_VERSION 0x20200214
|
||||
|
||||
#include "acconfig.h"
|
||||
#include "actypes.h"
|
||||
|
@ -1001,6 +1001,10 @@ ACPI_STATUS
|
|||
AcpiEnableAllWakeupGpes (
|
||||
void))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_UINT32 (
|
||||
UINT32 AcpiAnyGpeStatusSet (
|
||||
void))
|
||||
|
||||
ACPI_HW_DEPENDENT_RETURN_STATUS (
|
||||
ACPI_STATUS
|
||||
AcpiGetGpeDevice (
|
||||
|
|
|
@ -1041,7 +1041,7 @@ enum AcpiErstInstructions
|
|||
|
||||
enum AcpiErstCommandStatus
|
||||
{
|
||||
ACPI_ERST_SUCESS = 0,
|
||||
ACPI_ERST_SUCCESS = 0,
|
||||
ACPI_ERST_NO_SPACE = 1,
|
||||
ACPI_ERST_NOT_AVAILABLE = 2,
|
||||
ACPI_ERST_FAILURE = 3,
|
||||
|
|
|
@ -575,11 +575,12 @@ typedef UINT64 ACPI_INTEGER;
|
|||
strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
|
||||
|
||||
/*
|
||||
* Algorithm to obtain access bit width.
|
||||
* Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of
|
||||
* Algorithm to obtain access bit or byte width.
|
||||
* Can be used with AccessSize field of ACPI_GENERIC_ADDRESS and
|
||||
* ACPI_RESOURCE_GENERIC_REGISTER.
|
||||
*/
|
||||
#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + 2))
|
||||
#define ACPI_ACCESS_BIT_WIDTH(AccessSize) (1 << ((AccessSize) + 2))
|
||||
#define ACPI_ACCESS_BYTE_WIDTH(AccessSize) (1 << ((AccessSize) - 1))
|
||||
|
||||
|
||||
/*******************************************************************************
|
||||
|
|
|
@ -228,7 +228,7 @@ AcpiNsHandleToPathname (
|
|||
/* Build the path in the caller buffer */
|
||||
|
||||
(void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer,
|
||||
RequiredSize, NoTrailing);
|
||||
(UINT32) RequiredSize, NoTrailing);
|
||||
|
||||
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n",
|
||||
(char *) Buffer->Pointer, (UINT32) RequiredSize));
|
||||
|
@ -401,7 +401,7 @@ AcpiNsGetNormalizedPathname (
|
|||
|
||||
/* Build the path in the allocated buffer */
|
||||
|
||||
(void) AcpiNsBuildNormalizedPath (Node, NameBuffer, Size, NoTrailing);
|
||||
(void) AcpiNsBuildNormalizedPath (Node, NameBuffer, (UINT32) Size, NoTrailing);
|
||||
|
||||
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%s: Path \"%s\"\n",
|
||||
ACPI_GET_FUNCTION_NAME, NameBuffer));
|
||||
|
@ -434,7 +434,7 @@ AcpiNsBuildPrefixedPathname (
|
|||
char *FullPath = NULL;
|
||||
char *ExternalPath = NULL;
|
||||
char *PrefixPath = NULL;
|
||||
SIZE_T PrefixPathLength = 0;
|
||||
ACPI_SIZE PrefixPathLength = 0;
|
||||
|
||||
|
||||
/* If there is a prefix, get the pathname to it */
|
||||
|
|
|
@ -606,7 +606,7 @@ AcpiInstallMethod (
|
|||
|
||||
MethodFlags = *ParserState.Aml++;
|
||||
AmlStart = ParserState.Aml;
|
||||
AmlLength = ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
|
||||
AmlLength = (UINT32) ACPI_PTR_DIFF (ParserState.PkgEnd, AmlStart);
|
||||
|
||||
/*
|
||||
* Allocate resources up-front. We don't want to have to delete a new
|
||||
|
|
|
@ -260,14 +260,14 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiReallocateRootTable)
|
|||
*
|
||||
* PARAMETERS: Signature - ACPI signature of needed table
|
||||
* Instance - Which instance (for SSDTs)
|
||||
* OutTableHeader - The pointer to the table header to fill
|
||||
* OutTableHeader - The pointer to the where the table header
|
||||
* is returned
|
||||
*
|
||||
* RETURN: Status and pointer to mapped table header
|
||||
* RETURN: Status and a copy of the table header
|
||||
*
|
||||
* DESCRIPTION: Finds an ACPI table header.
|
||||
*
|
||||
* NOTE: Caller is responsible in unmapping the header with
|
||||
* AcpiOsUnmapMemory
|
||||
* DESCRIPTION: Finds and returns an ACPI table header. Caller provides the
|
||||
* memory where a copy of the header is to be returned
|
||||
* (fixed length).
|
||||
*
|
||||
******************************************************************************/
|
||||
|
||||
|
|
|
@ -84,7 +84,7 @@ AcpiUtGetElementLength (
|
|||
*
|
||||
* NOTE: We always allocate the worst-case object descriptor because
|
||||
* these objects are cached, and we want them to be
|
||||
* one-size-satisifies-any-request. This in itself may not be
|
||||
* one-size-satisfies-any-request. This in itself may not be
|
||||
* the most memory efficient, but the efficiency of the object
|
||||
* cache should more than make up for this!
|
||||
*
|
||||
|
|
Loading…
Reference in a new issue