Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 19 May 2004 15:29:09 -0700
From:      steve@Watt.COM (Steve Watt)
To:        pjd@freebsd.org
Cc:        hackers@freebsd.org
Subject:   Re: api for sharing memory from kernel to userspace?
Message-ID:  <200405192229.i4JMT95J087312@wattres.Watt.COM>
In-Reply-To: <20040519143453.GZ845@darkness.comp.waw.pl>
References:  <20040519122907.GO81341@elvis.mu.org>

next in thread | previous in thread | raw e-mail | index | archive | help
In article <20040519143453.GZ845@darkness.comp.waw.pl> you write:
>
>On Wed, May 19, 2004 at 05:29:07AM -0700, Alfred Perlstein wrote:
>+> I need to share about 100megs of memory between kernel and userspace.
>+>
>+> The memory can not be paged and should appear contig in the process's
>+> address space.  Any suggestions?
>+>
>+> I need a way to either:
>+> map user memory into the kernel's address space.
>+> map kernel memory into the user's address space.
>+>
>+> I was looking at pmap_qenter() but it didn't see attractive because
>+> it's for "short term mappings", this mapping will exist for quite a
>+> while.
>
>In mapping kernel memory into user's address space I am interested as well
>for GEOM Gate and other evil projects.

The way we accomplished this in some other operating system was to
create a shared memory segment with an implementation-reserved
name, and then have the application shm_open the name and mmap it in.

Shouldn't be hard with a device driver.

-- 
Steve Watt KD6GGD  PP-ASEL-IA          ICBM: 121W 56' 57.8" / 37N 20' 14.9"
 Internet: steve @ Watt.COM                         Whois: SW32
   Free time?  There's no such thing.  It just comes in varying prices...



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200405192229.i4JMT95J087312>