diff options
author | Bob Moore <robert.moore@intel.com> | 2008-11-12 02:15:29 -0500 |
---|---|---|
committer | Len Brown <len.brown@intel.com> | 2008-12-29 22:38:36 -0500 |
commit | fc37445733aeae4fd1a20385850620354263b1d5 (patch) | |
tree | a989d6bf8dcc2011f25e365532c3855a48f11c62 /include/acpi/acexcep.h | |
parent | 96411a630412f057d365aa1e9de7d23c069d627a (diff) |
ACPICA: Add a mechanism to escape infinite AML While() loops
Add a loop counter to force exit from AML While loops if the
count becomes too large. This can occur in poorly written AML
when the hardware does not respond within a while loop and the
loop does not implement a timeout. The maximum loop count is
configurable. A new exception code is returned when a loop is
broken, AE_AML_INFINITE_LOOP. Bob Moore, Alexey Starikovskiy.
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>
Diffstat (limited to 'include/acpi/acexcep.h')
-rw-r--r-- | include/acpi/acexcep.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/include/acpi/acexcep.h b/include/acpi/acexcep.h index 84f5cb242863..a1ae1057d2ef 100644 --- a/include/acpi/acexcep.h +++ b/include/acpi/acexcep.h | |||
@@ -153,8 +153,9 @@ | |||
153 | #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML) | 153 | #define AE_AML_CIRCULAR_REFERENCE (acpi_status) (0x001E | AE_CODE_AML) |
154 | #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML) | 154 | #define AE_AML_BAD_RESOURCE_LENGTH (acpi_status) (0x001F | AE_CODE_AML) |
155 | #define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML) | 155 | #define AE_AML_ILLEGAL_ADDRESS (acpi_status) (0x0020 | AE_CODE_AML) |
156 | #define AE_AML_INFINITE_LOOP (acpi_status) (0x0021 | AE_CODE_AML) | ||
156 | 157 | ||
157 | #define AE_CODE_AML_MAX 0x0020 | 158 | #define AE_CODE_AML_MAX 0x0021 |
158 | 159 | ||
159 | /* | 160 | /* |
160 | * Internal exceptions used for control | 161 | * Internal exceptions used for control |
@@ -267,6 +268,7 @@ char const *acpi_gbl_exception_names_aml[] = { | |||
267 | "AE_AML_CIRCULAR_REFERENCE", | 268 | "AE_AML_CIRCULAR_REFERENCE", |
268 | "AE_AML_BAD_RESOURCE_LENGTH", | 269 | "AE_AML_BAD_RESOURCE_LENGTH", |
269 | "AE_AML_ILLEGAL_ADDRESS", | 270 | "AE_AML_ILLEGAL_ADDRESS", |
271 | "AE_AML_INFINITE_LOOP" | ||
270 | }; | 272 | }; |
271 | 273 | ||
272 | char const *acpi_gbl_exception_names_ctrl[] = { | 274 | char const *acpi_gbl_exception_names_ctrl[] = { |