Skip to contentSkip to conversation

Add CONFIG_ACPI_RELAXED_AML option

PATCH New NoZizzing OrDripping 1 participant 1 message Dec 13, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Add CONFIG_ACPI_RELAXED_AML option

The patch adds a new configuration option, CONFIG_ACPI_RELAXED_AML. When turned on, the ACPI code will become forgiving of minor errors in the AML code.

For this first cut, the patch and option will ignore region size errors. An off-by-one error is often found in the AML shipped with Toshiba laptops, even new models. This minor error prevents the AC module from operating without this patch.

I urge the adoption of this patch (or something similar) into the ACPI code. This will make it much easier to install and proliferate Linux on a large category of laptops.

Rick Richardson [email protected] [Sorry, have to use my Yahoo account to post to this list)

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

Documentation/Configure.help +8 -0
diff -u -r linux-2.4.20+acpi-20021205/Documentation/Configure.help linux-2.4.20+acpi-20021205+rick/Documentation/Configure.help
@@ -18406,6 +18406,14 @@
   of verbosity. Saying Y enables these statements. This will increase
   your kernel size by around 50K.
 
+ACPI Relaxed AML Checking
+CONFIG_ACPI_RELAXED_AML
+  If you say `Y' here, the ACPI interpreter will relax its checking
+  for valid AML and will ignore some AML mistakes, such as off-by-one
+  errors in region sizes.  Some laptps may require this option.  In
+  particular, many Toshiba laptops require this for correct operation
+  of the AC module.
+
 ACPI Bus Manager
 CONFIG_ACPI_BUSMGR
   The ACPI Bus Manager enumerates devices in the ACPI namespace, and
drivers/acpi/Config.in +1 -0
diff -u -r linux-2.4.20+acpi-20021205/drivers/acpi/Config.in linux-2.4.20+acpi-20021205+rick/drivers/acpi/Config.in
@@ -36,6 +36,7 @@
       fi
       tristate     '  Toshiba Laptop Extras'	CONFIG_ACPI_TOSHIBA
       bool         '  Debug Statements'	CONFIG_ACPI_DEBUG
+      bool         '  Relaxed AML Checking'	CONFIG_ACPI_RELAXED_AML
     fi
   fi
 
drivers/acpi/executer/exfldio.c +5 -1
diff -u -r linux-2.4.20+acpi-20021205/drivers/acpi/executer/exfldio.c linux-2.4.20+acpi-20021205+rick/drivers/acpi/executer/exfldio.c
@@ -121,7 +121,11 @@
 			field_datum_byte_offset, obj_desc->common_field.access_byte_width,
 			rgn_desc->region.node->name.ascii, rgn_desc->region.length));
 
-		return_ACPI_STATUS (AE_AML_REGION_LIMIT);
+		#ifdef CONFIG_ACPI_RELAXED_AML
+			return_ACPI_STATUS (AE_OK);
+		#else
+			return_ACPI_STATUS (AE_AML_REGION_LIMIT);
+		#endif
 	}
 
 	return_ACPI_STATUS (AE_OK);