Skip to content

Commit

Permalink
ACPICA: Add error msg for Index/Bank field registers out-of-range
Browse files Browse the repository at this point in the history
Supplement the exception code with an actual message.

Found during ACPICA debugging.

Signed-off-by: Bob Moore <robert.moore@intel.com>
Signed-off-by: Lin Ming <ming.m.lin@intel.com>
Signed-off-by: Len Brown <len.brown@intel.com>
  • Loading branch information
Bob Moore authored and Len Brown committed Jan 17, 2012
1 parent 8519bc9 commit 46dfb09
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions drivers/acpi/acpica/exfldio.c
Original file line number Diff line number Diff line change
Expand Up @@ -316,6 +316,7 @@ acpi_ex_access_region(union acpi_operand_object *obj_desc,
static u8
acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value)
{
ACPI_FUNCTION_NAME(ex_register_overflow);

if (obj_desc->common_field.bit_length >= ACPI_INTEGER_BIT_SIZE) {
/*
Expand All @@ -330,6 +331,11 @@ acpi_ex_register_overflow(union acpi_operand_object *obj_desc, u64 value)
* 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),
obj_desc->common_field.bit_length));

return (TRUE);
}

Expand Down

0 comments on commit 46dfb09

Please sign in to comment.