PCI memory cycles and accessing memory.

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

 



hi all,
We are programming a non transparent bridge (plx6540cb) for linux (2.4.22) on opteron.


We programmed the BAR1 with an address (0x8000_0000). Set up the downstream access registers and addresses (all non prefetchable memory). Now we would like to access the memory space on the secondary side of the bridge.

My questions are not specific to the above mentioned bridge. They are more basic. ;-)

* How does the Linux kernel know that 0x8000_0000 is allocated for this particular bridge? How exactly an access to 0x8000_0000 gets converted to memory cycles on PCI? What is the sequence of code functions.. etc. (just file/functions will suffice )

After assigning this address, we do request_mem_region() and ioremap(). The /proc/iomem shows this region as allocated to our driver as well. But I am clueless about the convertion of this address to PCI memory cycles.

* What should be the functions that we should use to access the memory mapped regions? Is it inb() outb() readw() writew()..etc? Or access the memory by * operator would suffice?

Regards,
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