aboutsummaryrefslogtreecommitdiff
path: root/pk/frontend.c
diff options
context:
space:
mode:
Diffstat (limited to 'pk/frontend.c')
-rw-r--r--pk/frontend.c29
1 files changed, 0 insertions, 29 deletions
diff --git a/pk/frontend.c b/pk/frontend.c
deleted file mode 100644
index 90609d8..0000000
--- a/pk/frontend.c
+++ /dev/null
@@ -1,29 +0,0 @@
-#include "pk.h"
-#include "atomic.h"
-#include "frontend.h"
-#include "pcr.h"
-#include <stdint.h>
-
-sysret_t frontend_syscall(long n, long a0, long a1, long a2, long a3)
-{
- static volatile uint64_t magic_mem[8];
-
- static spinlock_t lock = SPINLOCK_INIT;
- spinlock_lock(&lock);
-
- magic_mem[0] = n;
- magic_mem[1] = a0;
- magic_mem[2] = a1;
- magic_mem[3] = a2;
- magic_mem[4] = a3;
-
- asm volatile ("cflush; fence");
-
- mtpcr(PCR_TOHOST, magic_mem);
- while(mfpcr(PCR_FROMHOST) == 0);
-
- sysret_t ret = {magic_mem[0],magic_mem[1]};
-
- spinlock_unlock(&lock);
- return ret;
-}