Skip to content

Commit 5ee821b

Browse files
authored
Merge pull request #411 from AnotherButler/AnotherButler
Copy edit uVisor documents
2 parents 2d0187d + 4daae23 commit 5ee821b

File tree

9 files changed

+552
-692
lines changed

9 files changed

+552
-692
lines changed

CONTRIBUTING.md

Lines changed: 6 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,14 @@
1-
ARM mbed OS is an Open Source project. We encourage you to pitch in, and we
2-
welcome contributions and [bug reports](../../issues).
1+
ARM mbed OS is an open source project. We welcome contributions and [bug reports](../../issues).
32

4-
* If you want to submit a bug report please make sure to follow our
5-
[reporting guidelines](https://github.com/ARMmbed/mbed-os/blob/master/Reporting%20Bugs.md).
3+
- If you want to submit a bug report, please follow our [reporting guidelines](https://github.com/ARMmbed/mbed-os/blob/master/Reporting%20Bugs.md).
64

7-
* If you want to submit a patch, please read the
8-
[contribution guide](https://github.com/ARMmbed/mbed-os/blob/master/Contributing%20to%20mbed.md).
9-
Note that we have a
10-
[Contributor Agreement](http://developer.mbed.org/contributor_agreement/)
11-
that must be agreed to before contributions can be merged. To agree to the
12-
contributor agreement, you need to have an mbed.com account and be logged in.
13-
**We only accept [bug reports](../../issues) and pull requests [via GitHub](../../)**.
5+
- If you want to submit a patch, please read the [contribution guide](https://docs.mbed.com/docs/mbed-os-handbook/en/latest/cont/contributing/). Note that we have a [Contributor Agreement](http://developer.mbed.org/contributor_agreement/) that you must agree to before we can merge your contributions. To agree to the contributor agreement, you need to have a [developer.mbed.org](https://developer.mbed.org/account/signup/) account and be logged in. **We only accept [bug reports](../../issues) and pull requests [via GitHub](../../)**.
146

15-
* If you have a question about how to use mbed OS, please search the
16-
[mbed forums](http://forums.mbed.com/c/mbed-os), and if you still need help,
17-
post a new topic there.
7+
- If you have a question about how to use mbed OS, please search the [mbed forums](http://forums.mbed.com/c/mbed-os), and if you still need help, post a new topic there.
188

19-
* Before contributing an enhancement (new feature, new port etc) please start by
20-
[discussing it on the forums](http://forums.mbed.com/c/mbed-os)
21-
to avoid duplication of work - as we or others might work on a related feature already.
22-
This will help streamline your pull request for getting it merged quickly.
9+
- Before contributing an enhancement (such as a new feature or port), please start by [discussing it on the forums](http://forums.mbed.com/c/mbed-os) to avoid duplication of work. This will help streamline your pull request for a quick merge.
2310

24-
* If you work for an [mbed Partner company](http://www.mbed.com/en/partners/our-partners/),
25-
you will have a partner manager assigned to you who can help you navigate the
26-
process and get the best out of your partnership.
11+
- If you work for an [mbed Partner company](http://www.mbed.com/en/partners/our-partners/), the partner manager assigned to you can help you navigate the process and get the most out of your partnership.
2712

2813
Thanks! :heart:
2914

README.md

Lines changed: 66 additions & 74 deletions
Large diffs are not rendered by default.

docs/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,25 @@
11
# The uVisor Documentation
22

3-
The uVisor documentation is divided into two areas, depending on what your interest. These domains are described below. If you instead are interested in the general uVisor design philosophy, you can see our [high level introduction to mbed uVisor](https://github.com/ARMmbed/uvisor/raw/docs/uVisorSecurity-TechCon2016.pdf) or refer to the uVisor [GitHub documentation](../README.md).
3+
The uVisor documentation consists of two sections, API documentation and core documentation. You can find descriptions of these domains below. If you instead are interested in the general uVisor design philosophy, see the [high-level introduction to mbed uVisor](https://github.com/ARMmbed/uvisor/raw/docs/uVisorSecurity-TechCon2016.pdf) or refer to the uVisor [GitHub documentation](../README.md).
44

55
## API documentation
66

7-
These are the user-facing documents. They are the ideal starting point to know what you can do with uVisor, and how to setup an application to use the uVisor features.
7+
These user-facing documents show what you can do with uVisor and how to set up an application that uses the uVisor features.
88

99
| I want to... | Document |
1010
|-------------------------------------------------------|--------------------------------------------------------------|
11-
| Get a high level introduction to mbed uVisor | [Practical real-time operating system security for the masses](https://github.com/ARMmbed/uvisor/raw/docs/uVisorSecurity-TechCon2016.pdf) |
12-
| Start using uVisor in mbed OS on a supported platform | [Quick-Start Guide for uVisor on mbed OS](api/QUICKSTART.md) |
11+
| See a high-level introduction to mbed uVisor | [Practical real-time operating system security for the masses](https://github.com/ARMmbed/uvisor/raw/docs/uVisorSecurity-TechCon2016.pdf) |
12+
| Start using uVisor in mbed OS on a supported platform | [Getting started guide for uVisor on mbed OS](api/QUICKSTART.md) |
1313
| Read the uVisor API documentation in detail | [The uVisor API documentation](api/API.md) |
1414
| Enable the uVisor debug messages | [Debugging uVisor on mbed OS](api/DEBUGGING.md) |
1515

1616
## Core documentation
1717

18-
These documents describe the uVisor internals more in details. They are useful if you need to contribute to uVisor, compile a specific uVisor version, or if you just want to know more about the uVisor core.
18+
These documents describe the uVisor internals in more detail. They are useful if you want to contribute to uVisor, compile a specific uVisor version or just know more about the uVisor core.
1919

2020
| I want to... | Document |
2121
|----------------------------------|-------------------------------------------------------------------------------------------------------|
2222
| Understand uVisor integration | [mbed uVisor integration in mbed OS](https://github.com/ARMmbed/uvisor/raw/docs/uvisor-rtos-docs.pdf) |
23-
| Port uVisor to my platform/OS | [uVisor Porting Guide for mbed OS](core/PORTING.md) |
24-
| Test and experiment with uVisor | [Developing with uVisor Locally on mbed OS](core/DEVELOPING_LOCALLY.md) |
25-
| Contribute to uVisor | [Contributing to uVisor](../CONTRIBUTING.md) |
23+
| Port uVisor to my platform/OS | [uVisor porting guide for mbed OS](core/PORTING.md) |
24+
| Test and experiment with uVisor | [Developing with uVisor locally on mbed OS](core/DEVELOPING_LOCALLY.md) |
25+
| Contribute to uVisor | [Contributing to uVisor](../CONTRIBUTING.md)

docs/api/API.md

Lines changed: 18 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,7 @@
11
# uVisor API documentation
22

3-
Here you can find detailed documentation for:
4-
5-
1. [Configuration macros](#configuration-macros), to configure a secure box and protect data and peripherals.
6-
1. [Box Identity](#box-identity), to retrieve a box-specific ID or the namespace of the current or calling box.
7-
1. [Low level APIs](#low-level-apis), to access uVisor functions that are not available to unprivileged code (interrupts, restricted system registers).
8-
1. [Type definitions](#type-definitions).
9-
1. [Error codes](#error-codes).
10-
113
## Configuration macros
4+
You can use configuration macros to configure a secure box and protect data and peripherals.
125

136
```C
147
UVISOR_BOX_CONFIG(box_name
@@ -24,7 +17,7 @@ UVISOR_BOX_CONFIG(box_name
2417
</tr>
2518
<tr>
2619
<td>Type</td>
27-
<td colspan="2">C/C++ pre-processor macro (pseudo-function)</td>
20+
<td colspan="2">C/C++ preprocessor macro (pseudo-function)</td>
2821
</tr>
2922
<tr>
3023
<td rowspan="4">Parameters</td>
@@ -46,6 +39,7 @@ UVISOR_BOX_CONFIG(box_name
4639
</table>
4740
4841
Example:
42+
4943
```C
5044
#include "uvisor-lib/uvisor-lib.h"
5145
@@ -107,11 +101,7 @@ Example:
107101
UVISOR_SET_MODE(UVISOR_ENABLED);
108102
```
109103

110-
**Note:**
111-
112-
1. This macro is only needed temporarily (uVisor disabled by default) and will be removed in the future.
113-
114-
2. This macro must be used only once in the top level yotta executable.
104+
**Note:** This macro is only temporary (uVisor disabled by default) and will be removed in the future.
115105

116106
---
117107

@@ -161,11 +151,7 @@ static const UvBoxAclItem g_background_acl[] = {
161151
UVISOR_SET_MODE_ACL(UVISOR_ENABLED, g_background_acl);
162152
```
163153

164-
**Note:**
165-
166-
1. This macro is only needed temporarily (uVisor disabled by default) and will be removed in the future.
167-
168-
2. This macro must be used only once in the top level yotta executable.
154+
**Note:** This macro is only temporary (uVisor disabled by default) and will be removed in the future.
169155

170156
---
171157

@@ -178,15 +164,15 @@ UVISOR_BOX_NAMESPACE(static const char const namespace[])
178164
<td>Description</td>
179165
<td colspan="2"><p>Specify the namespace for a box.</p>
180166
181-
<p>The namespace of the box must be a null-terminated string no longer than <code>MAX_BOX_NAMESPACE_LENGTH</code> (including the terminating null). The namespace must also be stored in public flash. uVisor will verify that the namespace is null-terminated and stored in public flash at boot-time, and will halt if the namespace fails this verification.</p>
167+
<p>The namespace of the box must be a null-terminated string no longer than <code>MAX_BOX_NAMESPACE_LENGTH</code> (including the terminating null). The namespace must also be stored in public flash. uVisor will verify that the namespace is null-terminated and stored in public flash at boot-time and will halt if the namespace fails this verification.</p>
182168
183169
<p>For now, use a reverse domain name for the box namespace. If you don't have a reverse domain name, use a GUID string identifier. We currently don't verify that the namespace is globally unique, but we will perform this validation in the future.</p>
184170
185-
<p>Use of this configuration macro before <code>UVISOR_BOX_CONFIG</code> is required. If you do not wish to give your box a namespace, specify <code>NULL</code> as the namespace to create an anonymous box.</p>
171+
<p>You must use this configuration macro before <code>UVISOR_BOX_CONFIG</code>. If you do not wish to give your box a namespace, specify <code>NULL</code> as the namespace to create an anonymous box.</p>
186172
</tr>
187173
<tr>
188174
<td>Type</td>
189-
<td colspan="2">C/C++ pre-processor macro (pseudo-function)</td>
175+
<td colspan="2">C/C++ preprocessor macro (pseudo-function)</td>
190176
</tr>
191177
<tr>
192178
<td rowspan="1">Parameters</td>
@@ -204,17 +190,16 @@ UVISOR_BOX_NAMESPACE("com.example.my-box-name");
204190
UVISOR_BOX_CONFIG(my_box_name, UVISOR_BOX_STACK_SIZE);
205191
```
206192

207-
## Box Identity
208-
193+
## Box identity
209194
A box identity identifies a security domain uniquely and globally.
210195

211-
The box identity API can be used to determine the source box of an inbound secure gateway call. This can be useful for implementing complex authorization logic between mutually distrustful security domains.
196+
You can use the box identity API to determine the source box of an inbound secure gateway call. This can be useful for implementing complex authorization logic between mutually distrustful security domains.
212197

213198
uVisor provides the ability to retrieve the box ID of the current box (`uvisor_box_id_self`), or of the box that called the current box through an RPC gateway via the `box_id_caller` parameter of `rpc_fncall_waitfor`.
214199

215-
The box ID number is not constant and can change between reboots. But, the box ID number can be used as a token to retrieve a constant string identifier, known as the box namespace.
200+
The box ID number is not constant and can change between reboots, but you can use it as a token to retrieve a constant string identifier, known as the box namespace.
216201

217-
A box namespace is a static, box-specific string, that can help identify which box has which ID at run-time. In the future, the box namespace will be guaranteed to be globally unique.
202+
A box namespace is a static, box-specific string that can help identify which box has which ID at runtime. In the future, the box namespace will be globally unique.
218203

219204
A full example using this API is available at [mbed-os-example-uvisor-number-store](https://github.com/ARMmbed/mbed-os-example-uvisor-number-store).
220205

@@ -250,7 +235,7 @@ int rpc_fncall_waitfor(const TFN_Ptr fn_ptr_array[], size_t fn_count, int * box_
250235
</tr>
251236
</table>
252237

253-
> When deciding which memory to provide for `rpc_fncall_waitfor` to use when writing `box_id_caller`, strongly prefer thread local storage when multiple threads in a box can handle incoming RPC.
238+
> When deciding which memory to provide for `rpc_fncall_waitfor` to use when writing `box_id_caller`, use thread local storage when multiple threads in a box can handle incoming RPC.
254239
255240
---
256241

@@ -284,9 +269,7 @@ int uvisor_box_namespace(int box_id, char *box_namespace, size_t length)
284269
285270
## Low-level APIs
286271
287-
Currently the following low level operations are permitted:
288-
289-
1. Interrupt management.
272+
You can use low-level APIs to access uVisor functions that are not available to unprivileged code (interrupts, restricted system registers). The only permitted low-level operation is interrupt management.
290273
291274
### Interrupt management
292275
@@ -297,15 +280,15 @@ void vIRQ_SetVector(uint32_t irqn, uint32_t vector)
297280
<table>
298281
<tr>
299282
<td>Description</td>
300-
<td colspan="2">Set an ISR for IRQn</td>
283+
<td colspan="2">Register an ISR to the currently active box</td>
301284
<tr>
302285
<td rowspan="2">Parameters</td>
303286
<td><pre>uint32_t irqn<code></td>
304287
<td>IRQn</td>
305288
</tr>
306289
<tr>
307290
<td><pre>uint32_t vector<code></td>
308-
<td>Interrupt handler
291+
<td>Interrupt handler; if 0 the IRQn slot is deregistered for the current
309292
box</td>
310293
</tr>
311294
</table>
@@ -486,7 +469,7 @@ int vIRQ_GetLevel(void)
486469
## Type definitions
487470
488471
```C
489-
typedef uint32_t UvisroBoxAcl; /* Permssion mask */
472+
typedef uint32_t UvisroBoxAcl; /* Permission mask */
490473
```
491474

492475
---
@@ -511,4 +494,4 @@ typedef struct
511494
| `FAULT_BUS` | 6 |
512495
| `FAULT_USAGE` | 7 |
513496
| `FAULT_HARD` | 8 |
514-
| `FAULT_DEBUG` | 9 |
497+
| `FAULT_DEBUG` | 9 |

0 commit comments

Comments
 (0)