[ACPICA] Update to version 20200214. CORE-16696

This commit is contained in:
Thomas Faber 2020-02-14 22:09:08 +01:00
parent 81e6846e06
commit 696cdc635b
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
14 changed files with 156 additions and 21 deletions

View file

@ -191,7 +191,7 @@ AcpiEvFixedEventInitialize (
/* /*
* Initialize the structure that keeps track of fixed event handlers and * 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++) for (i = 0; i < ACPI_NUM_FIXED_EVENTS; i++)
{ {

View file

@ -957,6 +957,44 @@ AcpiEnableAllWakeupGpes (
ACPI_EXPORT_SYMBOL (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 * FUNCTION: AcpiInstallGpeBlock

View file

@ -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 * FUNCTION: AcpiHwDisableAllGpes
@ -607,4 +659,31 @@ AcpiHwEnableAllWakeupGpes (
return_ACPI_STATUS (Status); 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 */ #endif /* !ACPI_REDUCED_HARDWARE */

View file

@ -356,6 +356,16 @@ AcpiHwLegacyWake (
AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId, AcpiGbl_FixedEventInfo[ACPI_EVENT_POWER_BUTTON].StatusRegisterId,
ACPI_CLEAR_STATUS); 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); AcpiHwExecuteSleepMethod (METHOD_PATHNAME__SST, ACPI_SST_WORKING);
return_ACPI_STATUS (Status); return_ACPI_STATUS (Status);
} }

View file

