Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 18 Sep 2001 22:03:45 -0700 (PDT)
From:      TOMITA Yoshinori <yoshint@flab.fujitsu.co.jp>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   kern/30665: acpi_ec driver does not release its resources when it fails to attach
Message-ID:  <200109190503.f8J53j859388@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         30665
>Category:       kern
>Synopsis:       acpi_ec driver does not release its resources when it fails to attach
>Confidential:   no
>Severity:       critical
>Priority:       high
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Sep 18 22:10:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     TOMITA Yoshinori
>Release:        5.0-CURRENT 2001/Sep/11
>Organization:
F
>Environment:
FreeBSD yue 5.0-CURRENT-20010911-JPSNAP FreeBSD 5.0-CURRENT-20010911-JPSNAP #0: Tue Sep 18 20:06:43 JST 2001     root@yue:/usr/src/sys/i386/compile/Yue  i386
>Description:
(Problem 1)
kernel crashes in the function 
AcpiExTruncateFor32bitTable() in boot time.
# This is probably nothing to do with acpi_ec driver.

>   .
>   .
>   .
>
>How-To-Repeat:
On notebook PC, FUJITSU FMV-BIBLO MC4/45C,
Install FreeBSD 5.0-CURRENT after 2001/Sep, where ACPI module is loaded from the first.

>Fix:
For problem 1,
here is patch for /usr/src/sys/contrib/dev/acpica

--- exutils.c.bak       Tue Sep 18 21:11:11 2001
+++ exutils.c   Tue Sep 18 21:12:15 2001
@@ -261,6 +261,7 @@
      */
     if ((!ObjDesc) ||
         (ObjDesc->Common.Type != ACPI_TYPE_INTEGER) ||
+       (!WalkState) ||
         (!WalkState->MethodNode))
     {
         return;

>Release-Note:
>Audit-Trail:
>Unformatted:
 >acpi_button0: <Power Button> on acpi0
 >acpi_acad0: <AC adapter> on acpi0
 >
 >
 >Fatal trap 12: page fault while in kernel mode
 >fault virtual address   = 0x40
 >fault code              = supervisor read, page not present
 >instruction pointer     = 0x8:0xc0498de7
 >stack pointer           = 0x10:0xc04e1d18
 >frame pointer           = 0x10:0xc04e1d18
 >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      AcpiExTruncateFor32bitTable+0x13:      cmpl   $0,0x40(%eax)
 >
 
 and register value of eax was 0.
 
 
 
 
 
 (Problem 2)
 
 kernel crashes while probing acpi_ec.
 
 >   .
 >   .
 >   .
 > acpi_button0: <Power Button> on acpi0
 > acpi_acad0: <AC adapter> on acpi0
 > acpi_cmbat0: <Control method Battery> on acpi0
 > acpi_lid0: <Control Method Lid Switch> on acpi0
 > acpi_ec0: <embeded controller> port 0x66,0x62 on acpi0
 > acpi_ec0: can't install GPE handler for \_SB_.PCI0.EIO_.EC__ - AE_EXIST
 > deveice_prove_and_attach: acpi_ec0 attach returned 6
 > sio0: irq maps: 0x1 0x1 0x1 0x1
 > sio0: probe failed test(0): 0 2 4 6 9
 > sio0: irq maps: 0x1 0x1 0x1 0x1
 > sio0: probe failed test(0): 0 2 4 6 9
 > acpi_ec0: <embedded controller> port 0x66,0x62 on acpi0
 > panic: resource_list_alloc: resource entry is busy
 > Debugger("panic")
 > Stopped at      Debugger+0x45:  pushl  %ebx
 > db>
 
 I asked about this in acpi-jp mailing list and Mr Mike said:
 
    This is my fault; the acpi_ec driver does not release its resources
    when it fails to attach.  Due to some bad magic, we have to probe
    ACPI children twice, so when it tries to attach again, we run into
    a bug in the resource list code (it should just fail, not panic).
 
 and advised me to file a PR.
 
 

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-bugs" in the body of the message




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