]> rtime.felk.cvut.cz Git - l4.git/blob - l4/pkg/plr/server/src/constants.h
update
[l4.git] / l4 / pkg / plr / server / src / constants.h
1 #pragma once
2
3 /*
4  * constants.h --
5  *
6  * Globally used constants
7  *
8  * (c) 2011-2013 Björn Döbel <doebel@os.inf.tu-dresden.de>,
9  *     economic rights: Technische Universität Dresden (Germany)
10  * This file is part of TUD:OS and distributed under the terms of the
11  * GNU General Public License 2.
12  * Please see the COPYING-GPL-2 file for details.
13  */
14
15 /*
16  * Traditional vCPU handling method: every replica raises a fault
17  * on its local vCPU and handles it on the own physical core.
18  */
19 #define LOCAL_HANDLING 1
20
21 /*
22  * Resilient cores test case 1: Upon a vCPU fault, migrate
23  * the faulting vCPU to a resilient core (== CPU0). There,
24  * handling is executed (and can be assumed to not fail). Before
25  * resuming the vCPU, migrate back to the replica CPU, which
26  * is assumed to be unsafe.
27  */
28 #define MIGRATE_VCPU 0
29
30 /*
31  * Resilient cores test case 2: Have a dedicated vCPU handler
32  * thread on a resilient core (==CPU0). The non-resilient vCPU
33  * handler then only sends an IPC to this thread in order to trigger
34  * handling.
35  */
36 #define SPLIT_HANDLING 0
37
38 namespace Romain
39 {
40         enum {
41                 MAX_REPLICAS        =  3,        // maximum # of allowed replicas
42                 MAX_OBSERVERS       = 16,        // maximum # of fault observers
43                 TRAMPOLINE_SIZE     = 64,        // size of the per-thread trampoline area
44                 HANDLER_STACK_SIZE  = (1 << 14), // size of the VCPU handler stack
45                 DEBUG_ENTRIES       = 1000,      // dbg: # of 64bit entries in thread->_measurements
46                 FIRST_REPLICA_CAP   = 0x1000,    // first replica cap markes as unused
47                 LOCK_INFO_PAGE      = 0xA000,    // address the lock info page is mapped to in replicas
48                 REPLICA_TSC_ADDRESS = 0xC000,    // start of replica-shared TSC buffer
49                 REPLICA_LOG_ADDRESS = 0xB0000000,   // start of replica log buffer (XXX: don't go lower -> KIP is there!)
50         };
51 }