Date: Sun, 19 Mar 2000 17:44:34 +0000 (GMT) From: Doug Rabson <dfr@nlsystems.com> To: "David E. Cross" <crossd@cs.rpi.edu> Cc: freebsd-new-bus@freebsd.org Subject: Re: when is dinfo instantiated? Message-ID: <Pine.BSF.4.21.0003191744030.66122-100000@salmon.nlsystems.com> In-Reply-To: <200003190753.CAA56296@cs.rpi.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 19 Mar 2000, David E. Cross wrote: > I am writing resource reservation and allocation code for PCI buses. > > What I am currently doing is hooking into pci_attach() in sys/pci/pci.c > (new function by my creation). It gets the softc for this instance of the > pci bus (again, my modification). In this softc it stores a resource list > of all of the resources that are allocated to the bridge. This currently > is membase, memlimit, iobase, iolimit, secondary bus, and subordinate > bus. Then as each child on the bus is probed its resource allocations > are marked 'in use' in the parent's softc, any children with invalid, or > unallocated resources may then be filled in dynamically. > > The problem that I am having is that 'device_get_ivars(dev);' in the > 'pci_attach()' function is returning NULL. Going through the code it > appears that pci_new_probe() should take care of this. That is, the > parent of the current bus (and all buses have parents, right?) should set > that structure correctly? Apparently not. What am I missing? This structure should be created by pci_readcfg which is called from pci_add_children. -- Doug Rabson Mail: dfr@nlsystems.com Nonlinear Systems Ltd. Phone: +44 181 442 9037 To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-new-bus" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.4.21.0003191744030.66122-100000>