From owner-freebsd-hackers Sat May 27 14:44:10 2000 Delivered-To: freebsd-hackers@freebsd.org Received: from rover.village.org (rover.village.org [204.144.255.49]) by hub.freebsd.org (Postfix) with ESMTP id 1F43037B9FE for ; Sat, 27 May 2000 14:44:06 -0700 (PDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (harmony.village.org [10.0.0.6]) by rover.village.org (8.9.3/8.9.3) with ESMTP id PAA29474; Sat, 27 May 2000 15:44:04 -0600 (MDT) (envelope-from imp@harmony.village.org) Received: from harmony.village.org (localhost.village.org [127.0.0.1]) by harmony.village.org (8.9.3/8.8.3) with ESMTP id PAA00751; Sat, 27 May 2000 15:43:54 -0600 (MDT) Message-Id: <200005272143.PAA00751@harmony.village.org> To: =?ISO-8859-1?Q?G=E9rard_Roudier?= Subject: Re: 4.0 - Isa devices not being probed Cc: hackers@FreeBSD.ORG In-reply-to: Your message of "Sat, 27 May 2000 22:59:31 +0200." References: Date: Sat, 27 May 2000 15:43:54 -0600 From: Warner Losh Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG In message =?ISO-8859-1?Q?G=E9rard_Roudier?= writes: : Existing bus abstractions tend to let think that the same software driver : can deal with different buses, bridges or IO methods without having to : care about how these things actually behave, notably regarding buffering : and ordering rules. This is untrue. That statement is false. We have several drivers in the tree that work on memory mapped or I/O mapped devices attached to many different types of buses. NetBSD takes this even farther than we do. : Existing bus abstractions may let driver writer think that everything that : addresses bridges, bus specific and arch specific properties is handled : transparently given that the right abstract method is called in the right : place. This is untrue. But it does handle them transparently. : Existing bus transactions may let think that driver writers donnot have : to care with ordering rules and coherency issues between transactions in : both directions targetting device and memory. : This is untrue. NetBSD's busdma does a great job of this. DMA is a horrible issue with some machines donig it in virtual address space, and others doing it in physical address space with no cache coherency. NetBSD does it just fine and we're basically using the NetBSD interface. : For example, if I want a WRITE TO MEMORY followed by a WRITE TO AN IO : REGISTER performed from the C code to be seen consistently from the device : (bus), most IO abstractions I have seen will do the bad work by just : performing a memory barrier (or some additionnal barrier) after the WRITE : TO THE IO REGISTER. If driver writer is not aware of this kind of : subtleties, very ennoying bugs will be generated all around, in my : opinion. Most drivers do not do this. Those that do need to write to both will use the proper tags. When the proper tags are used in the bus space stuff, the proper barriers will be inserted at the right time (eg after the write to memory) on those architectures that need it. Most of these complaints are based on busspace, rather than the newbus. bus space came from NetBSD and is working their very well. FreeBSD has an older version of bus space in its tree. I've tried to update it in the past, but the newbus stuff and the new NetBSD bus space stuff overlap somewhat making it hard to modernize the busspace stuff in FreeBSD. We will have to do it with the Sparc or MIPS ports that are in the wings, but for now we are fat and happy. :-( Warner To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message