fw: Add syscalls

Adds:
- SYSCALL_RESET
- SYSCALL_SET_LED

Co-authored-by: Michael Cardell Widerkrantz <mc@tillitis.se>
This commit is contained in:
Mikael Ågren 2025-01-30 17:28:19 +01:00
parent 969df46315
commit d82c3a706e
No known key found for this signature in database
GPG key ID: E02DA3D397792C46
10 changed files with 283 additions and 9 deletions

View file

@ -9,6 +9,7 @@
#include "lib.h"
#include "proto.h"
#include "state.h"
#include "syscall_enable.h"
#include "types.h"
// clang-format off
@ -343,13 +344,10 @@ static void run(const struct context *ctx)
#endif
// clang-format on
// Flip over to application mode
*app_mode_ctrl = 1;
// XXX Firmware stack now no longer available
// Don't use any function calls!
syscall_enable();
// Jump to app - doesn't return
// Hardware is responsible for switching to app mode
// clang-format off
#ifndef S_SPLINT_S
asm volatile(