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