Problem in getting kernel vritual address

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

 



Hello All,

I have a board MPC 8540 ported with ppc Linux and U-boot. U-boot is going to intialize the memory map, like  mapping 0x00000000 to SDRAM interface and 0xe0000000 to pci interface. so when we write at 0xe0000000 , the data will go through the pci.
Assuming that whatever the memory map done by U-boot is carried over to the Linux, I wrote 

virtual_address = __va(0xfdf00000)  to get the virtual address for CCSRBAR , which  contains fdf00000 at offset zero.(It contains it's address at the offset zero from the CCSRBAR).

If  I dereference the virtual_address( *virtual_address  = fdf00000)
it should contain the same address. But when i tried this , it result in segmentation fault. pls give me any clue.

Above all, what I want is , the memory map is carried from the u-boot to linux, if so how to get the virtual address(to manipulate in the kernel module) for the physical address to manipulate the processor registers.

Thanks in Advance

Regards

Jhoney

[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