nova: increase default capability selector count

The reference count get increase to use 2 bytes, so we need the double amount
of selectors as before.

Additionally print a message if we run out of capabilities in a server. Since
our rpc framework is now clever enough to detect that for a printf we don't
need to setup a receive window, we may use a printf instead of a die call.
Eases debugging.

Issue #1601
This commit is contained in:
Alexander Boettcher 2015-07-14 16:19:14 +02:00 committed by Christian Helmuth
parent 626b0a68f3
commit f87c573695
3 changed files with 3 additions and 5 deletions

View File

@ -159,10 +159,8 @@ void Rpc_entrypoint::_activation_entry()
tmp->release();
}
/* if we can't setup receive window, die in order to recognize the issue */
if (!ep->_rcv_buf.prepare_rcv_window((Nova::Utcb *)ep->utcb()))
/* printf doesn't work here since for IPC also prepare_rcv_window is used */
nova_die();
PWRN("out of capability selectors for handling server requests");
srv << IPC_REPLY;
}

View File

@ -77,7 +77,7 @@ void prepare_init_main_thread()
/* for Core we can't perform the following code so early */
if (!__initial_sp) {
enum { CAP_RANGES = 16 };
enum { CAP_RANGES = 32 };
unsigned index = initial_cap_range()->base() +
initial_cap_range()->elements();

View File

@ -627,7 +627,7 @@ Platform::Platform() :
/* add capability selector ranges to map */
unsigned index = 0x2000;
for (unsigned i = 0; i < 16; i++)
for (unsigned i = 0; i < 32; i++)
{
void * phys_ptr = 0;
ram_alloc()->alloc(4096, &phys_ptr);