aboutsummaryrefslogtreecommitdiff
path: root/pk/sbi.h
diff options
context:
space:
mode:
authorAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 17:38:04 -0700
committerAndrew Waterman <waterman@cs.berkeley.edu>2015-03-12 17:38:04 -0700
commit6517fe26a2a0c89c3112f4a383c601572c71d64a (patch)
treed37eea7ae6f3e15eee94afb5c9c749a4cd800577 /pk/sbi.h
parenta4ae7da6ef0c09c2616a0b82f7f569e4e134f75c (diff)
downloadpk-6517fe26a2a0c89c3112f4a383c601572c71d64a.zip
pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.gz
pk-6517fe26a2a0c89c3112f4a383c601572c71d64a.tar.bz2
Update to new privileged spec
Diffstat (limited to 'pk/sbi.h')
-rw-r--r--pk/sbi.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/pk/sbi.h b/pk/sbi.h
new file mode 100644
index 0000000..b9e60b4
--- /dev/null
+++ b/pk/sbi.h
@@ -0,0 +1,27 @@
+#ifndef _ASM_RISCV_SBI_H
+#define _ASM_RISCV_SBI_H
+
+typedef struct {
+ unsigned long base;
+ unsigned long size;
+ unsigned long node_id;
+} memory_block_info;
+
+unsigned long sbi_query_memory(unsigned long id, memory_block_info *p);
+
+unsigned long sbi_hart_id(void);
+unsigned long sbi_num_harts(void);
+void sbi_send_ipi(uintptr_t hart_id);
+void sbi_console_putchar(unsigned char ch);
+
+typedef struct {
+ unsigned long dev;
+ unsigned long cmd;
+ unsigned long data;
+ unsigned long sbi_private_data;
+} sbi_device_message;
+
+unsigned long sbi_send_device_request(uintptr_t req);
+uintptr_t sbi_receive_device_response(void);
+
+#endif