Skip to contentSkip to conversation

remap_page_range problem on 2.3.x

DISCUSSION Andy Henroid 2 participants 2 messages Mar 9, 2000 – Mar 13, 2000 Memory management

lore
Share & tools
lore
#0 lore raw
Quoted 4 lines · --- Jeff Garzik
Quoted 3 lines · Andy Henroid

Name: mmtest.tar.gz
mmtest.tar.gz Type: Unix Tape Archive

Quoted 8 lines

(application/x-tar)

Quoted 2 lines

Encoding: base64
Description: mmtest.tar.gz

Are these the correct test files?

rum:~/tmp/mmtest> grep -i remap *
rum:~/tmp/mmtest>

Yes, the remap_page_range is done indirectly
through mmap call to the /dev/mem driver.

Quoted 7 lines

I think you'll need to do something like

init():

	dsdt = get_free_pages(...)

chrdev mmap() op:

	remap_page_range(dsdt, ...)

OK, yes I bet that would work. I just don't see
any good reason why the remap_page_range doesn't
appear to be doing the right thing for a piece
of kmalloced memory.

Quoted 3 lines

If you are going to present data via /proc, you
might as well simply dump the raw data out to
whoever is reading /proc/driver/acpi/dsdt...

It's actually a bit less wasteful, for systems
with large DSDTs, to do the mmap. But, right,
this is another possible work-around to my
current problem.

-Andy

__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://im.yahoo.com
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/

#1 lore raw
Quoted 2 lines · Andy Henroid

Yes, the remap_page_range is done indirectly
through mmap call to the /dev/mem driver.

I think I saw this too some time ago.

I tried to duplicate the kernel's view of the address space above 0xc0000000 at an offset in a usermode program. I ended up being able to read the correct data from /dev/mem, but reading from an mmaped page from /dev/mem returned completely bogus data (all zero).

My code is in usb.in.tum.de, module usbstress,
files uhcidump.c and kmem*

Tom
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to [email protected]. For more info on Linux MM,
see: http://www.linux.eu.org/Linux-MM/