Re: Sharing memory between user and kernel spaces [Re: copy_to/from_user and a bottom half]

From: rkaiser@sysgo.de (rob@rob.devdep.sysgo.de)
Date: Fri May 19 2000 - 02:59:35 EST


In article <3924CD55.5781A269@ueidaq.com>,
        aivchenko@ueidaq.com (Alex Ivchenko) writes:
> Hi, Andi,
>
> My NT driver works as follows:
>
> 1. App allocates memory in user space (page-aligned).
> (BTW, I didn't find the way of doing it on Linux beside to allocate
> memory with malloc() and then align it to the page boundaries).
>
> 2. Inform driver about start address and size.
>
> 3. Driver translates user-space address into its virtual address
> and locks pages into physical memory.
> Now we have two handles (addresses) (kernel and user) to the same
> piece of memory.
>
> 4. Then one can translate kernel-space virtual address into physical
> one to supply to scater-gather BM-capable hardware.
>
> Is it any way to do this with Linux?
>

There is a kernel patch available at ftp://ftp.sysgo.de/pub/Linux
that adds a facility to do this for the 2.0.x and 2.2.x kernels.

I understand the 2.3.x kernels have a new facility (kiovec)
to support this too, albeit in a completely different way.

Rob

----------------------------------------------------------------
Robert Kaiser email: rkaiser@sysgo.de
SYSGO RTS GmbH
Am Pfaffenstein 14 phone: (49) 6136 9948-762
D-55270 Klein-Winternheim / Germany fax: (49) 6136 9948-10

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Tue May 23 2000 - 21:00:16 EST