Bug 1299 - [PATCH] Correct Stall semantics
Summary: [PATCH] Correct Stall semantics
Status: CLOSED CODE_FIX
Alias: None
Product: ACPI
Classification: Unclassified
Component: ACPICA-Core (show other bugs)
Hardware: i386 Linux
: P2 low
Assignee: Robert Moore
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-09-30 12:36 UTC by Nate Lawson
Modified: 2006-09-28 13:20 UTC (History)
1 user (show)

See Also:
Kernel Version: ?
Subsystem:
Regression: ---
Bisected commit-id:


Attachments

Description Nate Lawson 2003-09-30 12:36:22 UTC
Software Environment:  ACPI-CA
Problem Description:

The Stall() opcode in AML is specifically restricted to 100 microseconds max in
the spec.  Some AML vendors get Stall() and Sleep() mixed up and thus end up
with overly long Stalls.  For example,
   Stall(0x3e8)
is probably an attempt to sleep for a second.

The below patch does not attempt to fix this but does use the appropriate sleep
call in place of overly long stalls.  It also removes some redundant code.

http://www.root.org/~nate/acpi/exsystem.diff
Comment 1 Nate Lawson 2003-11-05 12:54:18 UTC
I believe Len said he would change this to Stall for up to 255 microseconds,
call Sleep otherwise.
Comment 2 Robert Moore 2003-11-14 11:45:24 UTC
Stalls up to 255 accepted by the iASL compiler and AML interpreter.  Error if 
>255, don't convert stall to a sleep.
Comment 3 Nate Lawson 2003-11-18 12:44:33 UTC
Thanks, for reference here was Bob's original email:

Subject: RE: [PATCH] Stall semantics
From: "Moore, Robert"
Date: Fri, 3 Oct 2003 13:23:29 -0700
Cc: acpi-devel@lists.sourceforge.net

Here's what the MS interpreter does for Stall(n);

1) If n <= 255 (MAX_BYTE), perform the stall.
2) If n > 255, throw an error and abort the control method.

In this case, I suggest that we simply duplicate the MS behavior, it
seems like a good compromise and also provides ACPI CA with exact
compatibility.

Bob

Note You need to log in before you can comment on or make changes to this bug.