mmap from 0xFFFF0000 -> 0xFFFFFFFF does not work, why?!

Bossek Raphael (raphael.bossek@solutions4linux.de)
Thu, 6 May 1999 23:18:12 +0200


--svZFHVx8/dhPCe52
Content-Type: multipart/mixed; boundary="KR/qxknboQ7+Tpez"

--KR/qxknboQ7+Tpez
Content-Type: text/plain; charset=us-ascii
Content-Description: Mail
Content-Transfer-Encoding: quoted-printable

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 whe=
re the flash chip copy its contents. I use the /dev/mem device driver to ac=
cess the memory environment throw the mmap function but it does not work. S=
o i decrease the size from 0x20000 to 0x20000 - getpagesize() and what happ=
ens, 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 devi=
ces
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 memo=
ry ?!
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 flas=
h 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 inclu=
de
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 cac=
he
withou using the assembler code within the user application ?! Of course, o=
nly
root can do that.

I hope this questions fits in the mailling list because it is the last chan=
se
for me, no one else could help me...

I realy HOPE get hopeful answers, thx.

--=20
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

--KR/qxknboQ7+Tpez
Content-Type: application/pgp-keys
Content-Description: PGP Key 0xE51A9DED.
Content-Disposition: attachment; filename=mutt-server-983-36

-----BEGIN PGP PUBLIC KEY BLOCK-----
Version: 2.6.3ia

mQCNAza0fJwAAAEEAKTGYc1KSUQxIqk9+FLLejFjTCaYuSxeLeTnDpyo1E9jIieT
vq33dbVgWYxxRgkQPwNiiOXsAGsdgbxVqDH4zqahg8JuA41ZlfbJvBQkTcpTpEqE
8rilC2IteKrHppixLiTCDlvcWuALtsSISOcwIq6ZxXa42Qw+WoQ9qKDlGp3tAAUR
tCZSYXBoYWVsIEJvc3NlayA8cmFwaGFlbC5ib3NzZWtAZ214LmRlPokAlQMFEDa0
fJyEPaig5Rqd7QEB7/cEAJvJHr75rcdGNdF5U3e9NKS0YuPijj+RZ/VLSkzrh4PA
qFo5TPr7FCfBcnWSBAqkoabC5Ufo1ED64xLBbbgg4J1CSSrg/pfLT1c8P0DMHycY
qQPqDdU3rwJzjNKRblmvYlwEwWxeL+lVpEn37kyGJPGTh4cD8/xm+Ggi7O59+wJC
=6Pqm
-----END PGP PUBLIC KEY BLOCK-----

--KR/qxknboQ7+Tpez--

--svZFHVx8/dhPCe52
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3ia

iQCVAwUBNzIHEYQ9qKDlGp3tAQFVAwP/Vo1aL8QyUW3uYKxEtzcQ/35DfczppWgg
Jx/e18wD/AJlUj62CjDf+78RBTyA30sVtuACFZXSkl/jv9xk+JUnWX9PpFL/9H9P
UFOnyVVmGSLWIW3u5PYQBZz06Gt9sxRV1HzgYxERF5HJeUuJWAonGVtLcvOOsKG1
DgPpaJgjRF8=
=6+wu
-----END PGP SIGNATURE-----

--svZFHVx8/dhPCe52--

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/