Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Jun 2004 14:52:30 -0600 (MDT)
From:      "M. Warner Losh" <imp@bsdimp.com>
To:        nate@root.org
Cc:        jhb@FreeBSD.ORG
Subject:   Re: Patch: Defer bus_config_intr() until bus_alloc_resource()..
Message-ID:  <20040603.145230.13772293.imp@bsdimp.com>
In-Reply-To: <20040603133254.N44646@root.org>
References:  <20040603104616.I43856@root.org> <20040603.121143.08320551.imp@bsdimp.com> <20040603133254.N44646@root.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In message: <20040603133254.N44646@root.org>
            Nate Lawson <nate@root.org> writes:
: On Thu, 3 Jun 2004, M. Warner Losh wrote:
: > In message: <20040603104616.I43856@root.org>
: >             Nate Lawson <nate@root.org> writes:
: > : With hotplug, we're going to need ways for a separate routine to set
: > : resource attributes before bus_alloc_resource() time.  Plus, you yourself
: > : are an advocate of a multi-pass probing approach that includes separating
: > : resource reservation from allocation.
: >
: > I don't understand this comment at all.  We already support two
: > different hot-plug technologies that allocate resources out of memory,
: > i/o and irq space.  This is done by the bus that knows what resources
: > the child needs before adding the child to the bus.
: 
: I don't have an example handy, but there are tables (SSDT) that can
: appear/disappear with device insertion and it would be helpful to be able
: to set up any resources described by them before device_attach() and alloc
: time.  I'm interested why bus_{get,set}_resource even exist if our plan
: all along was to defer all resource parsing to alloc time.

We already do that for pccard and cardbus.  We parse the CIS or frob
the BARs and allocate resources as appropriate.  Hot swap pci bridges
could do logically identical things when it detects a new device has
appeared.  Since there has to be some agent that adds the children,
that agent also is responsible for dealing with the resources that the
new, shiny device requires.

Warner



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