mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2025-08-08 22:52:24 -04:00
Wip syscall function.
PoC of how a syscall could look like.
This commit is contained in:
parent
150cf2977f
commit
d22d9b8392
3 changed files with 99 additions and 3 deletions
35
hw/application_fpga/fw/tk1/syscall.h
Normal file
35
hw/application_fpga/fw/tk1/syscall.h
Normal file
|
@ -0,0 +1,35 @@
|
|||
// Copyright (C) 2024 - Tillitis AB
|
||||
// SPDX-License-Identifier: GPL-2.0-only
|
||||
|
||||
#ifndef SYSCALL_H
|
||||
#define SYSCALL_H
|
||||
|
||||
#include "partition_table.h"
|
||||
|
||||
#include <stdint.h>
|
||||
#include <stddef.h>
|
||||
|
||||
|
||||
typedef struct {
|
||||
uint8_t syscall_no;
|
||||
uint32_t offset;
|
||||
uint8_t *data;
|
||||
size_t size;
|
||||
uint32_t *ctx;
|
||||
} syscall_t;
|
||||
|
||||
enum syscall_cmd {
|
||||
BLAKE2S = 0,
|
||||
ALLOC_AREA,
|
||||
DEALLOC_AREA,
|
||||
WRITE_DATA,
|
||||
READ_DATA,
|
||||
PRELOAD_STORE,
|
||||
PRELOAD_DELETE,
|
||||
MGMT_APP_REGISTER,
|
||||
MGMT_APP_UNREGISTER,
|
||||
};
|
||||
|
||||
int syscall(syscall_t *ctx);
|
||||
|
||||
#endif
|
Loading…
Add table
Add a link
Reference in a new issue