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:
Alexander Boettcher 2019-04-02 11:39:26 +02:00 committed by Christian Helmuth
parent 38a10c92d3
commit 356526d610
2 changed files with 9 additions and 6 deletions

View File

@ -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
{

View File

@ -52,20 +52,19 @@ namespace Genode {
Platform_pd &operator = (Platform_pd const &);
enum {
THREAD_MAX = (1 << 7),
UTCB_AREA_SIZE = (THREAD_MAX * Fiasco::L4_UTCB_OFFSET),
UTCB_AREA_SIZE = (Fiasco::THREAD_MAX * Fiasco::L4_UTCB_OFFSET),
};
addr_t utcb_area_start()
{
return NON_CORE_STACK_AREA_ADDR +
THREAD_MAX*stack_virtual_size();
Fiasco::THREAD_MAX*stack_virtual_size();
}
Cap_mapping _task;
Cap_mapping _parent { };
Cap_mapping _debug { };
Platform_thread *_threads[THREAD_MAX] { };
Platform_thread *_threads[Fiasco::THREAD_MAX] { };
public: