mmap problem

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Dear All,

         I have an 512 MB RAM on an Intel desktop machine, of which Kernel uses 256M for all allocation for kernel as well as for user
         programs. (by passing mem=256M as a boot parameter). Hence I have 256MB of memory which I can treat it as IO memory.

         System memory is associated from 0x00000000 -  0x20000000 (512MB) in the physical address space.
         Memory addresses from 0x00000000 - 0x10000000 (256 MB) are used by the Kernel - memory management. Subsystem
         Memory addresses from 0x10000000 - 20000000 (256MB) is used as IO memory

        For an experiment, I used mmap() to map a page (4K) in IO memory (page base address 0x20002000) to user virtual address
        I used kernel function remap_pfn_range() in my kernel module's mmap function.
 
        This is rightly mapping the physical page to a user virtual address. But when I write to that address and then read. I get junk
        value.

        To just verify, when I mapped the VGA controller memory to user virtual address things are working fine.

        Can you please help me to resolve this problem.

Regards,
Prabhu



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux