aboutsummaryrefslogtreecommitdiff
path: root/executer/exfldio.c
diff options
context:
space:
mode:
authorJung-uk Kim <jkim@FreeBSD.org>2011-11-23 18:05:37 +0000
committerJung-uk Kim <jkim@FreeBSD.org>2011-11-23 18:05:37 +0000
commit50796274dc74454ca64a6e120552adb2620c3e65 (patch)
tree91526f3e19920a98573c3d04bbef39cd71a7c0ce /executer/exfldio.c
parent33c583d0c71a12a703f849679505114e27bba011 (diff)
downloadsrc-50796274dc74454ca64a6e120552adb2620c3e65.tar.gz
src-50796274dc74454ca64a6e120552adb2620c3e65.zip
Import ACPICA 20111123.vendor/acpica/20111123
Notes
Notes: svn path=/vendor-sys/acpica/dist/; revision=227896 svn path=/vendor-sys/acpica/20111123/; revision=227897; tag=vendor/acpica/20111123
Diffstat (limited to 'executer/exfldio.c')
-rw-r--r--executer/exfldio.c28
1 files changed, 24 insertions, 4 deletions
diff --git a/executer/exfldio.c b/executer/exfldio.c
index bf663a2f5ecc..a4a884645506 100644
--- a/executer/exfldio.c
+++ b/executer/exfldio.c
@@ -98,6 +98,7 @@ AcpiExSetupRegion (
{
ACPI_STATUS Status = AE_OK;
ACPI_OPERAND_OBJECT *RgnDesc;
+ UINT8 SpaceId;
ACPI_FUNCTION_TRACE_U32 (ExSetupRegion, FieldDatumByteOffset);
@@ -116,6 +117,16 @@ AcpiExSetupRegion (
return_ACPI_STATUS (AE_AML_OPERAND_TYPE);
}
+ SpaceId = RgnDesc->Region.SpaceId;
+
+ /* Validate the Space ID */
+
+ if (!AcpiIsValidSpaceId (SpaceId))
+ {
+ ACPI_ERROR ((AE_INFO, "Invalid/unknown Address Space ID: 0x%2.2X", SpaceId));
+ return_ACPI_STATUS (AE_AML_INVALID_SPACE_ID);
+ }
+
/*
* If the Region Address and Length have not been previously evaluated,
* evaluate them now and save the results.
@@ -130,11 +141,12 @@ AcpiExSetupRegion (
}
/*
- * Exit now for SMBus or IPMI address space, it has a non-linear
+ * Exit now for SMBus, GSBus or IPMI address space, it has a non-linear
* address space and the request cannot be directly validated
*/
- if (RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_SMBUS ||
- RgnDesc->Region.SpaceId == ACPI_ADR_SPACE_IPMI)
+ if (SpaceId == ACPI_ADR_SPACE_SMBUS ||
+ SpaceId == ACPI_ADR_SPACE_GSBUS ||
+ SpaceId == ACPI_ADR_SPACE_IPMI)
{
/* SMBus or IPMI has a non-linear address space */
@@ -290,7 +302,8 @@ AcpiExAccessRegion (
/* Invoke the appropriate AddressSpace/OpRegion handler */
- Status = AcpiEvAddressSpaceDispatch (RgnDesc, Function, RegionOffset,
+ Status = AcpiEvAddressSpaceDispatch (RgnDesc, ObjDesc,
+ Function, RegionOffset,
ACPI_MUL_8 (ObjDesc->CommonField.AccessByteWidth), Value);
if (ACPI_FAILURE (Status))
@@ -337,6 +350,8 @@ AcpiExRegisterOverflow (
ACPI_OPERAND_OBJECT *ObjDesc,
UINT64 Value)
{
+ ACPI_FUNCTION_NAME (ExRegisterOverflow);
+
if (ObjDesc->CommonField.BitLength >= ACPI_INTEGER_BIT_SIZE)
{
@@ -353,6 +368,11 @@ AcpiExRegisterOverflow (
* The Value is larger than the maximum value that can fit into
* the register.
*/
+ ACPI_ERROR ((AE_INFO,
+ "Index value 0x%8.8X%8.8X overflows field width 0x%X",
+ ACPI_FORMAT_UINT64 (Value),
+ ObjDesc->CommonField.BitLength));
+
return (TRUE);
}