diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-12-31 11:50:34 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2009-12-31 11:50:34 +0000 |
commit | 4e750091bd1b280d96213b523509658b572709f3 (patch) | |
tree | 269daf2e861dfbdbb1f4b413a5ac7ac1e27daf9f /sys/arch/sparc64 | |
parent | e0fcd8f96f955f91175c66562f969c330aea5357 (diff) |
Add a few more hypervisor calls.
Diffstat (limited to 'sys/arch/sparc64')
-rw-r--r-- | sys/arch/sparc64/include/hypervisor.h | 8 | ||||
-rw-r--r-- | sys/arch/sparc64/sparc64/hvcall.S | 21 |
2 files changed, 26 insertions, 3 deletions
diff --git a/sys/arch/sparc64/include/hypervisor.h b/sys/arch/sparc64/include/hypervisor.h index b2b6521f996..240bc31c015 100644 --- a/sys/arch/sparc64/include/hypervisor.h +++ b/sys/arch/sparc64/include/hypervisor.h @@ -1,4 +1,4 @@ -/* $OpenBSD: hypervisor.h,v 1.11 2009/05/10 12:18:18 kettenis Exp $ */ +/* $OpenBSD: hypervisor.h,v 1.12 2009/12/31 11:50:33 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -199,11 +199,15 @@ int64_t hv_ldc_set_map_table(uint64_t ldc_id, paddr_t base_raddr, 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); + paddr_t raddr, psize_t length, psize_t *ret_length); #define LDC_COPY_IN 0 #define LDC_COPY_OUT 1 +int64_t hv_ldc_mapin(uint64_t ldc_id, uint64_t cookie, paddr_t *raddr, + uint64_t *perms); +int64_t hv_ldc_unmap(paddr_t raddr, uint64_t *perms); + /* * Cryptographic services */ diff --git a/sys/arch/sparc64/sparc64/hvcall.S b/sys/arch/sparc64/sparc64/hvcall.S index 99b283b09f0..390fc4696cf 100644 --- a/sys/arch/sparc64/sparc64/hvcall.S +++ b/sys/arch/sparc64/sparc64/hvcall.S @@ -1,4 +1,4 @@ -/* $OpenBSD: hvcall.S,v 1.8 2009/01/02 15:35:54 kettenis Exp $ */ +/* $OpenBSD: hvcall.S,v 1.9 2009/12/31 11:50:33 kettenis Exp $ */ /* * Copyright (c) 2008 Mark Kettenis @@ -103,6 +103,10 @@ #define LDC_GET_MAP_TABLE 0xeb #define LDC_COPY 0xec +#define LDC_MAPIN 0xed +#define LDC_UNMAP 0xee +#define LDC_REVOKE 0xef + #define RNG_GET_DIAG_CONTROL 0x130 #define RNG_CTL_READ 0x131 #define RNG_CTL_WRITE 0x132 @@ -498,6 +502,21 @@ ENTRY(hv_ldc_copy) retl stx %o1, [%g5] +ENTRY(hv_ldc_mapin) + mov %o2, %o4 + mov LDC_MAPIN, %o5 + ta FAST_TRAP + stx %o1, [%o4] + retl + stx %o2, [%o3] + +ENTRY(hv_ldc_unmap) + mov %o1, %o2 + mov LDC_UNMAP, %o5 + ta FAST_TRAP + retl + stx %o1, [%o2] + ENTRY(hv_rng_get_diag_control) mov RNG_GET_DIAG_CONTROL, %o5 ta FAST_TRAP |