[coyotos-dev] Last IDL issue
Charles Landau
clandau at macslab.com
Tue Jul 10 12:47:34 EDT 2007
At 12:25 PM -0400 7/10/07, Jonathan S. Shapiro wrote:
>There is another IDL issue. It's not really a discussion topic; this is
>more of a status update.
>
>We initially thought that the Coyotos syscall interface should use
>capitem_t. A capitem_t is a discriminated union that can either be a
>memory address or a register number.
>
>That implementation looked pretty ugly, so we switched to a scheme where
>the kernel-level interface wants registers but the system call has four
>phases:
>
> load multiple caps
> send phase
> receive phase
> store multiple caps
I'm guessing the capability registers into which the caps are loaded
and from which they are stored are dedicated registers.
>same effect, different approach. Main advantage is that the store
>multiple caps always happens w.r.t. your own address space, so it is a
>little cleaner.
>
>The hope was that for applications that ran entirely in capability
>registers, we could avoid the LMCAP and SMCAP phases.
>
>Problems:
>
>1. On the send side, the IDL compiler cannot know that the application
>is register-only, so when it tries to decide whether LMCAP is needed, it
>ends up emitting exactly the conditional checks that we were trying to
>avoid.
IsRegister(capitem) is a conditional check, but if capitem is a
constant and the stub is inlined, the compiler can optimize it away.
(Does it really do so?) It seems to me this would be a common case.
>In light of this, it seems pretty clear that we aren't winning on the
>*send* caps, and we should just spec the invocation interface to accept
>capitem_t and quit trying to dance around this.
Since you are in the sender's address space, this doesn't sound difficult.
More information about the coyotos-dev
mailing list