summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Moore <Robert.Moore@intel.com>2022-08-18 08:26:20 -0700
committerGitHub <noreply@github.com>2022-08-18 08:26:20 -0700
commite77fa17c21d80fda4b856fcbfc9f4d36c02498b3 (patch)
tree0c73c4e2104ca275e2014d12b028e597e1d1c100
parentce8cf5750c06285b5a55a6f61fc3eaffe94c8006 (diff)
parentfad527b6e76babc7527c41325bfbef6bd1a1132b (diff)
downloadacpica-e77fa17c21d80fda4b856fcbfc9f4d36c02498b3.tar.gz
Merge pull request #782 from sudeep-holla/ffh_opregion
Add support for FFH Opregion special context data
-rw-r--r--source/components/events/evregion.c8
-rw-r--r--source/components/executer/exfield.c6
-rw-r--r--source/components/executer/exserial.c6
-rw-r--r--source/include/acconfig.h2
-rw-r--r--source/include/actypes.h6
5 files changed, 26 insertions, 2 deletions
diff --git a/source/components/events/evregion.c b/source/components/events/evregion.c
index 6cf77791f..fb0cc4361 100644
--- a/source/components/events/evregion.c
+++ b/source/components/events/evregion.c
@@ -329,6 +329,14 @@ AcpiEvAddressSpaceDispatch (
Ctx->SubspaceId = (UINT8) RegionObj->Region.Address;
}
+ if (RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE)
+ {
+ ACPI_FFH_INFO *Ctx = HandlerDesc->AddressSpace.Context;
+
+ Ctx->Length = RegionObj->Region.Length;
+ Ctx->Offset = 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/source/components/executer/exfield.c b/source/components/executer/exfield.c
index 2834e7b38..4175b8eed 100644
--- a/source/components/executer/exfield.c
+++ b/source/components/executer/exfield.c
@@ -296,7 +296,8 @@ AcpiExReadDataFromField (
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
- ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT))
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
{
/* SMBus, GSBus, IPMI serial */
@@ -469,7 +470,8 @@ AcpiExWriteDataToField (
(ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_GSBUS ||
ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_IPMI ||
- ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT))
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_PLATFORM_RT ||
+ ObjDesc->Field.RegionObj->Region.SpaceId == ACPI_ADR_SPACE_FIXED_HARDWARE))
{
/* SMBus, GSBus, IPMI serial */
diff --git a/source/components/executer/exserial.c b/source/components/executer/exserial.c
index 4dfd65992..c92a895ad 100644
--- a/source/components/executer/exserial.c
+++ b/source/components/executer/exserial.c
@@ -484,6 +484,12 @@ AcpiExWriteSerialBus (
Function = ACPI_WRITE;
break;
+ case ACPI_ADR_SPACE_FIXED_HARDWARE:
+
+ BufferLength = ACPI_FFH_INPUT_BUFFER_SIZE;
+ Function = ACPI_WRITE;
+ break;
+
default:
return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
}
diff --git a/source/include/acconfig.h b/source/include/acconfig.h
index 8ba7dc284..04f7f4f0c 100644
--- a/source/include/acconfig.h
+++ b/source/include/acconfig.h
@@ -335,6 +335,8 @@
#define ACPI_PRM_INPUT_BUFFER_SIZE 26
+#define ACPI_FFH_INPUT_BUFFER_SIZE 256
+
/* _SxD and _SxW control methods */
#define ACPI_NUM_SxD_METHODS 4
diff --git a/source/include/actypes.h b/source/include/actypes.h
index fff6c1659..92da002ab 100644
--- a/source/include/actypes.h
+++ b/source/include/actypes.h
@@ -1336,6 +1336,12 @@ typedef struct acpi_pcc_info {
UINT8 *InternalBuffer;
} ACPI_PCC_INFO;
+/* Special Context data for FFH Opregion (ACPI 6.5) */
+
+typedef struct acpi_ffh_info {
+ UINT64 Offset;
+ UINT64 Length;
+} ACPI_FFH_INFO;
typedef
ACPI_STATUS (*ACPI_ADR_SPACE_SETUP) (