Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 04 Jul 2002 22:09:52 +0900 (JST)
From:      Mitsuru IWASAKI <iwasaki@jp.FreeBSD.org>
To:        shizukakudo_99@yahoo.com
Cc:        freebsd-current@freebsd.org, acpi-jp@jp.FreeBSD.org
Subject:   Re: [acpi-jp 1661] Re: ASUS CUSL2 panic on acpi
Message-ID:  <20020704.220952.104026566.iwasaki@jp.FreeBSD.org>
In-Reply-To: <20020704.120342.38720157.iwasaki@jp.FreeBSD.org>
References:  <20020702185518.87573.qmail@web11402.mail.yahoo.com> <20020703.142736.112630398.iwasaki@jp.FreeBSD.org> <20020704.120342.38720157.iwasaki@jp.FreeBSD.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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   CUSL2   > on 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 0xfffff, 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 majordomo@FreeBSD.org
with "unsubscribe freebsd-current" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020704.220952.104026566.iwasaki>