[uCsimm] uclinux paging

From: fabien.klein@conexant.com
Date: Mon Apr 10 2000 - 06:34:01 EDT


I need some information about page handling in uclinux especially
for file mapping

If a mount an ext2 partition on the ramdisk device (after expanding an ext2 sb,
or doing an mke2fs) , I see that I can copy file to this new partition, see a correct
directory but each time I try to read a copied file into this fs I get garbage char

expand /etc/ramfs512.img /dev/ram0
mount -t ext2 /dev/ram0 /var
cp /etc/blablabla /var

hexdump /etc/blablabla

0: 73 65 72 76 69 63 65 73-00 72 72 6F 72 2E 74 78 services.rror.tx
10: 74 00 74 78 74 00 EF FE-F0 1E EF FE F0 1E EF FE t.txt...........
20: F0 1E EF FE F0 1E EF FE-F0 1E EF FE F0 1E EF FE ..

(these F0 1E EF FE correspond to
#define STACK_UNTOUCHED_MAGIC 0xfeef1ef0)
==>the read pointer is broken

If we look closer

when I do
cp /etc/blablabla /var
ext2write do this : memcpy_fromfs ( 0x00fd0000, 0x00xxxx, size)

and hexdump /etc/blablabla
generic_file_read do this memcpy_tofs ( 0xyyyyyyyy, 0x00fdf000,size)

the size is correct but the the src address (= page_address(page) + offset) is wrong

The same problem happens for nfs read but it's OK for romfs or proc file read

I think that the page used by
page_address(page) is not the good one or parameters have bee overwritten

Can someone tell me how to debug this?
The kernel begins at 0xa00000, and the RAM ends at 0x1000000
(PAGE_OFFSET==kernel .text?????)



This message resent by the ucsimm@uclinux.com list server http://www.uClinux.com/

This archive was generated by hypermail 2b30 : Sun Apr 07 2002 - 00:01:35 EST