tillitis-key/hw/application_fpga/fw/tk1/syscall.h
Daniel Jobson b602de145c
Wip syscall function.
PoC of how a syscall could look like.
2024-09-23 15:42:24 +02:00

36 lines
505 B
C

// 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