Re: Problem in getting kernel vritual address

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

 



jhoney jhoney wrote:
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.
Why don't you check the source code? There must be a structure which maps the whole register space (like immap). You will have to get that structure address and dereference the corresponding member to access the register. IMO one cannot dereference access registers like have done.

HTH.
om.

--
Kernelnewbies: Help each other learn about the Linux kernel.
Archive:       http://mail.nl.linux.org/kernelnewbies/
FAQ:           http://kernelnewbies.org/faq/


[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