Re: cvs commit: src/sys/dev/acpica acpi.c acpi_acad.c acpi_button.c acpi_resource.c acpivar.h

From: Nate Lawson <nate_at_root.org>
Date: Mon, 14 Jun 2004 14:16:27 -0700 (PDT)
On Mon, 14 Jun 2004, John Baldwin wrote:
> On Monday 14 June 2004 11:12 am, M. Warner Losh wrote:
> > : On Sun, 13 Jun 2004, Nate Lawson wrote:
> > : >   Modified files:
> > : >     sys/dev/acpica       acpi.c acpi_acad.c acpi_button.c
> > : >                          acpi_cmbat.c acpi_ec.c acpi_isab.c
> > : >                          acpi_lid.c acpi_pcib_acpi.c
> > : >                          acpi_resource.c acpivar.h
> > : >   Log:
> > : >   Add support to ACPI to manage its own resources.  Previously,
> > : > resource allocation was passed up to nexus.  Now, we probe sysresource
> > : > objects and manage the resources they describe in a local rman pool.
> > : > This helps devices which attach/detach varying resources (like the _CST
> > : > object) and module loads/unloads.  The allocation/release routines now
> > : > check to see if the resource is described in a child sysresource object
> > : > and if so, allocate from the local rman.  Sysresource objects add their
> > : > resources to the pool and reserve them upon boot.  This means
> > : > sysresources need to be probed before other ACPI devices.
> > :
> > : This has been tested for a little while but may cause some problems.  On
> > : my laptop, all devices work as before but I get this new output:
> > :
> > : unknown: <PNP0c01> can't assign resources (memory)
> > : unknown: <PNP0303> can't assign resources (port)
> > : unknown: <PNP0c02> can't assign resources (port)
> > : unknown: <INT0800> can't assign resources (memory)
> > : unknown: <PNP0c02> can't assign resources (memory)
> > : unknown: <IBM3780> can't assign resources (irq)
> > : unknown: <PNP0501> can't assign resources (port)
> > : unknown: <IBM0071> can't assign resources (port)
> > : unknown: <PNP0400> can't assign resources (port)
> > :
> > : These messages are wrong since the associated devices have already gotten
> > : their resources.  For instance, IBM3780 (psm0) has successfully gotten
> > : irq 12 so PnP ISA shouldn't be trying to probe it.  Here devinfo -r shows
> > : that it's fine:
> > :
> > :       psm0
> > :           Interrupt request lines:
> > :               0xc
> > :
> > : Perhaps someone more knowledgable with the isa code can help figure this
> > : out.
> >
> > I'll take a look as soon as I upgrade my laptop past these changes.
>
> This is the possible suspect:
>
> jhb         2004-06-10 20:43:04 UTC
>
>   FreeBSD src repository
>
>   Modified files:
>     sys/i386/acpica      acpi_machdep.c
>     sys/i386/i386        bios.c
>     sys/i386/include/pc  bios.h
>   Log:
>   - Use the correct devclass name ("acpi" vs "ACPI") to detect if acpi0 is
>     present and thus that the PnPBIOS probe should be skipped instead of
>     having ACPI zero out the PnPBIOStable pointer.
>   - Make the PnPBIOStable pointer static to i386/i386/bios.c now that that is
>     the only place it is used.
>
>   Revision  Changes    Path
>   1.21      +0 -6      src/sys/i386/acpica/acpi_machdep.c
>   1.67      +3 -2      src/sys/i386/i386/bios.c
>   1.17      +0 -1      src/sys/i386/include/pc/bios.h
>
> Note that it worked fine in my tests.  The devices you see are PnPBIOS devices
> so it seems the PnPBIOS device isn't properly bailing before adding new
> devices.  I'd try to make sure the code in bios.c does see the acpi0 device
> and return.

Ah.  Yes, that explains why I didn't see these warnings in my earlier
testing but once I merged in changes from -current and finalized testing,
they appeared.

I can't see how this check can work.  It's in the identify method and acpi
attaches its root device in an identify method.  So you can't be sure that
one runs before the other.  Additionally, getting the softc is
unnecessary.  The devclass_find() != NULL check should be sufficient.

-Nate
Received on Mon Jun 14 2004 - 19:17:15 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:37:57 UTC