From owner-freebsd-hackers Tue Jan 23 10:26:27 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id KAA08055 for hackers-outgoing; Tue, 23 Jan 1996 10:26:27 -0800 (PST) Received: from miller.cs.uwm.edu (miller.cs.uwm.edu [129.89.9.13]) by freefall.freebsd.org (8.7.3/8.7.3) with ESMTP id KAA08047 for ; Tue, 23 Jan 1996 10:26:23 -0800 (PST) Received: (from james@localhost) by miller.cs.uwm.edu (8.7.3/8.7.3) id MAA23925; Tue, 23 Jan 1996 12:25:31 -0600 Date: Tue, 23 Jan 1996 12:25:31 -0600 From: Jim Lowe Message-Id: <199601231825.MAA23925@miller.cs.uwm.edu> To: luigi@labinfo.iet.unipi.it, terry@lambert.org Subject: Re: Amancio's tv program with capture! Cc: dufault@hda.com, hackers@FreeBSD.org, hasty@rah.star-gate.com, jkh@time.cdrom.com, multimedia@rah.star-gate.com Sender: owner-hackers@FreeBSD.org Precedence: bulk > > Unfortunately I think this would require non-trivial changes to the > > code in sysv_shm.c, and might possibly have some side effects. > > > > I am cross-posting this to hackers for advice. > > I would suggest adding an mmap() entry point for the device driver > and calling it when you request pages to be mmapped. The system > mmap() interface would not be changed, it would just act differently > for vnodes that were devices. > > This would work for mapping video memory by device generically as well > as frame capture buffers, etc.. The device driver already has a mmap entry point. It allocates memory at boot up time (since you can't seem to grab that much wired down contiguous memory at run time -- for some reason). The video capture board DMAs its data into this preallocated memory. The user program uses the mmap system call to access this memory. Now, we want this memory to be shared by the Xserver with the Xshm utilities. How does one mark the driver/mmapped memory as shared memory with the current utilities? It isn't real obvious that one can actually do this without modifiying the shmat system call (or at least to me). -Jim