You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/api/DEBUGGING.md
+14-16Lines changed: 14 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -122,12 +122,14 @@ Instead, debug events and messages are forwarded to a special unprivileged box,
122
122
123
123
The debug box driver is encoded in a standard table (a C `struct`) that must be populated by a debug box at initialization time. A debug box can decide to implement only some of the available handlers, although they must all exist at least as empty functions, otherwise the program behaviour might be unpredictable.
124
124
125
-
Currently, only one debug handler is provided. A debug box driver will always expect a `get_version()` handler in position 0 of the function table:
125
+
Currently, only one debug handler — `halt_error` — is provided. This handler only executes once, so if another fault occurs during its execution, the uVisor does not de-privilege again, halting instead. A debug box driver will also expect a `get_version()` handler in position 0 of the function table:
126
+
127
+
Debug box handlers can also reset the device by calling the `NVIC_SystemReset()` API. This API cannot be called from other secure boxes.
126
128
127
129
```C
128
130
typedefstruct TUvisorDebugDriver {
129
131
uint32_t (*get_version)(void); /* 0. Return the implemented driver version. */
130
-
void (*halt_error)(int); /* 1. Halt on error. Reboot upon return. */
132
+
void (*halt_error)(int); /* 1. Halt on error. Halt upon return. */
131
133
}
132
134
```
133
135
@@ -137,28 +139,29 @@ The following is an example of how to implement and configure a debug box.
0 commit comments