lkml.org 
[lkml]   [1996]   [Mar]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
Subjectmmap PRIVATE
Date

I was rather suprised to get my first Oops the other day..

I had a program that did an
mmap(ADDR1, 4M, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, /dev/mem, 0)
and the Oops occurred after scribbling over the first 8k or so
pointed to at ADDR1. This was with kernels 1.2.13 and 1.3.57.

I would have thought that MAP_PRIVATE would not have affected
any other processes, but everything died. (I suspect I had overwritten
the interrupt vector table..?)

What I was trying to do was to access some memory mapped
hardware (which I don't have yet) at a physical address of
0x00c00000. Changing the final 0 parameter to the mmap call
to 0x00c00000 seemed a lot better (it read back as all 0xff),
but attempting to write to it gave a 'bogus page' fault and
the program died. How can I persuade the kernel to map me some
address space which it doesn't know about (ie isn't RAM) ?

The manual page I have talks about Linux 0.99.11 - is there
a newer one ?!

--
Peter Fox


\
 
 \ /
  Last update: 2005-03-22 13:36    [W:0.039 / U:0.012 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site