From owner-freebsd-new-bus Sat Mar 18 23:53:10 2000 Delivered-To: freebsd-new-bus@freebsd.org Received: from cs.rpi.edu (mumble.cs.rpi.edu [128.213.8.16]) by hub.freebsd.org (Postfix) with ESMTP id ED1A237B5E4 for ; Sat, 18 Mar 2000 23:53:07 -0800 (PST) (envelope-from crossd@cs.rpi.edu) Received: from cs.rpi.edu (monica.cs.rpi.edu [128.213.7.2]) by cs.rpi.edu (8.9.3/8.9.3) with ESMTP id CAA56296; Sun, 19 Mar 2000 02:53:06 -0500 (EST) Message-Id: <200003190753.CAA56296@cs.rpi.edu> To: freebsd-new-bus@freebsd.org Cc: crossd@cs.rpi.edu Subject: when is dinfo instantiated? Date: Sun, 19 Mar 2000 02:53:05 -0500 From: "David E. Cross" Sender: owner-freebsd-new-bus@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG 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