diff options
Diffstat (limited to 'source/components/dispatcher/dsopcode.c')
| -rw-r--r-- | source/components/dispatcher/dsopcode.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/source/components/dispatcher/dsopcode.c b/source/components/dispatcher/dsopcode.c index 8b9a30aa76c3..acf1ff4e1d19 100644 --- a/source/components/dispatcher/dsopcode.c +++ b/source/components/dispatcher/dsopcode.c @@ -521,6 +521,7 @@ AcpiDsEvalRegionOperands ( ACPI_OPERAND_OBJECT *OperandDesc; ACPI_NAMESPACE_NODE *Node; ACPI_PARSE_OBJECT *NextOp; + ACPI_ADR_SPACE_TYPE SpaceId; ACPI_FUNCTION_TRACE_PTR (DsEvalRegionOperands, Op); @@ -530,11 +531,12 @@ AcpiDsEvalRegionOperands ( * This is where we evaluate the address and length fields of the * OpRegion declaration */ - Node = Op->Common.Node; + Node = Op->Common.Node; /* NextOp points to the op that holds the SpaceID */ NextOp = Op->Common.Value.Arg; + SpaceId = (ACPI_ADR_SPACE_TYPE) NextOp->Common.Value.Integer; /* NextOp points to address op */ @@ -572,6 +574,15 @@ AcpiDsEvalRegionOperands ( ObjDesc->Region.Length = (UINT32) OperandDesc->Integer.Value; AcpiUtRemoveReference (OperandDesc); + /* A zero-length operation region is unusable. Just warn */ + + if (!ObjDesc->Region.Length && (SpaceId < ACPI_NUM_PREDEFINED_REGIONS)) + { + ACPI_WARNING ((AE_INFO, + "Operation Region [%4.4s] has zero length (SpaceId %X)", + Node->Name.Ascii, SpaceId)); + } + /* * Get the address and save it * (at top of stack - 1) |
