1

So i am currently mapping the DoorBell area in my card using ioremap_no_cache(), and only 4K size of it. However (unintentionally) i now realise that i am able to ring doorbells /write to locations after this 4K region as well and the strange thing is it seems to work. I want to know how/why is it working and if possible through this understand in depth of how ioremap_no_cache() actually works under the hood? Code reading and man page only helped so much. Note that this extra 4K region outside the first 4k region is not there by default

10
  • 1
    (1)Is there any other mapping beside the one setup by ioremap_no_cache()? (2) If ioremap_no_cache() only map 4KB size, and the next 4KB is not mapping in kernel space, the access to unmapped area will cause the kernel crash. So I doubt there is other mapping setup already. Mar 21, 2013 at 6:58
  • No , it is a pci_iomap(pdev, Doorbell_BAR_Offset, 0); call
    – smam
    Mar 21, 2013 at 8:18
  • How about the PCI host controller Outbound mapping? The Outbound mapping can translate the system bus address into pci address Mar 21, 2013 at 8:23
  • The PCI outbound mapping is not related to MMU, it's related to address routing among peripheral modules. Mar 21, 2013 at 8:31
  • 1
    You know how pci rescan to get the real length of various BARs? It will write 0xFFFFFFFF to BAR register, then read it back. The value that read back is the real length of the BAR. Mar 21, 2013 at 8:38

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.