From owner-freebsd-hackers Thu Apr 16 14:27:36 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA09776 for freebsd-hackers-outgoing; Thu, 16 Apr 1998 14:27:36 -0700 (PDT) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from dingo.cdrom.com (dingo.cdrom.com [204.216.28.145]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id VAA09614 for ; Thu, 16 Apr 1998 21:27:05 GMT (envelope-from mike@dingo.cdrom.com) Received: from dingo.cdrom.com (localhost [127.0.0.1]) by dingo.cdrom.com (8.8.8/8.8.5) with ESMTP id OAA01195; Thu, 16 Apr 1998 14:22:33 -0700 (PDT) Message-Id: <199804162122.OAA01195@dingo.cdrom.com> X-Mailer: exmh version 2.0zeta 7/24/97 To: Bernie Doehner cc: Mike Smith , Bernie Doehner , hackers@FreeBSD.ORG, buaas@wireless.net Subject: Re: Documentation of 2.2.5-RELEASE and 3.0 memory protection? In-reply-to: Your message of "Thu, 16 Apr 1998 14:01:38 PDT." Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Date: Thu, 16 Apr 1998 14:22:32 -0700 From: Mike Smith Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > [...] > > > if_ed driver (some cards use shared memory, but in the ISA hole of > > > A0000-100000), to the Digiboard driver (which I thought uses shared > > > memory, but BELOW A0000). > > > > I don't understand you here - drivers are *inside* the kernel, and > > behave completely differently to user-mode programs. > > > Are you writing a driver, or a user-mode program? This is a critical > > difference. > > Using used too loose a definition. Our stuff is ALL user-mode programs > currently and it appears to work (with one program using monochrome range > for shared-memory, and the other using ISA hole memory) User-mode applications cannot access memory in the ISA hole without using mmap() to obtain such a mapping, either agains /dev/mem or some other device. One may alternatively open /dev/mem or /dev/kmem and read/write to achieve the same result. A driver is a kernel component, linked into the kernel. A user-mode program runs as a process with user priviledges. > But we'd like to understand the kernel mechanisms better so that we can > move/some of it into the kernel and turn it into real device drivers. The ISA hole is mapped into the kernel's address space; drivers such as if_ed's use of memory in this range are good examples of how to locate and work with this mapping. See also how syscons accesses the video framebuffer. -- \\ Sometimes you're ahead, \\ Mike Smith \\ sometimes you're behind. \\ mike@smith.net.au \\ The race is long, and in the \\ msmith@freebsd.org \\ end it's only with yourself. \\ msmith@cdrom.com To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message