mirror of
https://github.com/genodelabs/genode.git
synced 2025-01-03 04:26:45 +00:00
foc: increase USER_BASE_CAP
due to THREAD_AREA_SLOT increase by foc/x86: implement vm_session interface Add additional static assertion check to detect misconfiguration earlier.
This commit is contained in:
parent
38a10c92d3
commit
356526d610
@ -71,10 +71,14 @@ namespace Fiasco {
|
|||||||
|
|
||||||
|
|
||||||
/*********************************************************
|
/*********************************************************
|
||||||
** Capability seclectors controlled by the task itself **
|
** Capability selectors controlled by the task itself **
|
||||||
*********************************************************/
|
*********************************************************/
|
||||||
|
|
||||||
static constexpr l4_cap_idx_t USER_BASE_CAP = 0x200UL << L4_CAP_SHIFT;
|
static constexpr unsigned THREAD_MAX = (1 << 7);
|
||||||
|
static constexpr l4_cap_idx_t USER_BASE_CAP = 0x300 << L4_CAP_SHIFT;
|
||||||
|
|
||||||
|
static_assert(USER_BASE_CAP > THREAD_MAX * THREAD_AREA_SLOT,
|
||||||
|
"USER_BASE_CAP too small for supported maximal threads");
|
||||||
|
|
||||||
struct Capability
|
struct Capability
|
||||||
{
|
{
|
||||||
|
@ -52,20 +52,19 @@ namespace Genode {
|
|||||||
Platform_pd &operator = (Platform_pd const &);
|
Platform_pd &operator = (Platform_pd const &);
|
||||||
|
|
||||||
enum {
|
enum {
|
||||||
THREAD_MAX = (1 << 7),
|
UTCB_AREA_SIZE = (Fiasco::THREAD_MAX * Fiasco::L4_UTCB_OFFSET),
|
||||||
UTCB_AREA_SIZE = (THREAD_MAX * Fiasco::L4_UTCB_OFFSET),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
addr_t utcb_area_start()
|
addr_t utcb_area_start()
|
||||||
{
|
{
|
||||||
return NON_CORE_STACK_AREA_ADDR +
|
return NON_CORE_STACK_AREA_ADDR +
|
||||||
THREAD_MAX*stack_virtual_size();
|
Fiasco::THREAD_MAX*stack_virtual_size();
|
||||||
}
|
}
|
||||||
|
|
||||||
Cap_mapping _task;
|
Cap_mapping _task;
|
||||||
Cap_mapping _parent { };
|
Cap_mapping _parent { };
|
||||||
Cap_mapping _debug { };
|
Cap_mapping _debug { };
|
||||||
Platform_thread *_threads[THREAD_MAX] { };
|
Platform_thread *_threads[Fiasco::THREAD_MAX] { };
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user