Hi,
I am quite stuck with a problem I encountered when using a timer connection in Vancouver. As soon as the unique IDs of the capabilities for RPC reach numbers >= 0x100000, RPC calls fail because of calls to invalid portal numbers. In my particular case, there are 4 portals created:
[ 0] EC:0xc0019f00 SYS_CREATE PT:0x1a06 EC:0xa7 EIP:0x139950 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x1a07 EC:0xa7 EIP:0x1398d0 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x1a08 EC:0xa7 EIP:0x139950 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x1a09 EC:0xa7 EIP:0x1398d0
In base/include/base/rpc_client.h, I inserted a debug statement showing that the "internal" portal being called is 0x82260. I think this is due to the translation between global capability selectors and NOVA portals, is that correct?
When the internal IDs hit 0x100000, what happens is this:
[ 0] EC:0xc0019f00 SYS_CREATE PT:0x30e6 EC:0xa7 EIP:0x139950 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x30e7 EC:0xa7 EIP:0x1398d0 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x30e8 EC:0xa7 EIP:0x139950 [ 0] EC:0xc0019f00 SYS_CREATE PT:0x30e9 EC:0xa7 EIP:0x1398d0
But the next event in NOVA is a call to portal number 0x100018, which doesn't exist because it was not created beforehand. It seems to me that from this point in time, the internal IDs are being used as NOVA portals somehow. But all I found was this unmarshalling method in base-nova/include/base/ipc.h:
inline void Genode::Ipc_istream::_unmarshal_capability(Genode::Native_capability &cap) { long unique_id = 0; _read_from_buf(unique_id); int pt_sel = unique_id != ~0L ? _rcv_msg->rcv_pt_sel() : 0;
cap = Native_capability(pt_sel, unique_id); }
I put another debug instruction there and found out that rcv_pt_base was 0x100018, when the call failed.
Right now I'm quite lost in all that RPC and Capability wrangling. Maybe someone can shed some light on this? How is that translation between internal IDs and NOVA portals done, anyway?
Cheers
Markus