base-foc: Do not touch memory during map operation

Don't do anything in Mapping::prepare_map_operation.  At this point and in the
current implementation, the memory has been mapped and cleared already. Touching
the memory may only pollute the cache causing data corruption in DMA memory.

Fixes issue #452
This commit is contained in:
Sebastian Sumpf 2013-03-04 11:26:18 +01:00 committed by Norman Feske
parent c95a6c54ea
commit 3ae2c1712e
2 changed files with 3 additions and 16 deletions

View File

@ -75,21 +75,10 @@ namespace Genode {
bool write_combined() const { return _write_combined; }
/**
* Prepare map operation
*
* On Fiasco, we need to map a page locally to be able to map it to
* another address space.
* Prepare map operation is not needed on Fiasco.OC, since we clear the
* dataspace before this function is called.
*/
void prepare_map_operation()
{
size_t mapping_size = 1 << _log2size;
for (addr_t i = 0; i < mapping_size; i += L4_PAGESIZE) {
if (_rw)
touch_read_write((unsigned char volatile *)(_src_addr + i));
else
touch_read((unsigned char const volatile *)(_src_addr + i));
}
}
void prepare_map_operation() { }
};

View File

@ -250,8 +250,6 @@ static inline int sigma0_req_region(addr_t *addr, unsigned log2size)
*addr = l4_utcb_mr()->mr[0] & (~0UL << L4_PAGESHIFT);
touch_rw((void *)addr, 1);
return 0;
}