doc: Add ERASE_DATA syscall

This commit is contained in:
Mikael Ågren 2025-04-17 08:44:15 +02:00
parent c13f102d1e
commit 0b0bfa4b78
No known key found for this signature in database
GPG Key ID: E02DA3D397792C46
2 changed files with 17 additions and 3 deletions

View File

@ -79,9 +79,9 @@ For full change log [see](https://github.com/tillitis/tillitis-key1/compare/TK1-
- Support a filesystem on flash.
- Add a system call mechanism and system calls: `RESET`, `ALLOC_AREA`,
`DEALLOC_AREA`, `WRITE_DATA`, `READ_DATA`, `PRELOAD_DELETE`,
`PRELOAD_STORE`, `PRELOAD_STORE_FIN`, `PRELOAD_GET_DIGSIG`,
`STATUS`, and `GET_VIDPID`. See [firmware's
`DEALLOC_AREA`, `WRITE_DATA`, `READ_DATA`, `ERASE_DATA`,
`PRELOAD_DELETE`, `PRELOAD_STORE`, `PRELOAD_STORE_FIN`,
`PRELOAD_GET_DIGSIG`, `STATUS`, and `GET_VIDPID`. See [firmware's
README](../hw/application_fpga/fw/README.md) for documentation.
- Harmonize with [tkey-libs](https://github.com/tillitis/tkey-libs).

View File

@ -594,6 +594,20 @@ syscall(TK1_SYSCALL_READ_DATA, offset, (uint32_t)buf, sizeof(buf);
Read into `buf` at byte `offset` from the app's flash area.
#### `ERASE_DATA`
```
uint32_t offset = 0;
uint32_t size = 4096;
syscall(TK1_SYSCALL_ERASE_DATA, offset, size, 0);
```
Erase `size` bytes from `offset` within the area. Returns 0 on
success.
Both `size` and `offset` must be a multiple of 4096 bytes.
#### `PRELOAD_DELETE`
```