[Top] [All Lists]

Re: mmap KSEG1

To: Ed Okerson <>
Subject: Re: mmap KSEG1
From: Thomas Bogendoerfer <>
Date: Fri, 4 Dec 2009 19:33:09 +0100
In-reply-to: <>
Original-recipient: rfc822;
References: <>
User-agent: Mutt/1.5.18 (2008-05-17)
On Fri, Dec 04, 2009 at 11:52:03AM -0600, Ed Okerson wrote:
> Is it possible to mmap an address in KSEG1 so a user space app can
> read/write to an IO device uncached?

well not exactly to KSEG1, since that is kernel exclusive address space,
but it's possible to map the physical address of the device:


fd = open("/dev/mem", O_RDWR|O_SYNC);
io = mmap (NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE, fd, ioaddr);

where ioaddr is the physical address of the io device.


Crap can work. Given enough thrust pigs will fly, but it's not necessary a
good idea.                                                [ RFC1925, 2.3 ]

<Prev in Thread] Current Thread [Next in Thread>