Re: mmap question

Jörn Engel
2002-07-11T19:15:39Z

Hi!

> I don't despair having an answer to at least one of my questions :-)

Hm. Maybe I should read/reread them. :-)

> I implemented mmap on a mtd device (via a simple remap_page_range). I
> have a userland program that opens and mmap a mtd device with success,
> and can read-access it correctly. But once I perform a MEMERASE ioctl
> or a simple write, the process only reads series of 0x80 bytes. If I
> restart the process, it continues reading this value (even before any
> erase/write operation) unless I reboot.
>
> Do anybody have a clue about this behavior ?

0x80 is the status register, you are reading. The command set (Intel
or Amd, I suppose) can read it, handle any errors (0x80 mean no errors
on intel) and return to read mode by writing 0xff to the flash.

My guess is that you command set has a bug. Fix it or provide a spec
and some beer and pizza. ;-)

Jörn

--
Often, the most striking and innovative solutions come from realizing
that your concept of the problem was wrong.
-- Eric Raymond in "The cathedral and the bazaar"