[ACPICA] Update to version 20211217. CORE-17905

This commit is contained in:
Thomas Faber 2022-11-05 11:58:41 -04:00
parent 9b247f6ae3
commit 8129fee128
No known key found for this signature in database
GPG key ID: 076E7C3D44720826
28 changed files with 391 additions and 105 deletions

View file

@ -599,6 +599,7 @@ AcpiDsEvalTableRegionOperands (
ObjDesc->Region.Address = ACPI_PTR_TO_PHYSADDR (Table);
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",
ObjDesc, ACPI_FORMAT_UINT64 (ObjDesc->Region.Address),

View file

@ -455,7 +455,7 @@ AcpiEvInstallSpaceHandler (
case ACPI_ADR_SPACE_DATA_TABLE:
Handler = AcpiExDataTableSpaceHandler;
Setup = NULL;
Setup = AcpiEvDataTableRegionSetup;
break;
default:

View file

@ -212,6 +212,15 @@ AcpiEvAddressSpaceDispatch (
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;
}
/*
* We must exit the interpreter because the region setup will
* potentially execute control methods (for example, the _REG method

View file

@ -491,6 +491,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

View file

@ -487,7 +487,7 @@ AcpiExLoadOp (
ACPI_INFO (("Dynamic OEM Table Load:"));
AcpiExExitInterpreter ();
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, TRUE, &TableIndex);
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL, Table, TRUE, &TableIndex);
AcpiExEnterInterpreter ();
if (ACPI_FAILURE (Status))
{

View file

@ -342,6 +342,7 @@ AcpiExCreateRegion (
ObjDesc->Region.SpaceId = SpaceId;
ObjDesc->Region.Address = 0;
ObjDesc->Region.Length = 0;
ObjDesc->Region.Pointer = NULL;
ObjDesc->Region.Node = Node;
ObjDesc->Region.Handler = NULL;
ObjDesc->Common.Flags &=

View file

@ -384,9 +384,7 @@ AcpiExWriteDataToField (
ObjDesc->Field.BaseByteOffset,
SourceDesc->Buffer.Pointer, DataLength);
if ((ObjDesc->Field.RegionObj->Region.Address == PCC_MASTER_SUBSPACE &&
MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset)) ||
GENERIC_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
if (MASTER_SUBSPACE_COMMAND (ObjDesc->Field.BaseByteOffset))
{
/* Perform the write */

View file

@ -1085,7 +1085,7 @@ AcpiExOpcode_1A_0T_1R (
WalkState, ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
goto Cleanup;
return_ACPI_STATUS (Status);
}
ReturnDesc = TempDesc;

View file

@ -584,9 +584,17 @@ AcpiExDataTableSpaceHandler (
void *HandlerContext,
void *RegionContext)
{
ACPI_DATA_TABLE_MAPPING *Mapping;
char *Pointer;
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
* validated.
@ -595,14 +603,12 @@ AcpiExDataTableSpaceHandler (
{
case ACPI_READ:
memcpy (ACPI_CAST_PTR (char, Value), ACPI_PHYSADDR_TO_PTR (Address),
ACPI_DIV_8 (BitWidth));
memcpy (ACPI_CAST_PTR (char, Value), Pointer, ACPI_DIV_8 (BitWidth));
break;
case ACPI_WRITE:
memcpy (ACPI_PHYSADDR_TO_PTR (Address), ACPI_CAST_PTR (char, Value),
ACPI_DIV_8 (BitWidth));
memcpy (Pointer, ACPI_CAST_PTR (char, Value), ACPI_DIV_8 (BitWidth));
break;
default:

View file

@ -153,7 +153,10 @@ AcpiHwExtendedSleep (
/* Flush caches, as per ACPI specification */
ACPI_FLUSH_CPU_CACHE ();
if (SleepState < ACPI_STATE_S4)
{
ACPI_FLUSH_CPU_CACHE ();
}
Status = AcpiOsEnterSleep (SleepState, SleepControl, 0);
if (Status == AE_CTRL_TERMINATE)

View file

@ -154,7 +154,10 @@ AcpiHwLegacySleep (
/* Flush caches, as per ACPI specification */
ACPI_FLUSH_CPU_CACHE ();
if (SleepState < ACPI_STATE_S4)
{
ACPI_FLUSH_CPU_CACHE ();
}
Status = AcpiOsEnterSleep (SleepState, Pm1aControl, Pm1bControl);
if (Status == AE_CTRL_TERMINATE)
@ -268,7 +271,7 @@ AcpiHwLegacyWakePrep (
Pm1aControl |= (AcpiGbl_SleepTypeAS0 <<
SleepTypeRegInfo->BitPosition);
Pm1aControl |= (AcpiGbl_SleepTypeBS0 <<
Pm1bControl |= (AcpiGbl_SleepTypeBS0 <<
SleepTypeRegInfo->BitPosition);
/* Write the control registers and ignore any errors */

View file

@ -245,8 +245,6 @@ AcpiEnterSleepStateS4bios (
return_ACPI_STATUS (Status);
}
ACPI_FLUSH_CPU_CACHE ();
Status = AcpiHwWritePort (AcpiGbl_FADT.SmiCommand,
(UINT32) AcpiGbl_FADT.S4BiosRequest, 8);
if (ACPI_FAILURE (Status))

View file

@ -149,6 +149,7 @@ typedef enum
ACPI_DMT_AEST_RES,
ACPI_DMT_AEST_XFACE,
ACPI_DMT_AEST_XRUPT,
ACPI_DMT_AGDI,
ACPI_DMT_ASF,
ACPI_DMT_CEDT,
ACPI_DMT_DMAR,
@ -172,6 +173,11 @@ typedef enum
ACPI_DMT_NFIT,
ACPI_DMT_NHLT1,
ACPI_DMT_NHLT1a,
ACPI_DMT_NHLT1b,
ACPI_DMT_NHLT1c,
ACPI_DMT_NHLT1d,
ACPI_DMT_NHLT1e,
ACPI_DMT_NHLT1f,
ACPI_DMT_PCCT,
ACPI_DMT_PHAT,
ACPI_DMT_PMTT,
@ -273,6 +279,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestVendorError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestGicError[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXface[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAestXrupt[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAgdi[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoAsf1a[];
@ -451,9 +458,13 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5b[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt5c[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt6b[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt7b[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt8[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoNhlt9[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhatHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoPhat0a[];
@ -527,6 +538,7 @@ extern ACPI_DMTABLE_INFO AcpiDmTableInfoSvkl0[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaHdr[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaClient[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTcpaServer[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTdel[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm2a[];
extern ACPI_DMTABLE_INFO AcpiDmTableInfoTpm211[];
@ -774,6 +786,10 @@ void
AcpiDmDumpTcpa (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpTdel (
ACPI_TABLE_HEADER *Table);
void
AcpiDmDumpTpm2 (
ACPI_TABLE_HEADER *Table);

View file

@ -349,6 +349,13 @@ AcpiEvPciBarRegionSetup (
void *HandlerContext,
void **RegionContext);
ACPI_STATUS
AcpiEvDataTableRegionSetup (
ACPI_HANDLE Handle,
UINT32 Function,
void *HandlerContext,
void **RegionContext);
ACPI_STATUS
AcpiEvDefaultRegionSetup (
ACPI_HANDLE Handle,

View file

@ -205,6 +205,7 @@ typedef struct acpi_object_region
union acpi_operand_object *Next;
ACPI_PHYSICAL_ADDRESS Address;
UINT32 Length;
void *Pointer; /* Only for data table regions */
} ACPI_OBJECT_REGION;

View file

@ -46,7 +46,7 @@
/* Current ACPICA subsystem version in YYYYMMDD format */
#define ACPI_CA_VERSION 0x20210930
#define ACPI_CA_VERSION 0x20211217
#include "acconfig.h"
#include "actypes.h"
@ -550,8 +550,12 @@ AcpiDecodePldBuffer (
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
BOOLEAN Physical))
ACPI_TABLE_HEADER *Table))
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallPhysicalTable (
ACPI_PHYSICAL_ADDRESS Address))
ACPI_EXTERNAL_RETURN_STATUS (
ACPI_STATUS

View file

@ -85,7 +85,8 @@ ACPI_STATUS
AcpiTbAcquireTempTable (
ACPI_TABLE_DESC *TableDesc,
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags);
UINT8 Flags,
ACPI_TABLE_HEADER *Table);
void
AcpiTbReleaseTempTable (
@ -171,6 +172,7 @@ ACPI_STATUS
AcpiTbInstallStandardTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
ACPI_TABLE_HEADER *Table,
BOOLEAN Reload,
BOOLEAN Override,
UINT32 *TableIndex);
@ -188,6 +190,7 @@ ACPI_STATUS
AcpiTbInstallAndLoadTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
ACPI_TABLE_HEADER *Table,
BOOLEAN Override,
UINT32 *TableIndex);

View file

@ -44,6 +44,7 @@
/*
* Macros used to generate offsets to specific table fields
*/
#define ACPI_AGDI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_AGDI,f)
#define ACPI_FACS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_FACS,f)
#define ACPI_GAS_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_GENERIC_ADDRESS,f)
#define ACPI_HDR_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_HEADER,f)
@ -89,6 +90,7 @@
#define ACPI_STAO_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_STAO,f)
#define ACPI_SVKL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_SVKL,f)
#define ACPI_TCPA_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TCPA_HDR,f)
#define ACPI_TDEL_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TDEL,f)
#define ACPI_TPM2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM2,f)
#define ACPI_TPM23_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_TPM23,f)
#define ACPI_UEFI_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_TABLE_UEFI,f)
@ -231,9 +233,13 @@
#define ACPI_NHLT5B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B,f)
#define ACPI_NHLT5C_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C,f)
#define ACPI_NHLT6_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_CONFIG,f)
#define ACPI_NHLT6A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_VENDOR_MIC_COUNT,f)
#define ACPI_NHLT6B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_RENDER_FEEDBACK_DEVICE_SPECIFIC_CONFIG,f)
#define ACPI_NHLT7_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_COUNT,f)
#define ACPI_NHLT7A_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_DATA,f)
#define ACPI_NHLT7B_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_LINUX_SPECIFIC_DATA_B,f)
#define ACPI_NHLT8_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_TABLE_TERMINATOR,f)
#define ACPI_NHLT9_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION,f)
#define ACPI_PCCT0_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_SUBSPACE,f)
#define ACPI_PCCT1_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED,f)
#define ACPI_PCCT2_OFFSET(f) (UINT16) ACPI_OFFSET (ACPI_PCCT_HW_REDUCED_TYPE2,f)
@ -300,6 +306,7 @@
#define ACPI_AEST0_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_PROCESSOR,f,o)
#define ACPI_AEST0D_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERFACE,f,o)
#define ACPI_AEST0E_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_AEST_NODE_INTERRUPT,f,o)
#define ACPI_AGDI_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_AGDI,f,o)
#define ACPI_BGRT_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_BGRT,f,o)
#define ACPI_DRTM_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_TABLE_DRTM,f,o)
#define ACPI_DRTM1a_FLAG_OFFSET(f,o) ACPI_FLAG_OFFSET (ACPI_DRTM_RESOURCE,f,o)

View file

@ -60,6 +60,7 @@
* file. Useful because they make it more difficult to inadvertently type in
* the wrong signature.
*/
#define ACPI_SIG_AGDI "AGDI" /* Arm Generic Diagnostic Dump and Reset Device Interface */
#define ACPI_SIG_BDAT "BDAT" /* BIOS Data ACPI Table */
#define ACPI_SIG_IORT "IORT" /* IO Remapping Table */
#define ACPI_SIG_IVRS "IVRS" /* I/O Virtualization Reporting Structure */
@ -84,6 +85,7 @@
#define ACPI_SIG_SDEI "SDEI" /* Software Delegated Exception Interface Table */
#define ACPI_SIG_SDEV "SDEV" /* Secure Devices table */
#define ACPI_SIG_SVKL "SVKL" /* Storage Volume Key Location Table */
#define ACPI_SIG_TDEL "TDEL" /* TD Event Log Table */
/*
@ -201,7 +203,7 @@ typedef struct acpi_aest_processor_tlb
typedef struct acpi_aest_processor_generic
{
UINT8 *Resource;
UINT32 Resource;
} ACPI_AEST_PROCESSOR_GENERIC;
@ -292,6 +294,28 @@ typedef struct acpi_aest_node_interrupt
#define ACPI_AEST_XRUPT_RESERVED 2 /* 2 and above are reserved */
/*******************************************************************************
* AGDI - Arm Generic Diagnostic Dump and Reset Device Interface
*
* Conforms to "ACPI for Arm Components 1.1, Platform Design Document"
* ARM DEN0093 v1.1
*
******************************************************************************/
typedef struct acpi_table_agdi
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT8 Flags;
UINT8 Reserved[3];
UINT32 SdeiEvent;
UINT32 Gsiv;
} ACPI_TABLE_AGDI;
/* Mask for Flags field above */
#define ACPI_AGDI_SIGNALING_MODE (1)
/*******************************************************************************
*
* BDAT - BIOS Data ACPI Table
@ -1688,6 +1712,12 @@ typedef struct acpi_table_nhlt
} ACPI_TABLE_NHLT;
typedef struct acpi_table_nhlt_endpoint_count
{
UINT8 EndpointCount;
} ACPI_TABLE_NHLT_ENDPOINT_COUNT;
typedef struct acpi_nhlt_endpoint
{
UINT32 DescriptorLength;
@ -1744,6 +1774,8 @@ typedef struct acpi_nhlt_endpoint
#define ACPI_NHLT_DIR_RENDER_FEEDBACK 3
#define ACPI_NHLT_DIR_RESERVED 4 /* 4 and above are reserved */
/* Capabilities = 2 */
typedef struct acpi_nhlt_device_specific_config
{
UINT32 CapabilitiesSize;
@ -1752,6 +1784,8 @@ typedef struct acpi_nhlt_device_specific_config
} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG;
/* Capabilities = 3 */
typedef struct acpi_nhlt_device_specific_config_a
{
UINT32 CapabilitiesSize;
@ -1761,14 +1795,24 @@ typedef struct acpi_nhlt_device_specific_config_a
} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_A;
/* Capabilities = 3 */
typedef struct acpi_nhlt_device_specific_config_d
{
UINT8 VirtualSlot;
UINT8 ConfigType;
UINT8 ArrayType;
} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D;
/* Values for Config Type above */
#define ACPI_NHLT_TYPE_MIC_ARRAY 0x01
#define ACPI_NHLT_TYPE_GENERIC 0x00
#define ACPI_NHLT_CONFIG_TYPE_GENERIC 0x00
#define ACPI_NHLT_CONFIG_TYPE_MIC_ARRAY 0x01
#define ACPI_NHLT_CONFIG_TYPE_RENDER_FEEDBACK 0x03
#define ACPI_NHLT_CONFIG_TYPE_RESERVED 0x04 /* 4 and above are reserved */
/* Mask for Extension field of ArrayType */
#define ACPI_NHLT_ARRAY_TYPE_MASK 0x10
/* Capabilities = 0 */
typedef struct acpi_nhlt_device_specific_config_b
{
@ -1776,6 +1820,8 @@ typedef struct acpi_nhlt_device_specific_config_b
} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_B;
/* Capabilities = 1 */
typedef struct acpi_nhlt_device_specific_config_c
{
UINT32 CapabilitiesSize;
@ -1783,6 +1829,13 @@ typedef struct acpi_nhlt_device_specific_config_c
} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_C;
typedef struct acpi_nhlt_render_device_specific_config
{
UINT32 CapabilitiesSize;
UINT8 VirtualSlot;
} ACPI_NHLT_RENDER_DEVICE_SPECIFIC_CONFIG;
typedef struct acpi_nhlt_wave_extensible
{
UINT16 FormatTag;
@ -1855,18 +1908,24 @@ typedef struct acpi_nhlt_mic_device_specific_config
/* Values for ArrayTypeExt above */
#define SMALL_LINEAR_2ELEMENT 0x0A
#define BIG_LINEAR_2ELEMENT 0x0B
#define FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
#define PLANAR_LSHAPED_4ELEMENT 0x0D
#define SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
#define VENDOR_DEFINED 0x0F
#define ARRAY_TYPE_MASK 0x0F
#define ARRAY_TYPE_EXT_MASK 0x10
#define ACPI_NHLT_ARRAY_TYPE_RESERVED 0x09 // 9 and below are reserved
#define ACPI_NHLT_SMALL_LINEAR_2ELEMENT 0x0A
#define ACPI_NHLT_BIG_LINEAR_2ELEMENT 0x0B
#define ACPI_NHLT_FIRST_GEOMETRY_LINEAR_4ELEMENT 0x0C
#define ACPI_NHLT_PLANAR_LSHAPED_4ELEMENT 0x0D
#define ACPI_NHLT_SECOND_GEOMETRY_LINEAR_4ELEMENT 0x0E
#define ACPI_NHLT_VENDOR_DEFINED 0x0F
#define ACPI_NHLT_ARRAY_TYPE_MASK 0x0F
#define ACPI_NHLT_ARRAY_TYPE_EXT_MASK 0x10
#define NO_EXTENSION 0x0
#define MIC_SNR_SENSITIVITY_EXT 0x1
#define ACPI_NHLT_NO_EXTENSION 0x0
#define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4)
typedef struct acpi_nhlt_vendor_mic_count
{
UINT8 MicrophoneCount;
} ACPI_NHLT_VENDOR_MIC_COUNT;
typedef struct acpi_nhlt_vendor_mic_config
{
@ -1888,22 +1947,25 @@ typedef struct acpi_nhlt_vendor_mic_config
/* Values for Type field above */
#define MIC_OMNIDIRECTIONAL 0
#define MIC_SUBCARDIOID 1
#define MIC_CARDIOID 2
#define MIC_SUPER_CARDIOID 3
#define MIC_HYPER_CARDIOID 4
#define MIC_8_SHAPED 5
#define MIC_VENDOR_DEFINED 7
#define ACPI_NHLT_MIC_OMNIDIRECTIONAL 0
#define ACPI_NHLT_MIC_SUBCARDIOID 1
#define ACPI_NHLT_MIC_CARDIOID 2
#define ACPI_NHLT_MIC_SUPER_CARDIOID 3
#define ACPI_NHLT_MIC_HYPER_CARDIOID 4
#define ACPI_NHLT_MIC_8_SHAPED 5
#define ACPI_NHLT_MIC_RESERVED6 6 // 6 is reserved
#define ACPI_NHLT_MIC_VENDOR_DEFINED 7
#define ACPI_NHLT_MIC_RESERVED 8 // 8 and above are reserved
/* Values for Panel field above */
#define MIC_TOP 0
#define MIC_BOTTOM 1
#define MIC_LEFT 2
#define MIC_RIGHT 3
#define MIC_FRONT 4
#define MIC_REAR 5
#define ACPI_NHLT_MIC_POSITION_TOP 0
#define ACPI_NHLT_MIC_POSITION_BOTTOM 1
#define ACPI_NHLT_MIC_POSITION_LEFT 2
#define ACPI_NHLT_MIC_POSITION_RIGHT 3
#define ACPI_NHLT_MIC_POSITION_FRONT 4
#define ACPI_NHLT_MIC_POSITION_BACK 5
#define ACPI_NHLT_MIC_POSITION_RESERVED 6 // 6 and above are reserved
typedef struct acpi_nhlt_vendor_mic_device_specific_config
{
@ -1922,9 +1984,10 @@ typedef struct acpi_nhlt_mic_snr_sensitivity_extension
} ACPI_NHLT_MIC_SNR_SENSITIVITY_EXTENSION;
/* Render device with feedback */
typedef struct acpi_nhlt_render_feedback_device_specific_config
{
ACPI_NHLT_DEVICE_SPECIFIC_CONFIG DeviceConfig;
UINT8 FeedbackVirtualSlot; // Render slot in case of capture
UINT16 FeedbackChannels; // Informative only
UINT16 FeedbackValidBitsPerSample;
@ -1944,10 +2007,15 @@ typedef struct acpi_nhlt_linux_specific_data
UINT8 DeviceId[16];
UINT8 DeviceInstanceId;
UINT8 DevicePortId;
UINT8 Filler[18];
} ACPI_NHLT_LINUX_SPECIFIC_DATA;
typedef struct acpi_nhlt_linux_specific_data_b
{
UINT8 SpecificData[18];
} ACPI_NHLT_LINUX_SPECIFIC_DATA_B;
typedef struct acpi_nhlt_table_terminator
{
UINT32 TerminatorValue;
@ -2900,6 +2968,24 @@ enum acpi_svkl_format
};
/*******************************************************************************
*
* TDEL - TD-Event Log
* From: "Guest-Host-Communication Interface (GHCI) for Intel
* Trust Domain Extensions (Intel TDX)".
* September 2020
*
******************************************************************************/
typedef struct acpi_table_tdel
{
ACPI_TABLE_HEADER Header; /* Common ACPI table header */
UINT32 Reserved;
UINT64 LogAreaMinimumLength;
UINT64 LogAreaStartAddress;
} ACPI_TABLE_TDEL;
/* Reset to default packing */
#pragma pack()

View file

@ -552,7 +552,6 @@ typedef UINT64 ACPI_INTEGER;
#define ACPI_TO_POINTER(i) ACPI_CAST_PTR (void, (ACPI_SIZE) (i))
#define ACPI_TO_INTEGER(p) ACPI_PTR_DIFF (p, (void *) 0)
#define ACPI_OFFSET(d, f) ACPI_PTR_DIFF (&(((d *) 0)->f), (void *) 0)
#define ACPI_PHYSADDR_TO_PTR(i) ACPI_TO_POINTER(i)
#define ACPI_PTR_TO_PHYSADDR(i) ACPI_TO_INTEGER(i)
/* Optimizations for 4-character (32-bit) ACPI_NAME manipulation */
@ -579,9 +578,14 @@ typedef UINT64 ACPI_INTEGER;
* Can be used with AccessSize field of ACPI_GENERIC_ADDRESS and
* ACPI_RESOURCE_GENERIC_REGISTER.
*/
#define ACPI_ACCESS_BIT_WIDTH(AccessSize) (1 << ((AccessSize) + 2))
#define ACPI_ACCESS_BYTE_WIDTH(AccessSize) (1 << ((AccessSize) - 1))
#define ACPI_ACCESS_BIT_SHIFT 2
#define ACPI_ACCESS_BYTE_SHIFT -1
#define ACPI_ACCESS_BIT_MAX (31 - ACPI_ACCESS_BIT_SHIFT)
#define ACPI_ACCESS_BYTE_MAX (31 - ACPI_ACCESS_BYTE_SHIFT)
#define ACPI_ACCESS_BIT_DEFAULT (8 - ACPI_ACCESS_BIT_SHIFT)
#define ACPI_ACCESS_BYTE_DEFAULT (8 - ACPI_ACCESS_BYTE_SHIFT)
#define ACPI_ACCESS_BIT_WIDTH(size) (1 << ((size) + ACPI_ACCESS_BIT_SHIFT))
#define ACPI_ACCESS_BYTE_WIDTH(size) (1 << ((size) + ACPI_ACCESS_BYTE_SHIFT))
/*******************************************************************************
*
@ -1211,6 +1215,14 @@ typedef struct acpi_connection_info
} ACPI_CONNECTION_INFO;
/* Special Context data for PCC Opregion (ACPI 6.3) */
typedef struct acpi_pcc_info {
UINT8 SubspaceId;
UINT16 Length;
UINT8 *InternalBuffer;
} ACPI_PCC_INFO;
typedef
ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (
@ -1350,6 +1362,12 @@ typedef struct acpi_mem_space_context
} ACPI_MEM_SPACE_CONTEXT;
typedef struct acpi_data_table_space_context
{
void *Pointer;
} ACPI_DATA_TABLE_MAPPING;
/*
* ACPI_MEMORY_LIST is used only if the ACPICA local cache is enabled

View file

@ -135,14 +135,28 @@ AcpiTbInitTableDescriptor (
{
/*
* Initialize the table descriptor. Set the pointer to NULL, since the
* table is not fully mapped at this time.
* Initialize the table descriptor. Set the pointer to NULL for external
* tables, since the table is not fully mapped at this time.
*/
memset (TableDesc, 0, sizeof (ACPI_TABLE_DESC));
TableDesc->Address = Address;
TableDesc->Length = Table->Length;
TableDesc->Flags = Flags;
ACPI_MOVE_32_TO_32 (TableDesc->Signature.Ascii, Table->Signature);
switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
{
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
TableDesc->Pointer = Table;
break;
case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL:
default:
break;
}
}
@ -182,8 +196,7 @@ AcpiTbAcquireTable (
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
Table = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
Table = TableDesc->Pointer;
break;
default:
@ -251,6 +264,8 @@ AcpiTbReleaseTable (
* PARAMETERS: TableDesc - Table descriptor to be acquired
* Address - Address of the table
* Flags - Allocation flags of the table
* Table - Pointer to the table (required for virtual
* origins, optional for physical)
*
* RETURN: Status
*
@ -265,9 +280,10 @@ ACPI_STATUS
AcpiTbAcquireTempTable (
ACPI_TABLE_DESC *TableDesc,
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags)
UINT8 Flags,
ACPI_TABLE_HEADER *Table)
{
ACPI_TABLE_HEADER *TableHeader;
BOOLEAN MappedTable = FALSE;
switch (Flags & ACPI_TABLE_ORIGIN_MASK)
@ -276,37 +292,43 @@ AcpiTbAcquireTempTable (
/* Get the length of the full table from the header */
TableHeader = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
if (!TableHeader)
if (!Table)
{
return (AE_NO_MEMORY);
Table = AcpiOsMapMemory (Address, sizeof (ACPI_TABLE_HEADER));
if (!Table)
{
return (AE_NO_MEMORY);
}
MappedTable = TRUE;
}
AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader);
AcpiOsUnmapMemory (TableHeader, sizeof (ACPI_TABLE_HEADER));
return (AE_OK);
break;
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
TableHeader = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
ACPI_PHYSADDR_TO_PTR (Address));
if (!TableHeader)
if (!Table)
{
return (AE_NO_MEMORY);
return (AE_BAD_PARAMETER);
}
AcpiTbInitTableDescriptor (TableDesc, Address, Flags, TableHeader);
return (AE_OK);
break;
default:
break;
/* Table is not valid yet */
return (AE_NO_MEMORY);
}
/* Table is not valid yet */
AcpiTbInitTableDescriptor (TableDesc, Address, Flags, Table);
if (MappedTable)
{
AcpiOsUnmapMemory (Table, sizeof (ACPI_TABLE_HEADER));
}
return (AE_NO_MEMORY);
return (AE_OK);
}
@ -405,7 +427,20 @@ AcpiTbInvalidateTable (
AcpiTbReleaseTable (TableDesc->Pointer, TableDesc->Length,
TableDesc->Flags);
TableDesc->Pointer = NULL;
switch (TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK)
{
case ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL:
TableDesc->Pointer = NULL;
break;
case ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL:
case ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL:
default:
break;
}
return_VOID;
}
@ -1111,6 +1146,9 @@ AcpiTbLoadTable (
*
* PARAMETERS: Address - Physical address of the table
* Flags - Allocation flags of the table
* Table - Pointer to the table (required for
* virtual origins, optional for
* physical)
* Override - Whether override should be performed
* TableIndex - Where table index is returned
*
@ -1124,6 +1162,7 @@ ACPI_STATUS
AcpiTbInstallAndLoadTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
ACPI_TABLE_HEADER *Table,
BOOLEAN Override,
UINT32 *TableIndex)
{
@ -1136,7 +1175,7 @@ AcpiTbInstallAndLoadTable (
/* Install the table and load it into the namespace */
Status = AcpiTbInstallStandardTable (Address, Flags, TRUE,
Status = AcpiTbInstallStandardTable (Address, Flags, Table, TRUE,
Override, &i);
if (ACPI_FAILURE (Status))
{

View file

@ -378,7 +378,7 @@ AcpiTbParseFadt (
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XDsdt,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_DsdtIndex);
/* If Hardware Reduced flag is set, there is no FACS */
@ -389,14 +389,14 @@ AcpiTbParseFadt (
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.Facs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_FacsIndex);
}
if (AcpiGbl_FADT.XFacs)
{
AcpiTbInstallStandardTable (
(ACPI_PHYSICAL_ADDRESS) AcpiGbl_FADT.XFacs,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&AcpiGbl_XFacsIndex);
}
}

View file

@ -119,6 +119,8 @@ AcpiTbInstallTableWithOverride (
* PARAMETERS: Address - Address of the table (might be a virtual
* address depending on the TableFlags)
* Flags - Flags for the table
* Table - Pointer to the table (required for virtual
* origins, optional for physical)
* Reload - Whether reload should be performed
* Override - Whether override should be performed
* TableIndex - Where the table index is returned
@ -137,6 +139,7 @@ ACPI_STATUS
AcpiTbInstallStandardTable (
ACPI_PHYSICAL_ADDRESS Address,
UINT8 Flags,
ACPI_TABLE_HEADER *Table,
BOOLEAN Reload,
BOOLEAN Override,
UINT32 *TableIndex)
@ -151,7 +154,7 @@ AcpiTbInstallStandardTable (
/* Acquire a temporary table descriptor for validation */
Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags);
Status = AcpiTbAcquireTempTable (&NewTableDesc, Address, Flags, Table);
if (ACPI_FAILURE (Status))
{
ACPI_ERROR ((AE_INFO,
@ -261,7 +264,7 @@ AcpiTbOverrideTable (
if (ACPI_SUCCESS (Status) && Table)
{
AcpiTbAcquireTempTable (&NewTableDesc, ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL);
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table);
ACPI_ERROR_ONLY (OverrideType = "Logical");
goto FinishOverride;
}
@ -273,7 +276,7 @@ AcpiTbOverrideTable (
if (ACPI_SUCCESS (Status) && Address && Length)
{
AcpiTbAcquireTempTable (&NewTableDesc, Address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL);
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL);
ACPI_ERROR_ONLY (OverrideType = "Physical");
goto FinishOverride;
}
@ -349,7 +352,8 @@ AcpiTbUninstallTable (
if ((TableDesc->Flags & ACPI_TABLE_ORIGIN_MASK) ==
ACPI_TABLE_ORIGIN_INTERNAL_VIRTUAL)
{
ACPI_FREE (ACPI_PHYSADDR_TO_PTR (TableDesc->Address));
ACPI_FREE (TableDesc->Pointer);
TableDesc->Pointer = NULL;
}
TableDesc->Address = ACPI_PTR_TO_PHYSADDR (NULL);

View file

@ -153,7 +153,8 @@ AcpiTbPrintTableHeader (
Header->Signature, ACPI_FORMAT_UINT64 (Address),
Header->Length));
}
else if (ACPI_VALIDATE_RSDP_SIG (Header->Signature))
else if (ACPI_VALIDATE_RSDP_SIG (ACPI_CAST_PTR (ACPI_TABLE_RSDP,
Header)->Signature))
{
/* RSDP has no common fields */

View file

@ -392,7 +392,8 @@ AcpiTbParseRootTable (
}
Status = AcpiTbInstallStandardTable (Address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, FALSE, TRUE, &TableIndex);
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, TRUE,
&TableIndex);
if (ACPI_SUCCESS (Status) &&
ACPI_COMPARE_NAMESEG (

View file

@ -288,9 +288,7 @@ UnlockAndExit:
*
* FUNCTION: AcpiInstallTable
*
* PARAMETERS: Address - Address of the ACPI table to be installed.
* Physical - Whether the address is a physical table
* address or not
* PARAMETERS: Table - Pointer to the ACPI table to be installed.
*
* RETURN: Status
*
@ -302,28 +300,17 @@ UnlockAndExit:
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallTable (
ACPI_PHYSICAL_ADDRESS Address,
BOOLEAN Physical)
ACPI_TABLE_HEADER *Table)
{
ACPI_STATUS Status;
UINT8 Flags;
UINT32 TableIndex;
ACPI_FUNCTION_TRACE (AcpiInstallTable);
if (Physical)
{
Flags = ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL;
}
else
{
Flags = ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL;
}
Status = AcpiTbInstallStandardTable (Address, Flags,
FALSE, FALSE, &TableIndex);
Status = AcpiTbInstallStandardTable (ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table, FALSE, FALSE, &TableIndex);
return_ACPI_STATUS (Status);
}
@ -331,6 +318,40 @@ AcpiInstallTable (
ACPI_EXPORT_SYMBOL_INIT (AcpiInstallTable)
/*******************************************************************************
*
* FUNCTION: AcpiInstallPhysicalTable
*
* PARAMETERS: Address - Address of the ACPI table to be installed.
*
* RETURN: Status
*
* DESCRIPTION: Dynamically install an ACPI table.
* Note: This function should only be invoked after
* AcpiInitializeTables() and before AcpiLoadTables().
*
******************************************************************************/
ACPI_STATUS ACPI_INIT_FUNCTION
AcpiInstallPhysicalTable (
ACPI_PHYSICAL_ADDRESS Address)
{
ACPI_STATUS Status;
UINT32 TableIndex;
ACPI_FUNCTION_TRACE (AcpiInstallPhysicalTable);
Status = AcpiTbInstallStandardTable (Address,
ACPI_TABLE_ORIGIN_INTERNAL_PHYSICAL, NULL, FALSE, FALSE, &TableIndex);
return_ACPI_STATUS (Status);
}
ACPI_EXPORT_SYMBOL_INIT (AcpiInstallPhysicalTable)
/*******************************************************************************
*
* FUNCTION: AcpiLoadTable
@ -373,7 +394,7 @@ AcpiLoadTable (
ACPI_INFO (("Host-directed Dynamic ACPI Table Load:"));
Status = AcpiTbInstallAndLoadTable (ACPI_PTR_TO_PHYSADDR (Table),
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, FALSE, &TableIndex);
ACPI_TABLE_ORIGIN_EXTERNAL_VIRTUAL, Table, FALSE, &TableIndex);
if (TableIdx)
{
*TableIdx = TableIndex;

View file

@ -486,6 +486,7 @@ AcpiUtUpdateRefCount (
ACPI_WARNING ((AE_INFO,
"Obj %p, Reference Count is already zero, cannot decrement\n",
Object));
return;
}
ACPI_DEBUG_PRINT_RAW ((ACPI_DB_ALLOCATIONS,

View file

@ -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: 20210930
Used Version: 20211217
License: GPL-2.0 (https://spdx.org/licenses/GPL-2.0.html)
URL: https://acpica.org/