This is the mail archive of the
cygwin@sources.redhat.com
mailing list for the Cygwin project.
AW: I'm new in cygwin: how to mmap?
- To: "'cygwin'" <cygwin at sources dot redhat dot com>
- Subject: AW: I'm new in cygwin: how to mmap?
- From: "Dehmel, Rüdiger" <de at lmnet dot de>
- Date: Tue, 12 Sep 2000 12:35:17 +0200
- Cc: "'vinschen at cygnus dot com'" <vinschen at cygnus dot com>
Thank you for your fast reply Corinna!
I found the mail list address in the README on the ftp whre I download
cygwin.
I'm now a member of the cygwin group. :-)
when I try to port my software there was no problem with mmap() but
open("/dev/mem", ...); fails because there is no "/dev/mem".
mmap() can do different things depending on what open file descriptor
is passed to mmap().
There is no problem with permissions because I change /dev/mem in LINUX to
user rw
and I can do the same with the winobj \device\PhysicalMemory (Tool:
winobj.exe)
I have also sample code to map NT kernal memory to user-space
( like LINUX: /dev/kmem ) but it is stille more complicated to get physical
0xD0000
I need some HalTranslateBusAddress() ..
I hope that cygwin can emulate the open("/dev/mem") in combination with
mmap().
Any help?
Ruediger
> -----Ursprüngliche Nachricht-----
> Von: Corinna Vinschen [SMTP:vinschen@cygnus.com]
> Gesendet am: Dienstag, 12. September 2000 11:31
> An: Dehmel@cygnus.com; Rüdiger
> Cc: 'cygwin@sources.redhat.com'
> Betreff: Re: I'm new in cygwin: how to mmap?
>
> "Dehmel, Rüdiger" wrote:
> >
> > Hello,
> >
> > first of all: how to subcribe to this group? (please answer to:
> de@lmnet.de
> > )
>
> How did you find this group???
>
> Read http://sources.redhat.com/cygwin/lists.html
> It contains all necessary information.
>
> > I must memory map my hardware (ISA memory address: 0xD0000 - 0xD1FFFF)
> to
> > user address space.
> >
> > In LINUX I do this:
> >
> > md = open("/dev/mem", ...);
> > base = mmap(0, length, ... 0xD0000, md , ..);
> > ....
> > *base = 0x77; // write the bits 0x77 direct to the hardware
> > ....
> >
> > What is the replacement with cygwin on NT?
>
> Try using mmap().
>
> Corinna
>
> --
> Corinna Vinschen Please, send mails regarding Cygwin to
> Cygwin Developer mailto:cygwin@sources.redhat.com
> Red Hat, Inc.
> mailto:vinschen@cygnus.com
--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com