Re: [acpi-jp 1661] Re: ASUS CUSL2 panic on acpi

2002-07-05 Thread Christian Brueffer

On Thu, Jul 04, 2002 at 10:09:52PM +0900, Mitsuru IWASAKI wrote:
 My analysis was finished.  Please try this patch.
 
 --- exfield.c-Thu Jul  4 21:54:24 2002
 +++ exfield.c Thu Jul  4 21:55:02 2002
 @@ -200,7 +200,7 @@
  /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
  
  IntegerSize = sizeof (ACPI_INTEGER);
 -if (WalkState-MethodNode-Flags  ANOBJ_DATA_WIDTH_32)
 +if (WalkState-MethodNode != NULL  WalkState-MethodNode-Flags  
ANOBJ_DATA_WIDTH_32)
  {
  /*
   * We are running a method that exists in a 32-bit ACPI table.
 

The patch works fine, thanks.

- Christian

-- 
http://www.unixpages.org[EMAIL PROTECTED]
GPG Pub-Key: www.unixpages.org/cbrueffer.asc
GPG Fingerprint: 0DB5 8563 2473 C72A A8D1  56EA DAD2 B05D 5F3C 3185
GPG Key ID : DAD2B05D5F3C3185

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message



Re: [acpi-jp 1661] Re: ASUS CUSL2 panic on acpi

2002-07-04 Thread Mitsuru IWASAKI

My analysis was finished.  Please try this patch.

--- exfield.c-  Thu Jul  4 21:54:24 2002
+++ exfield.c   Thu Jul  4 21:55:02 2002
@@ -200,7 +200,7 @@
 /* Handle both ACPI 1.0 and ACPI 2.0 Integer widths */
 
 IntegerSize = sizeof (ACPI_INTEGER);
-if (WalkState-MethodNode-Flags  ANOBJ_DATA_WIDTH_32)
+if (WalkState-MethodNode != NULL  WalkState-MethodNode-Flags  
+ANOBJ_DATA_WIDTH_32)
 {
 /*
  * We are running a method that exists in a 32-bit ACPI table.



BTW, this bug already fixed in 20020517 version.

   acpi0: ASUS   CUSL2on motherboard
   
   
   Fatal trap 12: page fault while in kernel mode
   fault virtual address   = 0x16
   fault code  = supervisor read, page not present
   instruction pointer = 0x8:0xc04f9aca
   stack pointer   = 0x10:0xc054ea14
   frame pointer   = 0x10:0xc054ea34
   code segment= base 0x0, limit 0xf, type 0x1b
   = DPL 0, pres 1, def32 1, gran 1
   processor eflags= interrupt enabled, resume, IOPL = 0
   current process = 0 (swapper)
   kernel: type 12 trap, code=0
   Stopped at  AcpiExReadDataFromField+0x5a:   movzbl  0x16(%eax),%eax
   db trace
   AcpiExReadDataFromField(c0f00400,c25da200,c054ea50,c25e50c0,0) at 
AcpiExReadDataFromField+0x5a
 
 # if my understanding on i386 asm is correct,
 I think this is at (exfield.c):
 203:if (WalkState-MethodNode-Flags  ANOBJ_DATA_WIDTH_32)
 where WalkState-MethodNode is NULL, this caused page fault.
 
 I'm waiting for further debug info. but I'll try to find where
 WalkState-MethodNode suppose to be set...

WalkState-MethodNode was initialized to NULL in AcpiDsInitAmlWalk()
which called by AcpiDsExecuteArguments().  AcpiExReadDataFromField()
assumes that WalkState-MethodNode always has a correct pointer.
That's the problem, I think.

ACPI_STATUS
AcpiDsExecuteArguments (
ACPI_NAMESPACE_NODE *Node,
ACPI_NAMESPACE_NODE *ScopeNode,
UINT32  AmlLength,
UINT8   *AmlStart)

...

Status = AcpiDsInitAmlWalk (WalkState, Op, NULL, AmlStart,
AmlLength, NULL, NULL, 3);
...

AcpiDsInitAmlWalk (
ACPI_WALK_STATE *WalkState,
ACPI_PARSE_OBJECT   *Op,
ACPI_NAMESPACE_NODE *MethodNode,
UINT8   *AmlStart,
UINT32  AmlLength,
ACPI_OPERAND_OBJECT **Params,
ACPI_OPERAND_OBJECT **ReturnObjDesc,
UINT32  PassNumber)

Thanks

To Unsubscribe: send mail to [EMAIL PROTECTED]
with unsubscribe freebsd-current in the body of the message