From owner-freebsd-hackers Wed Dec 20 21:42: 6 2000 From owner-freebsd-hackers@FreeBSD.ORG Wed Dec 20 21:42:04 2000 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mass.osd.bsdi.com (unknown [167.216.157.206]) by hub.freebsd.org (Postfix) with ESMTP id C75E237B400 for ; Wed, 20 Dec 2000 21:42:04 -0800 (PST) Received: from mass.osd.bsdi.com (localhost [127.0.0.1]) by mass.osd.bsdi.com (8.11.1/8.11.1) with ESMTP id eBL5qtc00510; Wed, 20 Dec 2000 21:52:55 -0800 (PST) (envelope-from msmith@mass.osd.bsdi.com) Message-Id: <200012210552.eBL5qtc00510@mass.osd.bsdi.com> X-Mailer: exmh version 2.1.1 10/15/1999 To: Nicolas Souchu Cc: hackers@freebsd.org Subject: Re: newbus question In-reply-to: Your message of "Wed, 20 Dec 2000 17:42:37 +0100." <20001220174237.A18944@wiliam.alcove-int> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Wed, 20 Dec 2000 21:52:55 -0800 From: Mike Smith Sender: msmith@mass.osd.bsdi.com Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > 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