Date: Sun, 19 Mar 2000 02:53:05 -0500 From: "David E. Cross" <crossd@cs.rpi.edu> To: freebsd-new-bus@freebsd.org Cc: crossd@cs.rpi.edu Subject: when is dinfo instantiated? Message-ID: <200003190753.CAA56296@cs.rpi.edu>
next in thread | raw e-mail | index | archive | help
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? -- David Cross | email: crossd@cs.rpi.edu Acting Lab Director | NYSLP: FREEBSD Systems Administrator/Research Programmer | Web: http://www.cs.rpi.edu/~crossd Rensselaer Polytechnic Institute, | Ph: 518.276.2860 Department of Computer Science | Fax: 518.276.4033 I speak only for myself. | WinNT:Linux::Linux:FreeBSD 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?200003190753.CAA56296>