Date: Wed, 20 Dec 2000 21:52:55 -0800 From: Mike Smith <msmith@freebsd.org> To: Nicolas Souchu <nsouch@alcove.fr> Cc: hackers@freebsd.org Subject: Re: newbus question Message-ID: <200012210552.eBL5qtc00510@mass.osd.bsdi.com> In-Reply-To: Your message of "Wed, 20 Dec 2000 17:42:37 %2B0100." <20001220174237.A18944@wiliam.alcove-int>
next in thread | previous in thread | raw e-mail | index | archive | help
> > I have to add specific initialisation to the ISA emulation of > a graphic PCI card. > > It principle, this should be triggered by the PCI detection of the card, > but I can't access the VGA address range before the vga isa driver > is initialised. > > How could this be done? With newbus? I think so. I may not be understanding you correctly here though. > If the vga driver was newbusified, should I attach my graphic card specific > driver to both the pci bus and the vga generic driver and let it > be initialised twice with two initialisation functions and only one > softc structure? No, I don't think so. If I understand what you're talking about, you want to add some extra initialisation for a specific but otherwise standard PCI VGA card, and you want to do this with a device driver which "owns" the card. The best way I can think of doing this is as follows: - Your driver should determine whether the VGA adapter is the "primary" adapter. Working this out may be a little tricky. - In your attach routine (not in the probe routine, since you may not actually win the probe bidding), add extra resources to the device_t which match the "legacy" VGA resources, so that you claim exclusive ownership of these resources. You can do this with bus_set_resource. I hope this helps. Mike -- ... every activity meets with opposition, everyone who acts has his rivals and unfortunately opponents also. But not because people want to be opponents, rather because the tasks and relationships force people to take different points of view. [Dr. Fritz Todt] V I C T O R Y N O T V E N G E A N C E To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200012210552.eBL5qtc00510>