Question about dataspace
adam at os.inf.tu-dresden.de
Thu May 15 01:02:53 CEST 2014
On Tue May 13, 2014 at 17:45:46 -0800, Yuxin Ren wrote:
> For the unmapping stuff, can you tell me a little more in detail.
> I do not understand the parameters of unmap function.
So the L4::Task::unmap() function takes two arguments. The first is a
flexpage which can be constructed with the l4_fpage helper, like this:
l4_fpage(address, L4_LOG2_PAGESIZE, L4_FPAGE_RWX)
So in our case the fpage describes a piece of memory, with a start
(address) and size (L4_LOG2_PAGESIZE, given in log2) and attributes
(L4_FPAGE_RWX). For the unmapping, this yields to:
result = task->unmap(l4_fpage(address, L4_LOG2_PAGESIZE, L4_FPAGE_RWX),
// some error handling/message
So this means that this unmap call shall remove all access rights
(L4_FPAGE_RWX), for task and its childs (L4_FP_ALL_SPACES) from memory
region address to address + (1 << L4_LOG2_PAGESIZE) (what is just a
single page in our case).
Adam adam at os.inf.tu-dresden.de
More information about the l4-hackers