summaryrefslogtreecommitdiff
path: root/sys/arch/sparc64
diff options
context:
space:
mode:
authorMark Kettenis <kettenis@cvs.openbsd.org>2008-12-30 21:25:27 +0000
committerMark Kettenis <kettenis@cvs.openbsd.org>2008-12-30 21:25:27 +0000
commitd2c65efb855d90b10ba26d735f53c8fc5d7e4ca4 (patch)
tree863e85d3c7078f25090e61bd7d5eb2b4fd90c8f1 /sys/arch/sparc64
parentfe8cb5140588688302411d0682fdeba281df60b8 (diff)
Implement the mach_desc hypervisor call.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r--sys/arch/sparc64/include/hypervisor.h4
-rw-r--r--sys/arch/sparc64/sparc64/hvcall.S10
2 files changed, 12 insertions, 2 deletions
diff --git a/sys/arch/sparc64/include/hypervisor.h b/sys/arch/sparc64/include/hypervisor.h
index a7b42ad0287..910403e377b 100644
--- a/sys/arch/sparc64/include/hypervisor.h
+++ b/sys/arch/sparc64/include/hypervisor.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: hypervisor.h,v 1.4 2008/12/30 00:51:26 kettenis Exp $ */
+/* $OpenBSD: hypervisor.h,v 1.5 2008/12/30 21:25:26 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -31,6 +31,8 @@ int64_t hv_api_get_version(uint64_t api_group,
* Domain services
*/
+int64_t hv_mach_desc(paddr_t buffer, psize_t *length);
+
/*
* CPU services
*/
diff --git a/sys/arch/sparc64/sparc64/hvcall.S b/sys/arch/sparc64/sparc64/hvcall.S
index 34c8fb3a72d..f94e0884137 100644
--- a/sys/arch/sparc64/sparc64/hvcall.S
+++ b/sys/arch/sparc64/sparc64/hvcall.S
@@ -1,4 +1,4 @@
-/* $OpenBSD: hvcall.S,v 1.4 2008/12/30 00:51:26 kettenis Exp $ */
+/* $OpenBSD: hvcall.S,v 1.5 2008/12/30 21:25:26 kettenis Exp $ */
/*
* Copyright (c) 2008 Mark Kettenis
@@ -108,6 +108,14 @@ ENTRY(hv_api_get_version)
retl
stx %o2, [%o4]
+ENTRY(hv_mach_desc)
+ mov %o1, %o2
+ ldx [%o2], %o1
+ mov MACH_DESC, %o5
+ ta FAST_TRAP
+ retl
+ stx %o1, [%o2]
+
ENTRY(hv_cpu_yield)
mov CPU_YIELD, %o5
ta FAST_TRAP