diff options
Diffstat (limited to 'executer/exfldio.c')
-rw-r--r-- | executer/exfldio.c | 28 |
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); } |