nova: set default receive and translate windows

This commit is contained in:
Alexander Boettcher 2013-02-06 10:25:45 +01:00 committed by Norman Feske
parent 250f7b1570
commit 467eec731f
3 changed files with 17 additions and 2 deletions

View File

@ -151,6 +151,11 @@ void Thread_base::start()
request_event_portal(_pager_cap, _tid.exc_pt_sel, PT_SEL_RECALL);
}
/* default: we don't accept any mappings or translations */
Utcb * utcb_obj = reinterpret_cast<Utcb *>(utcb());
utcb_obj->crd_rcv = Obj_crd();
utcb_obj->crd_xlt = Obj_crd();
/* request creation of SC to let thread run*/
env()->cpu_session()->resume(_thread_cap);
}

View File

@ -91,6 +91,11 @@ class Irq_thread : public Thread_base
throw Cpu_session::Thread_creation_failed();
}
/* default: we don't accept any mappings or translations */
Utcb * utcb_obj = reinterpret_cast<Utcb *>(Thread_base::utcb());
utcb_obj->crd_rcv = Obj_crd();
utcb_obj->crd_xlt = Obj_crd();
/* create SC */
unsigned sc_sel = cap_selector_allocator()->alloc();
res = create_sc(sc_sel, pd_sel, _tid.ec_sel, Qpd());

View File

@ -77,9 +77,10 @@ void Thread_base::start()
*/
using namespace Nova;
addr_t sp = reinterpret_cast<addr_t>(&_context->stack[-4]);
addr_t sp = reinterpret_cast<addr_t>(&_context->stack[-4]);
addr_t utcb = reinterpret_cast<addr_t>(&_context->utcb);
addr_t pd_sel = Platform_pd::pd_core_sel();
Utcb * utcb_obj = reinterpret_cast<Utcb *>(&_context->utcb);
addr_t pd_sel = Platform_pd::pd_core_sel();
/* create local EC */
enum { CPU_NO = 0, GLOBAL = false };
@ -90,6 +91,10 @@ void Thread_base::start()
throw Cpu_session::Thread_creation_failed();
}
/* default: we don't accept any mappings or translations */
utcb_obj->crd_rcv = Obj_crd();
utcb_obj->crd_xlt = Obj_crd();
if (map_local(reinterpret_cast<Nova::Utcb *>(Thread_base::myself()->utcb()),
Obj_crd(PT_SEL_PAGE_FAULT, 0),
Obj_crd(_tid.exc_pt_sel + PT_SEL_PAGE_FAULT, 0))) {