-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdemo_tum_course.camkes
92 lines (77 loc) · 2.4 KB
/
demo_tum_course.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
/**
* Main CAmkES configuration file of the exercise demo application.
*
* Copyright (C) 2021-2023, Hensoldt Cyber GmbH
*/
#include "system_config.h"
/* os_core_api CAmkES files */
import <std_connector.camkes>;
#include "EntropySource/camkes/EntropySource.camkes"
#include "TimeServer/camkes/TimeServer.camkes"
/* Network / Network Stack */
#include "NetworkStack_PicoTcp/camkes/NetworkStack_PicoTcp.camkes"
#include "plat_nic.camkes"
/* Our own components */
#include "components/WolfTPM/WolfTPM.camkes"
#include "components/TestApp/TestApp.camkes"
#include "components/SecureCommunication/SecureCommunication.camkes"
TimeServer_COMPONENT_DEFINE(TimeServer)
NetworkStack_PicoTcp_COMPONENT_DEFINE(
NetworkStack_PicoTcp,
NIC_DRIVER_RINGBUFFER_SIZE,
NetworkStack_PicoTcp_NO_ADDITIONAL_INTERFACES)
assembly {
composition {
component TestApp testApp;
component WolfTPM wolfTPM;
component WolfTPM_HW wolfTPM_HW;
component SecureCommunication secureCommunication;
component TimeServer timeServer;
EXERCISE_DEMO_NIC_INSTANCE(nwDriver)
component NetworkStack_PicoTcp nwStack;
/* TPM */
WolfTPM_HW_CONNECT(wolfTPM, wolfTPM_HW)
WolfTPM_INSTANCE_CONNECT_CLIENT(
wolfTPM,
secureCommunication.entropy_rpc, secureCommunication.entropy_dp,
secureCommunication.keystore_rpc, secureCommunication.keystore_dp,
secureCommunication.crypto_rpc, secureCommunication.crypto_dp,
testApp.tpm_ctrl_rpc
)
/* Secure Communication */
NetworkStack_PicoTcp_INSTANCE_CONNECT_CLIENTS(
nwStack,
secureCommunication, networkStack
)
IF_OS_SOCKET_CONNECT(
secureCommunication, secureCommunication,
testApp, secureCommunication,
1
)
/* Network Stack */
TimeServer_INSTANCE_CONNECT_CLIENTS(
timeServer,
EXERCISE_DEMO_NIC_CONNECTION_TIMESERVER(nwDriver)
nwStack.timeServer_rpc, nwStack.timeServer_notify
)
NetworkStack_PicoTcp_INSTANCE_CONNECT(
nwStack,
nwDriver
)
}
configuration {
WolfTPM_HW_CONFIGURE_SELF(wolfTPM_HW)
TimeServer_CLIENT_ASSIGN_BADGES(
EXERCISE_DEMO_NIC_TIMESERVER_CLIENTS(nwDriver)
nwStack.timeServer_rpc
)
EXERCISE_DEMO_NIC_CONFIG(nwDriver)
NetworkStack_PicoTcp_CLIENT_ASSIGN_BADGES(
secureCommunication, networkStack
)
NetworkStack_PicoTcp_INSTANCE_CONFIGURE_CLIENTS(
nwStack,
2
)
}
}