[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: cache coherency in DMA and MMIO
From: |
Da Zheng |
Subject: |
Re: cache coherency in DMA and MMIO |
Date: |
Fri, 23 Apr 2010 14:51:22 +0800 |
User-agent: |
Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10.5; en-US; rv:1.9.1.9) Gecko/20100317 Thunderbird/3.0.4 |
On 10-4-22 下午11:01, Samuel Thibault wrote:
> Samuel Thibault, le Thu 22 Apr 2010 16:51:38 +0200, a écrit :
>> Da Zheng, le Thu 22 Apr 2010 22:37:51 +0800, a écrit :
>>> So does the driver need to consider about cache coherency problems on PC
>>> when
>>> interacting with the external device?
>>
>> Yes (since you can not rely on the BIOS), you need to remap the mmio
>> range with cache disabled: INTEL_PTE_NCACHE|INTEL_PTE_WTHRU. This should
>> already be done by pmap_enter().
>
> And you need to access it using the volatile qualifier.
They are not just one or two variables. They are an array of structure
variables. Should I define all fields of the structure with volatile qualifier?
It's strange. The Linux driver doesn't do so but it definitely works in the
Linux kernel.
I use the mem device to allocate MMIO space. I guess INTEL_PTE_NCACHE and
INTEL_PTE_WTHRU haven't been set to the MMIO pages, right?
Zheng Da
- cache coherency in DMA and MMIO, Da Zheng, 2010/04/22
- Re: cache coherency in DMA and MMIO, Samuel Thibault, 2010/04/22
- Re: cache coherency in DMA and MMIO, Samuel Thibault, 2010/04/22
- Re: cache coherency in DMA and MMIO,
Da Zheng <=
- Re: cache coherency in DMA and MMIO, Samuel Thibault, 2010/04/23
- Re: cache coherency in DMA and MMIO, Da Zheng, 2010/04/24
- Re: cache coherency in DMA and MMIO, Samuel Thibault, 2010/04/24
- Re: cache coherency in DMA and MMIO, Da Zheng, 2010/04/24
- Re: cache coherency in DMA and MMIO, Samuel Thibault, 2010/04/24