mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-18 18:56:29 +00:00
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:
parent
610b733133
commit
2316937e58
@ -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_ */
|
||||
|
Loading…
Reference in New Issue
Block a user