Results 1 to 2 of 2
I am involved in a research project that has me doing some kernel hacking. What I am trying to do is get the memory map used by Linux during the ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 12-19-2006 #1Just Joined!
- Join Date
- Nov 2006
- Location
- New Jersey
- Posts
- 3
Determining the memory map from a module
I am involved in a research project that has me doing some kernel hacking. What I am trying to do is get the memory map used by Linux during the boot process. I am looking at getting access to the bios e820 map information. My first attempts have been to try and simply call the e820_print_map() function. This just to see if I can access these functions and variables. I cannot get my module to build such that it can call it. The build warns of undefined function and the module fails to load.
I plan to use the mem= boot option to reduce the memory footprint of the kernel so I can sequestor high memory. I would like to be able to do is a) find the top of "known" Linux memory from a module at runtime. and b) know what available high memory there is.
Using hardwired values I can get the memory reserved and hardcode a pointer then use ioremap() to do my thing but I find myself running into device memory like the video.
I think much of what I want to understand is in /proc/iomem but I am a Linux newbie and could use some pointers.
a) Can I use kernel functions such as e820_print_map() and if so what do I need do to be able to call them from a kenrel module
and b)where is /proc/iomem implemented so I can take a look at what they do
Any other pointers welcome
- 12-19-2006 #2Just Joined!
- Join Date
- Nov 2006
- Location
- New Jersey
- Posts
- 3
a little more learnin
Since my last post I believe I understand that I probably can't rely on any kernel functions that are __init functions as the kernel reclaims that memory (at least for built-ins).
I am still trying to uncover how /proc/iomem works and if that will help me in my quest.


Reply With Quote
