mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-19 03:06:39 +00:00
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:
parent
c95a6c54ea
commit
3ae2c1712e
@ -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() { }
|
||||
};
|
||||
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user