Merge branch 'rahix/lifecycle'
This changeset implements a proper lifecycle of the core 1 payload.
The implementation faces some difficulties because there is no way to
properly reset just core 1. Instead, we chose a cooperative approach:
To perform a reset, core 1 jumps to a reset-stub and is then fed a new
IVT location which it uses to "restart" with a new payload. The jump to
the reset-stub is either voluntary by a call to epic_exit() or epix_exec(),
or involuntary by Epicardium issuing a "reset" interrupt. This is a
special API interrupt whose handler is pre-implemented in the API-caller
lib.
Additionally, this changeset contains support for defining which python
script Pycardium should execute on startup. This way, scripts can issue
the start of one another using `epic_exec("script-name.py")`.
Finally, this changeset also changes the power-button behavior.
Pressing the power button will now excert the following behavior:
- `<400 ms`: Return back to menu
- `<1 s`: Reset card10
- `>1 s`: Poweroff
Signed-off-by:
Rahix <rahix@rahix.de>
epicardium/api/control.c
0 → 100644