• Jeffrey Lee's avatar
    Add OS_Memory 19, which is intended to replace the OS_Memory 0 "make... · b47fdbb1
    Jeffrey Lee authored
    Add OS_Memory 19, which is intended to replace the OS_Memory 0 "make uncacheable" feature, when used for DMA
      Making pages uncacheable to allow them to be used with DMA can be troublesome for a number of reasons:
      * Many processors ignore cache hits for non-cacheable pages, so to avoid breaking any IRQ handlers the page table manipulation + cache maintenance must be performed with IRQs disabled, impacting the IRQ latency of the system
      * Some processors don't support LDREX/STREX to non-cacheable pages
      * In SMP setups it may be necessary to temporarily park the other cores somewhere safe, or perform some other explicit synchronisation to make sure they all have consistent views of the cache/TLB
      The above issues are most likely to cause problems when the page is shared by multiple programs; a DMA operation which targets one part of a page could impact the programs which are using the other parts.
      To combat these problems, OS_Memory 19 is being introduced, which allows DMA cache coherency/address translation to be performed without altering the attributes of the pages.
      Files changed:
      - hdr/OSMem - Add definitions for OS_Memory 19
      - s/MemInfo - Add OS_Memory 19 implementation
      Tested on Raspberry Pi 3, iMx6
    Version 5.86, Tagged as 'Kernel-5_86-4_129_2_3'
VersionNum 839 Bytes