Messages in this thread | | | Date | Thu, 6 May 1999 23:18:12 +0200 | From | Bossek Raphael <> | Subject | mmap from 0xFFFF0000 -> 0xFFFFFFFF does not work, why?! |
| |
Hi all,
1st Question :
i'm working at a bios flash utility for some pc manufacture and have trouble in using the mmap function :(
I need access to the address space starting at 0xFFFE0000 to 0xFFFFFFFF where the flash chip copy its contents. I use the /dev/mem device driver to access the memory environment throw the mmap function but it does not work. So i decrease the size from 0x20000 to 0x20000 - getpagesize() and what happens, yes mmap exit without any error.
Why can i not mmap from 0xFFFE0000 with the size of 0x20000 bytes ?! More background information. I have to program the vendor specific PCI devices before i get the access to the flash contents. This PCI device handels the write/read operations to that flash chip and the region where its contents will be mirrored. I can NOT change the region where it will be :(
2nd Question :
Perhapps it will be a stuppid question but how can i access the mapped memory ?! Can i use simple cpu memory access or is it required to use the read/write function with the previous get file handle by open("/dev/mem", ..) ?!
3rd Question :
The access to the flash chip is VERY time critical. I need a function that allows me to protect the current task from others. While accessing the flash memory mapped before, NO other task should/must get processor time. Which technique solve this problem ?!
4th Question :
Because the pentium processors have caches it is required to disable them before access the flash memory (you know, time critical access). So i include some assembler code that use the %cr0 pentium processor register but i get segfaults while executing this source line :( How can i disable the cpu cache withou using the assembler code within the user application ?! Of course, only root can do that.
I hope this questions fits in the mailling list because it is the last chanse for me, no one else could help me...
I realy HOPE get hopeful answers, thx.
-- Raphal Bossek <raphael.bossek@solutions4linux.de> PGP fingerprint: DF 6F 2C 76 46 1E B4 1C 5B A5 2E 1B FC E0 D3 F6 PGP public key: http://www.solutions4linux.de/gnusc/pgpkey.asc [unhandled content-type:application/pgp-keys][unhandled content-type:application/pgp-signature] | |