-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathvm_cross_connector.camkes
126 lines (97 loc) · 2.93 KB
/
vm_cross_connector.camkes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
/*
* Copyright 2017, Data61, CSIRO (ABN 41 687 119 230)
*
* SPDX-License-Identifier: BSD-2-Clause
*/
import <std_connector.camkes>;
import <global-connectors.camkes>;
/*
* can't import VM.camkes, because it adds dependencies on components instead of
* just the interfaces
*
*/
import <vm-connectors.camkes>;
import <seL4VMDTBPassthrough.idl4>;
import <Batch.idl4>;
import <PutChar.idl4>;
import <GetChar.idl4>;
import <VirtQueues.idl4>;
import <FileServerInterface.camkes>;
#define FIRST_CROSS_VM_BADGE (1 << 3)
component CrossvmInit {
control;
consumes Ready ready;
emits Done done;
dataport Buf(4096) dest;
dataport Buf(4096) src;
}
#include <configurations/vm.h>
component VM {
VM_INIT_DEF()
dataport Buf(4096) crossvm_dp_0;
dataport Buf(4096) crossvm_dp_1;
emits Ready ready;
consumes Done done;
}
// Components
import <VirtQueue/VirtQueue.camkes>;
import <FileServer/FileServer.camkes>;
// Platform specific configurations
#include <plat.camkes>
assembly {
composition {
component FileServer fileServer;
//--------------------------------------------------------------
// VM0
//--------------------------------------------------------------
component VM vm0;
connection seL4GlobalAsynch vm0_notify_ready(
from vm0.notification_ready_connector,
to vm0.notification_ready
);
connection seL4RPCDataport vm0_fs(
from vm0.fs,
to fileServer.fs_ctrl
);
component CrossvmInit crossvm_init;
connection seL4Notification event_conn_0(
from vm0.ready,
to crossvm_init.ready
);
connection seL4GlobalAsynch event_conn_1(
from crossvm_init.done,
to vm0.done
);
connection seL4SharedDataWithCaps cross_vm_conn_0(
from crossvm_init.dest,
to vm0.crossvm_dp_0
);
connection seL4SharedDataWithCaps cross_vm_conn_1(
from crossvm_init.src,
to vm0.crossvm_dp_1
);
connection seL4VMDTBPassthrough vm0_dtb(
from vm0.dtb_self,
to vm0.dtb
);
}
configuration {
fileServer.heap_size = 0x200000; // 128 KiB seems enough
vm0.fs_shmem_size = 0x100000;
vm0.global_endpoint_base = 1 << 27;
vm0.asid_pool = true;
vm0.simple = true;
vm0.base_prio = 100;
vm0._priority = 101;
vm0.sem_value = 0;
vm0.heap_size = 0x300000;
vm0.num_extra_frame_caps = 0;
vm0.extra_frame_map_address = 0;
vm0.cnode_size_bits = 23;
vm0.simple_untyped24_pool = 12;
vm0.crossvm_dp_0_id = 0;
vm0.crossvm_dp_0_size = 4096;
vm0.crossvm_dp_1_id = 0;
vm0.crossvm_dp_1_size = 4096;
}
}