summaryrefslogtreecommitdiff
path: root/sys/arch
diff options
context:
space:
mode:
Diffstat (limited to 'sys/arch')
-rw-r--r--sys/arch/sparc64/include/hypervisor.h12
-rw-r--r--sys/arch/sparc64/sparc64/hvcall.S28
2 files changed, 38 insertions, 2 deletions
diff --git a/sys/arch/sparc64/include/hypervisor.h b/sys/arch/sparc64/include/hypervisor.h
index 77769d238ee..8b811aa7e42 100644
--- a/sys/arch/sparc64/include/hypervisor.h
+++ b/sys/arch/sparc64/include/hypervisor.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hypervisor.h,v 1.9 2008/12/31 23:38:38 kettenis Exp $ */
+/* $OpenBSD: hypervisor.h,v 1.10 2009/01/02 15:35:54 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -191,6 +191,16 @@ int64_t hv_ldc_rx_set_qhead(uint64_t ldc_id, uint64_t head_offset);
#define LDC_CHANNEL_UP 1
#define LDC_CHANNEL_RESET 2
+int64_t hv_ldc_set_map_table(uint64_t ldc_id, paddr_t base_raddr,
+ uint64_t nentries);
+int64_t hv_ldc_get_map_table(uint64_t ldc_id, paddr_t *base_raddr,
+ uint64_t *nentries);
+int64_t hv_ldc_copy(uint64_t ldc_id, uint64_t flags, uint64_t cookie,
+ paddr_t raddr, psize_t length, paddr_t *ret_length);
+
+#define LDC_COPY_IN 0
+#define LDC_COPY_OUT 1
+
/*
* Cryptographic services
*/
diff --git a/sys/arch/sparc64/sparc64/hvcall.S b/sys/arch/sparc64/sparc64/hvcall.S
index 27760228698..99b283b09f0 100644
--- a/sys/arch/sparc64/sparc64/hvcall.S
+++ b/sys/arch/sparc64/sparc64/hvcall.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: hvcall.S,v 1.7 2008/12/31 23:38:38 kettenis Exp $ */
+/* $OpenBSD: hvcall.S,v 1.8 2009/01/02 15:35:54 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -99,6 +99,10 @@
#define LDC_RX_GET_STATE 0xe6
#define LDC_RX_SET_QHEAD 0xe7
+#define LDC_SET_MAP_TABLE 0xea
+#define LDC_GET_MAP_TABLE 0xeb
+#define LDC_COPY 0xec
+
#define RNG_GET_DIAG_CONTROL 0x130
#define RNG_CTL_READ 0x131
#define RNG_CTL_WRITE 0x132
@@ -472,6 +476,28 @@ ENTRY(hv_ldc_rx_set_qhead)
retl
nop
+ENTRY(hv_ldc_set_map_table)
+ mov LDC_SET_MAP_TABLE, %o5
+ ta FAST_TRAP
+ retl
+ nop
+
+ENTRY(hv_ldc_get_map_table)
+ mov %o2, %o4
+ mov %o1, %o3
+ mov LDC_GET_MAP_TABLE, %o5
+ ta FAST_TRAP
+ stx %o1, [%o3]
+ retl
+ stx %o2, [%o4]
+
+ENTRY(hv_ldc_copy)
+ mov %o5, %g5
+ mov LDC_COPY, %o5
+ ta FAST_TRAP
+ retl
+ stx %o1, [%g5]
+
ENTRY(hv_rng_get_diag_control)
mov RNG_GET_DIAG_CONTROL, %o5
ta FAST_TRAP