blob: 1b950d6b1db63f1a8e9b19ae78509d9fd71bbcb2 [file] [log] [blame] [view]
Valerio Setti4f4ade92024-05-03 17:28:04 +02001# psasim
2
3This tool simulates a PSA Firmware Framework implementation.
4It allows you to develop secure partitions and their clients on a desktop computer.
5It should be able to run on all systems that support POSIX and System V IPC:
6e.g. macOS, Linux, FreeBSD, and perhaps Windows 10 WSL2.
7
8Please note that the code in this directory is maintained by the Mbed TLS / PSA Crypto project solely for the purpose of testing the use of Mbed TLS with client/service separation. We do not recommend using this code for any other purpose. In particular:
9
10* This simulator is not intended to pass or demonstrate compliance.
11* This code is only intended for simulation and does not have any security goals. It does not isolate services from clients.
12
13## Building
14
15To build and run the test program make sure you have `make`, `python` and a
16C compiler installed and then enter the following commands:
17
18```sh
19make run
20```
21
22Optionally the `DEBUG=1` command line option can be enabled to increase verbosity:
23
24```sh
25make DEBUG=1 run
26```
27
28Once done with the test, it is possible to clean all the generated files with:
29
30```sh
31make clean
32```
33
34## Features
35
36The implemented API is intended to be compliant with PSA-FF 1.0.0 with the exception of a couple of things that are a work in progress:
37
38* `psa_notify` support
39* "strict" policy in manifest
40
41The only supported "interrupts" are POSIX signals, which act
42as a "virtual interrupt".
43
44The standard PSA RoT APIs are not included (e.g. cryptography, attestation, lifecycle etc).
45
46## Design
47
48The code is designed to be readable rather than fast or secure.
49In this implementation only one message is delivered to a
50RoT service at a time.
51The code is not thread-safe.
52
53## Unsupported features
54
55Because this is a simulator there are a few things that
56can't be reasonably emulated:
57
58* Manifest MMIO regions are unsupported
59* Manifest priority field is ignored
60* Partition IDs are in fact POSIX `pid_t`, which are only assigned at runtime,
61 making it infeasible to populate pid.h with correct values.