hw: remove main thread's initial UTCB from vm area

The main thread's UTCB, used during bootstrap of the main thread before
it allocates its context area, needs to be outside the virtual memory
area controlled by the RM session, because it is needed before the main
thread can access its RM session.

Fix #1804
This commit is contained in:
Stefan Kalkowski 2015-12-02 14:13:01 +01:00 committed by Christian Helmuth
parent 610b733133
commit 2316937e58
1 changed files with 9 additions and 7 deletions

View File

@ -186,14 +186,16 @@ class Genode::Native_utcb
namespace Genode
{
static constexpr addr_t VIRT_ADDR_SPACE_START = 0x1000;
static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffef000;
static constexpr size_t VIRT_ADDR_SPACE_SIZE = 0xfffee000;
static constexpr Native_utcb * utcb_main_thread()
{
return (Native_utcb *)
((VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE - sizeof(Native_utcb))
& ~(get_page_size() - 1));
}
/**
* The main thread's UTCB, used during bootstrap of the main thread before it
* allocates its context area, needs to be outside the virtual memory area
* controlled by the RM session, because it is needed before the main
* thread can access its RM session.
*/
static constexpr Native_utcb * utcb_main_thread() {
return (Native_utcb *) (VIRT_ADDR_SPACE_START + VIRT_ADDR_SPACE_SIZE); }
}
#endif /* _BASE__NATIVE_TYPES_H_ */