1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
1.2 +++ b/ipc.cc Thu Jan 21 00:05:50 2021 +0100
1.3 @@ -0,0 +1,22 @@
1.4 +#include <l4/re/c/dataspace.h>
1.5 +
1.6 +#include "ipc.h"
1.7 +#include "send_flexpage.h"
1.8 +
1.9 +
1.10 +
1.11 +/* Make a representation of the flexpage for the IPC system. */
1.12 +
1.13 +void ipc_prepare_flexpage(Flexpage *flexpage, unsigned long offset,
1.14 + l4_addr_t hot_spot, unsigned long flags,
1.15 + l4_snd_fpage_t *region)
1.16 +{
1.17 + SendFlexpage send_flexpage = flexpage->to_send(offset, hot_spot);
1.18 +
1.19 + region->fpage = l4_fpage(send_flexpage.base_addr, send_flexpage.order,
1.20 + (flags & L4RE_DS_MAP_FLAG_RW) ? L4_FPAGE_RW
1.21 + : L4_FPAGE_RO);
1.22 + region->snd_base = hot_spot;
1.23 +}
1.24 +
1.25 +// vim: tabstop=4 expandtab shiftwidth=4