Custom Writing Service-Accessing Physical memory from user programPhysical memory from user program
Accessing Physical Memory locations from user space program =========== Please write a user program to access the physical memory using /dev/mem. Please note that, addresses you need to use here must be physical addresses, not virtual. Specific Tasks of this program: * Read the physical address displayed in /proc/mem_map from previous assignment * Now go through the entire struct page entries and see how many pages has flags bit PG_reserved set. You may either use standard seek/read, or mmap to achieve your results. You need to be root user in order to run this user program. Please be careful not to write any thing, as you may screw up the system pretty badly. For more information on /dev/mem, you can visit … Man Information: http://www.s-gms.ms.edus.si/cgi-bin/man-cgi?mem+7D Example: http://www.support.emtrion.de/doku.php?id=linux:how-to-access-gpio General Google search should also yield good resutls. People some times call this method of handling things as “user space device drivers” Goals: ===== * Learn how to access physical memory from user program * Places where this is really useful would be to update the software on EEPROM’s or Flash memory. Example, would be to update your BIOS version on your PC. * Ability to look at page fields and understand as necessary. Submission: ========== * C code for the user program * Readme.txt Note: Even though I am asking to access struct pages, goal is actually to show you how we can access physical memory from user space, if necessary. So, I will give points for being able to access any access to physical memory from user space and verify that is indeed the value using kernel code.