Fpage mapping in L4 Pistachio

Katsumi Maruyama <[email protected]>
Newsgroups gmane.comp.micro-kernel.l4.l4ka.general
Message-ID <[email protected]>

For inter-process data copying,
I am using Flex page mapping conveniently.

However, I noticed copy failure when the Fpage is large.

My program outline is as follows:
(Code is only explanatory, not real one)

Let me call the mapping side process as Mapper,
and mapped side process as Mappee.

==== (1) Mappee ==================

(1-1) Receive window
Fpage:
mappeefpage: L4_Fpage(0x40000000, 0x100000)
i.e. 1 mega bytes recv window from 1 Giga

==== (2) Mapper ===================

(2-1) Buffer to send/receive data
char xbuf[XSIZE];
// This buffer happened being allocated at 0xA26820.

The Flex page which cover this buffer is used for mapping.
strncpy() is used for string copying.


====== (3) Situation ========

(3-1) WHEN XSIZE <= 6112: No problem

Fpage of Mapper:
mapperfpage: L4_Fpage(0xA26000, 0x2000) with R/W permissions

MapItem:
mapitem: L4_MapItem(mapperfpage, 0)
i.e. send-base is 0.

Fpage is mapped, and data is rightly copyed from Mappee to Mapper.


(3-2) WHEN XSIZE > 6112: COPY FAILED

Fpage of Mapper:
mapperfpage: L4_Fpage(0xA20000, 0x10000) with R/W permissions
// To cover the buffer, Fpage becomes large !
// as the buffer happened to be at 0xA26820 !
MapItem:
mapitem: L4_MapItem(mapperfpage, 0)
i.e. send-base is 0.

==> NO DATA COPIED.

( Cf. 0xA26820 + 6112 == 0xA28000.
&xbuf[6112] is 0xA28000)


===== (4) Question ======

Am I misunderstanding the fpage mapping usage, or
are there some restriction or limitation in L4 flex page mapping ?

Thank in advance.
---
K. Maruyama
National Institute of Informatics, Japan
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.