From owner-freebsd-current Thu Jul 4 6:10:46 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4C9CF37B400 for ; Thu, 4 Jul 2002 06:10:42 -0700 (PDT) Received: from tasogare.imasy.or.jp (tasogare.imasy.or.jp [202.227.24.5]) by mx1.FreeBSD.org (Postfix) with ESMTP id 90E4743E31 for ; Thu, 4 Jul 2002 06:10:38 -0700 (PDT) (envelope-from iwasaki@jp.FreeBSD.org) Received: from localhost (iwa@tasogare.imasy.or.jp [202.227.24.5]) by tasogare.imasy.or.jp (8.11.6+3.4W/8.11.6/tasogare) with ESMTP/inet id g64DAIZ08868; Thu, 4 Jul 2002 22:10:20 +0900 (JST) (envelope-from iwasaki@jp.FreeBSD.org) Date: Thu, 04 Jul 2002 22:09:52 +0900 (JST) Message-Id: <20020704.220952.104026566.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 From: Mitsuru IWASAKI 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> X-Mailer: Mew version 2.1 on Emacs 20.7 / Mule 4.0 (HANANOEN) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG 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: 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