aboutsummaryrefslogtreecommitdiff
path: root/pk/hcall.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 23:06:07 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 23:06:52 -0700
commit438823e1308b219aa7daf11cf86e3028e9b8667d (patch)
tree8f1a6b40e8d4fa7f421f869f20d7d4ee126b096b /pk/hcall.h
parent6517fe26a2a0c89c3112f4a383c601572c71d64a (diff)
downloadpk-438823e1308b219aa7daf11cf86e3028e9b8667d.zip
pk-438823e1308b219aa7daf11cf86e3028e9b8667d.tar.gz
pk-438823e1308b219aa7daf11cf86e3028e9b8667d.tar.bz2
Use hcall instead of mcall for sbi calls
Diffstat (limited to 'pk/hcall.h')
-rw-r--r--pk/hcall.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/pk/hcall.h b/pk/hcall.h
new file mode 100644
index 0000000..7e89f2b
--- /dev/null
+++ b/pk/hcall.h
@@ -0,0 +1,15 @@
+#ifndef _PK_HCALL_H
+#define _PK_HCALL_H
+
+#define HCALL_HART_ID 0
+#define HCALL_CONSOLE_PUTCHAR 1
+#define HCALL_SEND_DEVICE_REQUEST 2
+#define HCALL_RECEIVE_DEVICE_RESPONSE 3
+
+#ifndef __ASSEMBLER__
+
+extern uintptr_t do_hcall(uintptr_t which, ...);
+
+#endif
+
+#endif