mmap
Hmm. OK, that's a bit of data you hadn't shared, so let's ask:
Processor? LynxOS version?
I'll guess the processor is a 440GX, based on your comment, and I'll
assume LynxOS is something newer than 3.1.0a, which is the last version
that I directly contributed code to.
I believe off_t is 64 bits wide; that was done somewhere around 3.0.1.
The user app should be using off_t for file pointers, which is most
likely a long long.
off_t offset = 0x1FC000000ULL;
You might also try shm_open("/dev/mem", O_RDWR, 0);
The value you are looking for is MAP_FAILED, by the way. pa could be
negative, in a twos-complement sense, but still be a valid pointer.
Minor nit: If you've declared pa to be a void * (like mmap returns),
you won't need the cast.
If you don't need the performance of direct pointer access, you can
also do this via seek_n_read/seek_n_write (err, old names...) and use
the kernel effective address (0xbfc00000).
Steve
--
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...
|