From owner-freebsd-hackers Tue Jul 30 15:23:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7ACE037B400 for ; Tue, 30 Jul 2002 15:23:43 -0700 (PDT) Received: from falcon.mail.pas.earthlink.net (falcon.mail.pas.earthlink.net [207.217.120.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3EA8243E42 for ; Tue, 30 Jul 2002 15:23:43 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0193.cvx21-bradley.dialup.earthlink.net ([209.179.192.193] helo=mindspring.com) by falcon.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17ZfP2-0003t8-00; Tue, 30 Jul 2002 15:23:41 -0700 Message-ID: <3D4711B6.1A5D3985@mindspring.com> Date: Tue, 30 Jul 2002 15:22:46 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: hal@telefonica.net Cc: freebsd-hackers@freebsd.org Subject: Re: Accessing memory below 1 MB References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG hal@telefonica.net wrote: > I'm writing some graphics code (just for fun) and I need "legal" access to > the memory addresses below 1 mb. > > The thing is, I know how to access those addresses (open /dev/mem, mmap, and > that's it), but I'd like to be able to alloc some pages so that my accesses > are correct and don't make the kernel panic... > > Does anyone know how I could do that? Open the device driver for the device for which you need raw access to the memory, and mmap(2) the memory into your process address space. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message