@ -129,8 +129,7 @@ CgWriteAmlComment (
void void
CvInitFileTree ( CvInitFileTree (
ACPI_TABLE_HEADER *Table, ACPI_TABLE_HEADER *Table,
UINT8 *AmlStart, FILE *RootFile);
UINT32 AmlLength);
void void
CvClearOpComments ( CvClearOpComments (

View file

@ -207,6 +207,10 @@ ACPI_STATUS
AcpiHwEnableAllWakeupGpes ( AcpiHwEnableAllWakeupGpes (
void); void);
UINT8
AcpiHwCheckAllGpes (
void);
ACPI_STATUS ACPI_STATUS
AcpiHwEnableRuntimeGpeBlock ( AcpiHwEnableRuntimeGpeBlock (
ACPI_GPE_XRUPT_INFO *GpeXruptInfo, ACPI_GPE_XRUPT_INFO *GpeXruptInfo,

View file

@ -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(a,b,c,d) CvPrintOneCommentType (a,b,c,d);
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) CvPrintOneCommentList (a,b); #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) CvPrintOneCommentList (a,b);
#define ASL_CV_FILE_HAS_SWITCHED(a) CvFileHasSwitched(a) #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 #else
@ -532,7 +532,7 @@
#define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d) #define ASL_CV_PRINT_ONE_COMMENT(a,b,c,d)
#define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b) #define ASL_CV_PRINT_ONE_COMMENT_LIST(a,b)
#define ASL_CV_FILE_HAS_SWITCHED(a) 0 #define ASL_CV_FILE_HAS_SWITCHED(a) 0
#define ASL_CV_INIT_FILETREE(a,b,c) #define ASL_CV_INIT_FILETREE(a,b)
#endif #endif

View file

@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */ /* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20200110 #define ACPI_CA_VERSION 0x20200214
#include "acconfig.h" #include "acconfig.h"
#include "actypes.h" #include "actypes.h"
@ -1001,6 +1001,10 @@ ACPI_STATUS
AcpiEnableAllWakeupGpes ( AcpiEnableAllWakeupGpes (
void)) void))
ACPI_HW_DEPENDENT_RETURN_UINT32 (
UINT32 AcpiAnyGpeStatusSet (
void))
ACPI_HW_DEPENDENT_RETURN_STATUS ( ACPI_HW_DEPENDENT_RETURN_STATUS (
ACPI_STATUS ACPI_STATUS
AcpiGetGpeDevice ( AcpiGetGpeDevice (

View file

@ -1041,7 +1041,7 @@ enum AcpiErstInstructions
enum AcpiErstCommandStatus enum AcpiErstCommandStatus
{ {
ACPI_ERST_SUCESS = 0, ACPI_ERST_SUCCESS = 0,
ACPI_ERST_NO_SPACE = 1, ACPI_ERST_NO_SPACE = 1,
ACPI_ERST_NOT_AVAILABLE = 2, ACPI_ERST_NOT_AVAILABLE = 2,
ACPI_ERST_FAILURE = 3, ACPI_ERST_FAILURE = 3,

View file

@ -575,11 +575,12 @@ typedef UINT64 ACPI_INTEGER;
strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE) strnlen (a, ACPI_NAMESEG_SIZE) == ACPI_NAMESEG_SIZE)
/* /*
* Algorithm to obtain access bit width. * Algorithm to obtain access bit or byte width.
* Can be used with AccessWidth of ACPI_GENERIC_ADDRESS and AccessSize of * Can be used with AccessSize field of ACPI_GENERIC_ADDRESS and
* ACPI_RESOURCE_GENERIC_REGISTER. * 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))
/******************************************************************************* /*******************************************************************************

View file

@ -228,7 +228,7 @@ AcpiNsHandleToPathname (
/* Build the path in the caller buffer */ /* Build the path in the caller buffer */
(void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer, (void) AcpiNsBuildNormalizedPath (Node, Buffer->Pointer,
RequiredSize, NoTrailing); (UINT32) RequiredSize, NoTrailing);
ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n", ACPI_DEBUG_PRINT ((ACPI_DB_EXEC, "%s [%X]\n",
(char *) Buffer->Pointer, (UINT32) RequiredSize)); (char *) Buffer->Pointer, (UINT32) RequiredSize));
@ -401,7 +401,7 @@ AcpiNsGetNormalizedPathname (
/* Build the path in the allocated buffer */ /* 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_DEBUG_PRINT_RAW ((ACPI_DB_NAMES, "%s: Path \"%s\"\n",
ACPI_GET_FUNCTION_NAME, NameBuffer)); ACPI_GET_FUNCTION_NAME, NameBuffer));
@ -434,7 +434,7 @@ AcpiNsBuildPrefixedPathname (
char *FullPath = NULL; char *FullPath = NULL;
char *ExternalPath = NULL; char *ExternalPath = NULL;
char *PrefixPath = NULL; char *PrefixPath = NULL;
SIZE_T PrefixPathLength = 0; ACPI_SIZE PrefixPathLength = 0;
/* If there is a prefix, get the pathname to it */ /* If there is a prefix, get the pathname to it */

View file

@ -606,7 +606,7 @@ AcpiInstallMethod (
MethodFlags = *ParserState.Aml++; MethodFlags = *ParserState.Aml++;
AmlStart = 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 * Allocate resources up-front. We don't want to have to delete a new

View file

@ -260,14 +260,14 @@ ACPI_EXPORT_SYMBOL_INIT (AcpiReallocateRootTable)
* *
* PARAMETERS: Signature - ACPI signature of needed table * PARAMETERS: Signature - ACPI signature of needed table
* Instance - Which instance (for SSDTs) * 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. * DESCRIPTION: Finds and returns an ACPI table header. Caller provides the
* * memory where a copy of the header is to be returned
* NOTE: Caller is responsible in unmapping the header with * (fixed length).
* AcpiOsUnmapMemory
* *
******************************************************************************/ ******************************************************************************/

View file

@ -84,7 +84,7 @@ AcpiUtGetElementLength (
* *
* NOTE: We always allocate the worst-case object descriptor because * NOTE: We always allocate the worst-case object descriptor because
* these objects are cached, and we want them to be * 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 * the most memory efficient, but the efficiency of the object
* cache should more than make up for this! * cache should more than make up for this!
* *