25
25
26
26
UVISOR_EXTERN const uint32_t __uvisor_mode ;
27
27
28
+ /** @defgroup box_config Box configuration
29
+ *
30
+ * @brief Creating and configuring secure boxes
31
+ * @{
32
+ */
33
+
28
34
#define UVISOR_DISABLED 0
29
35
#define UVISOR_PERMISSIVE 1
30
36
#define UVISOR_ENABLED 2
@@ -60,14 +66,15 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
60
66
\
61
67
extern const __attribute__((section(".keep.uvisor.cfgtbl_ptr_first"), aligned(4))) void * const main_cfg_ptr = &main_cfg;
62
68
63
- /* Creates a global page heap with at least `minimum_number_of_pages` each of size `page_size` in bytes.
69
+ /** Creates a global page heap with at least `minimum_number_of_pages` each of size `page_size` in bytes.
64
70
* The total page heap size is at least `minimum_number_of_pages * page_size`. */
65
71
#define UVISOR_SET_PAGE_HEAP (page_size , minimum_number_of_pages ) \
66
72
const uint32_t __uvisor_page_size = (page_size); \
67
73
uint8_t __attribute__((section(".keep.uvisor.page_heap"))) \
68
74
main_page_heap_reserved[ (page_size) * (minimum_number_of_pages) ]
69
75
70
76
77
+ /** @cond UVISOR_INTERNAL */
71
78
/* this macro selects an overloaded macro (variable number of arguments) */
72
79
#define __UVISOR_BOX_MACRO (_1 , _2 , _3 , _4 , NAME , ...) NAME
73
80
@@ -135,13 +142,15 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
135
142
#define UVISOR_BOX_CONFIG (...) \
136
143
UVISOR_BOX_CONFIG_ACL(__VA_ARGS__)
137
144
138
- /* Use this macro before box defintion (for example, UVISOR_BOX_CONFIG) to
145
+ /** @endcond */
146
+
147
+ /** Use this macro before box defintion (for example, `UVISOR_BOX_CONFIG`) to
139
148
* define the name of your box. If you don't want a name, use this macro with
140
- * box_namespace as NULL. */
149
+ * box_namespace as ` NULL` . */
141
150
#define UVISOR_BOX_NAMESPACE (box_namespace ) \
142
151
static const char *const __uvisor_box_namespace = box_namespace
143
152
144
- /* Use this macro before UVISOR_BOX_CONFIG to define the function the main
153
+ /** Use this macro before ` UVISOR_BOX_CONFIG` to define the function the main
145
154
* thread of your box will use for its body. If you don't want a main thread,
146
155
* too bad: you have to have one. */
147
156
#define UVISOR_BOX_MAIN (function , priority , stack_size ) \
@@ -153,13 +162,21 @@ UVISOR_EXTERN const uint32_t __uvisor_mode;
153
162
154
163
#define uvisor_ctx (*__uvisor_ps)
155
164
156
- /* Copy the box namespace of the specified box ID to the memory provided by
165
+ /** @} */
166
+
167
+ /** @addtogroup box_info
168
+ * @{
169
+ */
170
+
171
+ /** Copy the box namespace of the specified box ID to the memory provided by
157
172
* box_namespace. The box_namespace's length must be at least
158
- * MAX_BOX_NAMESPACE_LENGTH bytes. Return how many bytes were copied into
159
- * box_namespace. Return UVISOR_ERROR_INVALID_BOX_ID if the provided box ID is
160
- * invalid. Return UVISOR_ERROR_BUFFER_TOO_SMALL if the provided box_namespace
161
- * is too small to hold MAX_BOX_NAMESPACE_LENGTH bytes. Return
162
- * UVISOR_ERROR_BOX_NAMESPACE_ANONYMOUS if the box is anonymous. */
173
+ * `UVISOR_MAX_BOX_NAMESPACE_LENGTH` bytes. Return how many bytes were copied into
174
+ * box_namespace. Return ` UVISOR_ERROR_INVALID_BOX_ID` if the provided box ID is
175
+ * invalid. Return ` UVISOR_ERROR_BUFFER_TOO_SMALL` if the provided box_namespace
176
+ * is too small to hold ` MAX_BOX_NAMESPACE_LENGTH` bytes. Return
177
+ * ` UVISOR_ERROR_BOX_NAMESPACE_ANONYMOUS` if the box is anonymous. */
163
178
UVISOR_EXTERN int uvisor_box_namespace (int box_id , char * box_namespace , size_t length );
164
179
180
+ /** @} */
181
+
165
182
#endif /* __UVISOR_API_BOX_CONFIG_H__ */
0 commit comments