Chinaunix首页 | 论坛 | 博客
  • 博客访问: 3895939
  • 博文数量: 93
  • 博客积分: 3189
  • 博客等级: 中校
  • 技术积分: 4229
  • 用 户 组: 普通用户
  • 注册时间: 2009-02-02 13:29
个人简介

出没于杭州和青岛的程序猿一枚,对内核略懂一二

文章分类

全部博文(93)

文章存档

2016年(2)

2015年(3)

2014年(11)

2013年(29)

2012年(16)

2011年(5)

2010年(5)

2009年(22)

分类: LINUX

2013-09-24 11:06:53

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

2.关于cache、write buffer配置
   
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
阅读(8376) | 评论(1) | 转发(3) |
给主人留下些什么吧!~~

arm-linux-gcc2013-09-27 21:57:15

等到“CPU”空闲的时候

感觉应该是“总线”空闲的时候吧