https://git.reactos.org/?p=reactos.git;a=commitdiff;h=8129fee128abc9cae490a…
commit 8129fee128abc9cae490a2739a5d890f1265dbe5
Author: Thomas Faber <thomas.faber(a)reactos.org>
AuthorDate: Sat Nov 5 11:58:41 2022 -0400
Commit: Thomas Faber <thomas.faber(a)reactos.org>
CommitDate: Sun Nov 6 08:33:28 2022 -0500
[ACPICA] Update to version 20211217. CORE-17905
---
drivers/bus/acpi/acpica/dispatcher/dsopcode.c | 1 +
drivers/bus/acpi/acpica/events/evhandler.c | 2 +-
drivers/bus/acpi/acpica/events/evregion.c | 9 ++
drivers/bus/acpi/acpica/events/evrgnini.c | 58 ++++++++++
drivers/bus/acpi/acpica/executer/exconfig.c | 2 +-
drivers/bus/acpi/acpica/executer/excreate.c | 1 +
drivers/bus/acpi/acpica/executer/exfield.c | 4 +-
drivers/bus/acpi/acpica/executer/exoparg1.c | 2 +-
drivers/bus/acpi/acpica/executer/exregion.c | 14 ++-
drivers/bus/acpi/acpica/hardware/hwesleep.c | 5 +-
drivers/bus/acpi/acpica/hardware/hwsleep.c | 7 +-
drivers/bus/acpi/acpica/hardware/hwxfsleep.c | 2 -
drivers/bus/acpi/acpica/include/acdisasm.h | 16 +++
drivers/bus/acpi/acpica/include/acevents.h | 7 ++
drivers/bus/acpi/acpica/include/acobject.h | 1 +
drivers/bus/acpi/acpica/include/acpixf.h | 10 +-
drivers/bus/acpi/acpica/include/actables.h | 5 +-
drivers/bus/acpi/acpica/include/actbinfo.h | 7 ++
drivers/bus/acpi/acpica/include/actbl2.h | 148 ++++++++++++++++++++------
drivers/bus/acpi/acpica/include/actypes.h | 26 ++++-
drivers/bus/acpi/acpica/tables/tbdata.c | 85 +++++++++++----
drivers/bus/acpi/acpica/tables/tbfadt.c | 6 +-
drivers/bus/acpi/acpica/tables/tbinstal.c | 12 ++-
drivers/bus/acpi/acpica/tables/tbprint.c | 3 +-
drivers/bus/acpi/acpica/tables/tbutils.c | 3 +-
drivers/bus/acpi/acpica/tables/tbxfload.c | 57 ++++++----
drivers/bus/acpi/acpica/utilities/utdelete.c | 1 +
media/doc/3rd Party Files.txt | 2 +-
28 files changed, 391 insertions(+), 105 deletions(-)
diff --git a/drivers/bus/acpi/acpica/dispatcher/dsopcode.c
b/drivers/bus/acpi/acpica/dispatcher/dsopcode.c
index fe92d8f6c91..ee0564324d9 100644
--- a/drivers/bus/acpi/acpica/dispatcher/dsopcode.c
+++ b/drivers/bus/acpi/acpica/dispatcher/dsopcode.c
@@ -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),
diff --git a/drivers/bus/acpi/acpica/events/evhandler.c
b/drivers/bus/acpi/acpica/events/evhandler.c
index 7d4b2a42b7c..9a761c8b667 100644
--- a/drivers/bus/acpi/acpica/events/evhandler.c
+++ b/drivers/bus/acpi/acpica/events/evhandler.c
@@ -455,7 +455,7 @@ AcpiEvInstallSpaceHandler (
case ACPI_ADR_SPACE_DATA_TABLE:
Handler = AcpiExDataTableSpaceHandler;
- Setup = NULL;
+ Setup = AcpiEvDataTableRegionSetup;
break;
default:
diff --git a/drivers/bus/acpi/acpica/events/evregion.c
b/drivers/bus/acpi/acpica/events/evregion.c
index 04003ded54c..d10fa1243a1 100644
--- a/drivers/bus/acpi/acpica/events/evregion.c
+++ b/drivers/bus/acpi/acpica/events/evregion.c
@@ -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
diff --git a/drivers/bus/acpi/acpica/events/evrgnini.c
b/drivers/bus/acpi/acpica/events/evrgnini.c
index 7e601c6c8c1..26795c44de1 100644
--- a/drivers/bus/acpi/acpica/events/evrgnini.c
+++ b/drivers/bus/acpi/acpica/events/evrgnini.c
@@ -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
diff --git a/drivers/bus/acpi/acpica/executer/exconfig.c
b/drivers/bus/acpi/acpica/executer/exconfig.c
index 713ded409d0..bb02a98c784 100644
--- a/drivers/bus/acpi/acpica/executer/exconfig.c
+++ b/drivers/bus/acpi/acpica/executer/exconfig.c
@@ -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))
{
diff --git a/drivers/bus/acpi/acpica/executer/excreate.c
b/drivers/bus/acpi/acpica/executer/excreate.c
index 816778a0d53..ecb381a0af9 100644
--- a/drivers/bus/acpi/acpica/executer/excreate.c
+++ b/drivers/bus/acpi/acpica/executer/excreate.c
@@ -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 &=
diff --git a/drivers/bus/acpi/acpica/executer/exfield.c
b/drivers/bus/acpi/acpica/executer/exfield.c
index 8129e222f77..c4a2f8ef6a2 100644
--- a/drivers/bus/acpi/acpica/executer/exfield.c
+++ b/drivers/bus/acpi/acpica/executer/exfield.c
@@ -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 */
diff --git a/drivers/bus/acpi/acpica/executer/exoparg1.c
b/drivers/bus/acpi/acpica/executer/exoparg1.c
index 902b8510f4b..a94cf134db6 100644
--- a/drivers/bus/acpi/acpica/executer/exoparg1.c
+++ b/drivers/bus/acpi/acpica/executer/exoparg1.c
@@ -1085,7 +1085,7 @@ AcpiExOpcode_1A_0T_1R (
WalkState, ReturnDesc, &TempDesc);
if (ACPI_FAILURE (Status))
{
- goto Cleanup;
+ return_ACPI_STATUS (Status);
}
ReturnDesc = TempDesc;
diff --git a/drivers/bus/acpi/acpica/executer/exregion.c
b/drivers/bus/acpi/acpica/executer/exregion.c
index b7e50e35ecb..1e6c910f30f 100644
--- a/drivers/bus/acpi/acpica/executer/exregion.c
+++ b/drivers/bus/acpi/acpica/executer/exregion.c
@@ -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:
diff --git a/drivers/bus/acpi/acpica/hardware/hwesleep.c
b/drivers/bus/acpi/acpica/hardware/hwesleep.c
index 6ec0397d2e8..200543b1dc2 100644
--- a/drivers/bus/acpi/acpica/hardware/hwesleep.c
+++ b/drivers/bus/acpi/acpica/hardware/hwesleep.c
@@ -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)
diff --git a/drivers/bus/acpi/acpica/hardware/hwsleep.c
b/drivers/bus/acpi/acpica/hardware/hwsleep.c
index 22b380fb255..e3ff1233a3c 100644
--- a/drivers/bus/acpi/acpica/hardware/hwsleep.c
+++ b/drivers/bus/acpi/acpica/hardware/hwsleep.c
@@ -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 */
diff --git a/drivers/bus/acpi/acpica/hardware/hwxfsleep.c
b/drivers/bus/acpi/acpica/hardware/hwxfsleep.c
index 6fcbd74743f..d336340ba5d 100644
--- a/drivers/bus/acpi/acpica/hardware/hwxfsleep.c
+++ b/drivers/bus/acpi/acpica/hardware/hwxfsleep.c
@@ -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))
diff --git a/drivers/bus/acpi/acpica/include/acdisasm.h
b/drivers/bus/acpi/acpica/include/acdisasm.h
index 5f3e7569e39..54fc4b8f234 100644
--- a/drivers/bus/acpi/acpica/include/acdisasm.h
+++ b/drivers/bus/acpi/acpica/include/acdisasm.h
@@ -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);
diff --git a/drivers/bus/acpi/acpica/include/acevents.h
b/drivers/bus/acpi/acpica/include/acevents.h
index 87915e5eea7..095a973e994 100644
--- a/drivers/bus/acpi/acpica/include/acevents.h
+++ b/drivers/bus/acpi/acpica/include/acevents.h
@@ -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,
diff --git a/drivers/bus/acpi/acpica/include/acobject.h
b/drivers/bus/acpi/acpica/include/acobject.h
index ed4d9628d5e..1a6567b6472 100644
--- a/drivers/bus/acpi/acpica/include/acobject.h
+++ b/drivers/bus/acpi/acpica/include/acobject.h
@@ -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;
diff --git a/drivers/bus/acpi/acpica/include/acpixf.h
b/drivers/bus/acpi/acpica/include/acpixf.h
index a3e5af9f443..f92c6662fd0 100644
--- a/drivers/bus/acpi/acpica/include/acpixf.h
+++ b/drivers/bus/acpi/acpica/include/acpixf.h
@@ -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
diff --git a/drivers/bus/acpi/acpica/include/actables.h
b/drivers/bus/acpi/acpica/include/actables.h
index 8a861b4ac69..4b3dbd6d257 100644
--- a/drivers/bus/acpi/acpica/include/actables.h
+++ b/drivers/bus/acpi/acpica/include/actables.h
@@ -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);
diff --git a/drivers/bus/acpi/acpica/include/actbinfo.h
b/drivers/bus/acpi/acpica/include/actbinfo.h
index cb321d1b6f2..423a9401650 100644
--- a/drivers/bus/acpi/acpica/include/actbinfo.h
+++ b/drivers/bus/acpi/acpica/include/actbinfo.h
@@ -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)
diff --git a/drivers/bus/acpi/acpica/include/actbl2.h
b/drivers/bus/acpi/acpica/include/actbl2.h
index 97b13fcb996..84d303ccd73 100644
--- a/drivers/bus/acpi/acpica/include/actbl2.h
+++ b/drivers/bus/acpi/acpica/include/actbl2.h
@@ -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;
-/* Values for Config Type above */
+/* Capabilities = 3 */
+
+typedef struct acpi_nhlt_device_specific_config_d
+{
+ UINT8 VirtualSlot;
+ UINT8 ConfigType;
+ UINT8 ArrayType;
-#define ACPI_NHLT_TYPE_MIC_ARRAY 0x01
-#define ACPI_NHLT_TYPE_GENERIC 0x00
+} ACPI_NHLT_DEVICE_SPECIFIC_CONFIG_D;
-/* Mask for Extension field of ArrayType */
+/* Values for Config Type above */
+
+#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 */
-#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 ACPI_NHLT_NO_EXTENSION 0x0
+#define ACPI_NHLT_MIC_SNR_SENSITIVITY_EXT (1<<4)
-#define NO_EXTENSION 0x0
-#define MIC_SNR_SENSITIVITY_EXT 0x1
+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()
diff --git a/drivers/bus/acpi/acpica/include/actypes.h
b/drivers/bus/acpi/acpica/include/actypes.h
index c68ba3526ad..0ecd7bdcf76 100644
--- a/drivers/bus/acpi/acpica/include/actypes.h
+++ b/drivers/bus/acpi/acpica/include/actypes.h
@@ -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
diff --git a/drivers/bus/acpi/acpica/tables/tbdata.c
b/drivers/bus/acpi/acpica/tables/tbdata.c
index 947329a7319..a628192914d 100644
--- a/drivers/bus/acpi/acpica/tables/tbdata.c
+++ b/drivers/bus/acpi/acpica/tables/tbdata.c
@@ -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))
{
diff --git a/drivers/bus/acpi/acpica/tables/tbfadt.c
b/drivers/bus/acpi/acpica/tables/tbfadt.c
index e08f3002748..490c2c9a112 100644
--- a/drivers/bus/acpi/acpica/tables/tbfadt.c
+++ b/drivers/bus/acpi/acpica/tables/tbfadt.c
@@ -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);
}
}
diff --git a/drivers/bus/acpi/acpica/tables/tbinstal.c
b/drivers/bus/acpi/acpica/tables/tbinstal.c
index 88be506c950..bba2a48f2f4 100644
--- a/drivers/bus/acpi/acpica/tables/tbinstal.c
+++ b/drivers/bus/acpi/acpica/tables/tbinstal.c
@@ -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);
diff --git a/drivers/bus/acpi/acpica/tables/tbprint.c
b/drivers/bus/acpi/acpica/tables/tbprint.c
index 53372f40b4e..776f3c4fb58 100644
--- a/drivers/bus/acpi/acpica/tables/tbprint.c
+++ b/drivers/bus/acpi/acpica/tables/tbprint.c
@@ -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 */
diff --git a/drivers/bus/acpi/acpica/tables/tbutils.c
b/drivers/bus/acpi/acpica/tables/tbutils.c
index 959f853fd7f..d1d9aec1fde 100644
--- a/drivers/bus/acpi/acpica/tables/tbutils.c
+++ b/drivers/bus/acpi/acpica/tables/tbutils.c
@@ -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 (
diff --git a/drivers/bus/acpi/acpica/tables/tbxfload.c
b/drivers/bus/acpi/acpica/tables/tbxfload.c
index 9facdaf8f1a..26a8af45088 100644
--- a/drivers/bus/acpi/acpica/tables/tbxfload.c
+++ b/drivers/bus/acpi/acpica/tables/tbxfload.c
@@ -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;
diff --git a/drivers/bus/acpi/acpica/utilities/utdelete.c
b/drivers/bus/acpi/acpica/utilities/utdelete.c
index 43983691b86..fbeb6b54c3d 100644
--- a/drivers/bus/acpi/acpica/utilities/utdelete.c
+++ b/drivers/bus/acpi/acpica/utilities/utdelete.c
@@ -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,
diff --git a/media/doc/3rd Party Files.txt b/media/doc/3rd Party Files.txt
index 8dc78f50315..2e1ef41ea67 100644
--- a/media/doc/3rd Party Files.txt
+++ b/media/doc/3rd Party Files.txt
@@ -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/