1. 关于cache和write buffer
       cache和write buffer都是内置于CPU内部的一小段高速存储器,cache中保存着最近一段时间被CPU使用过的内存数据,而write buffer则是用来应对内存的写操作的,将原本要写向内存的数据暂写到write buffer中,等到CPU空闲的时候,数据才会慢慢地被搬移到内存里。

2.关于cache、write buffer配置
   关于cache和write buffer-LMLPHP
3. 关于内核中配置
    /* non-cached, non-buffered*/
    #define pgprot_noncached(prot) \
        __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED)

    /* non-cached, buffered*/
    #define pgprot_writecombine(prot) \
        __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE)


    /* 支持DMA write buffer */
    #ifdef CONFIG_ARM_DMA_MEM_BUFFERABLE
        #define pgprot_dmacoherent(prot) \
            __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_BUFFERABLE | L_PTE_XN)
        #define __HAVE_PHYS_MEM_ACCESS_PROT
        struct file;
        extern pgprot_t phys_mem_access_prot(struct file *file, unsigned long pfn,
                                     unsigned long size, pgprot_t vma_prot);
    #else
        #define pgprot_dmacoherent(prot) \
            __pgprot_modify(prot, L_PTE_MT_MASK, L_PTE_MT_UNCACHED | L_PTE_XN)
    #endif
10-12 06:14
查看更多