From 754171ae60abbbd707ed8d449f07ef38f596bd22 Mon Sep 17 00:00:00 2001 From: Jung-uk Kim Date: Thu, 11 Sep 2014 21:38:09 +0000 Subject: Import ACPICA 20140828. --- source/compiler/aslresource.c | 34 +++++++++++++++++----------------- 1 file changed, 17 insertions(+), 17 deletions(-) (limited to 'source/compiler/aslresource.c') diff --git a/source/compiler/aslresource.c b/source/compiler/aslresource.c index ce2c4b5c8804..f123990cc233 100644 --- a/source/compiler/aslresource.c +++ b/source/compiler/aslresource.c @@ -41,7 +41,6 @@ * POSSIBILITY OF SUCH DAMAGES. */ - #include "aslcompiler.h" #include "aslcompiler.y.h" #include "amlcode.h" @@ -123,22 +122,10 @@ RsSmallAddressCheck ( return; } - /* Special case for Memory24, values are compressed */ - - if (Type == ACPI_RESOURCE_NAME_MEMORY24) - { - if (!Alignment) /* Alignment==0 means 64K - no invalid alignment */ - { - Alignment = ACPI_UINT16_MAX + 1; - } - - Minimum <<= 8; - Maximum <<= 8; - Length *= 256; - } - - /* IO descriptor has different definition of min/max, don't check */ - + /* + * Range checks for Memory24 and Memory32. + * IO descriptor has different definition of min/max, don't check. + */ if (Type != ACPI_RESOURCE_NAME_IO) { /* Basic checks on Min/Max/Length */ @@ -151,6 +138,19 @@ RsSmallAddressCheck ( { AslError (ASL_ERROR, ASL_MSG_INVALID_LENGTH, LengthOp, NULL); } + + /* Special case for Memory24, min/max values are compressed */ + + if (Type == ACPI_RESOURCE_NAME_MEMORY24) + { + if (!Alignment) /* Alignment==0 means 64K alignment */ + { + Alignment = ACPI_UINT16_MAX + 1; + } + + Minimum <<= 8; + Maximum <<= 8; + } } /* Alignment of zero is not in ACPI spec, but is used to mean byte acc */ -- cgit v1.2.3