blob: e8f2863180e88bc674f20568dc64c4876dd995bf [file] [log] [blame] [view]
Minos Galanakis2c824b42025-03-20 09:28:45 +00001# 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 install
20make run
21```
22
23On Linux you may need to run `ldconfig` to ensure the library is properly installed.
24
25An example pair of programs is included in the `test` directory.
26
27## Features
28
29The 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:
30
31* `psa_notify` support
32* "strict" policy in manifest
33
34The only supported "interrupts" are POSIX signals, which act
35as a "virtual interrupt".
36
37The standard PSA RoT APIs are not included (e.g. cryptography, attestation, lifecycle etc).
38
39## Design
40
41The code is designed to be readable rather than fast or secure.
42In this implementation only one message is delivered to a
43RoT service at a time.
44The code is not thread-safe.
45
46To debug the simulator enable the debug flag:
47
48```sh
49make DEBUG=1 install
50```
51
52## Unsupported features
53
54Because this is a simulator there are a few things that
55can't be reasonably emulated:
56
57* Manifest MMIO regions are unsupported
58* Manifest priority field is ignored
59* Partition IDs are in fact POSIX `pid_t`, which are only assigned at runtime,
60 making it infeasible to populate pid.h with correct values.