diff options
author | kmacy <kmacy@FreeBSD.org> | 2006-11-23 04:59:29 +0000 |
---|---|---|
committer | kmacy <kmacy@FreeBSD.org> | 2006-11-23 04:59:29 +0000 |
commit | c7bcd7c5182cdfbbe1d99da465b1e6861de7ac98 (patch) | |
tree | fcd265d0598c9f8b6229af4a1c14875b67e2698a | |
parent | e0820ca720a1fc23471df665a9cc7be06d968872 (diff) | |
download | FreeBSD-src-c7bcd7c5182cdfbbe1d99da465b1e6861de7ac98.zip FreeBSD-src-c7bcd7c5182cdfbbe1d99da465b1e6861de7ac98.tar.gz |
Add watchdog support
-rw-r--r-- | sys/sun4v/include/hypervisor_api.h | 1 | ||||
-rw-r--r-- | sys/sun4v/sun4v/hcall.S | 26 |
2 files changed, 24 insertions, 3 deletions
diff --git a/sys/sun4v/include/hypervisor_api.h b/sys/sun4v/include/hypervisor_api.h index f75141b..2102bf5 100644 --- a/sys/sun4v/include/hypervisor_api.h +++ b/sys/sun4v/include/hypervisor_api.h @@ -85,6 +85,7 @@ extern uint64_t hv_service_setstatus(uint64_t s_id, uint64_t bits); extern uint64_t hv_service_clrstatus(uint64_t s_id, uint64_t bits); extern uint64_t hv_mach_desc(uint64_t buffer_ra, uint64_t *buffer_sizep); +extern uint64_t hv_mach_watchdog(uint64_t timeout, uint64_t *time_remaining); extern uint64_t hv_ttrace_buf_info(uint64_t *, uint64_t *); extern uint64_t hv_ttrace_buf_conf(uint64_t, uint64_t, uint64_t *); diff --git a/sys/sun4v/sun4v/hcall.S b/sys/sun4v/sun4v/hcall.S index a741c80..427c119 100644 --- a/sys/sun4v/sun4v/hcall.S +++ b/sys/sun4v/sun4v/hcall.S @@ -1156,14 +1156,26 @@ ENTRY(hv_ttrace_addentry) nop END(hv_ttrace_addentry) - +/* + * MACH_EXIT + * arg0 exit code + * + */ +ENTRY(hv_mach_exit) + mov HV_MACH_EXIT, %o5 + ta FAST_TRAP + retl + nop +END(hv_mach_exit) /* * MACH_DESC * arg0 buffer real address * arg1 pointer to uint64_t for size of buffer + * * ret0 status * ret1 return required size of buffer / returned data size + * */ ENTRY(hv_mach_desc) mov %o1, %o4 ! save datap @@ -1174,6 +1186,16 @@ ENTRY(hv_mach_desc) stx %o1, [%o4] END(hv_mach_desc) +ENTRY(hv_mach_watchdog) + mov %o1, %o2 + mov HV_MACH_SET_WATCHDOG, %o5 + ta FAST_TRAP + brnz,pn %o0, 1f + nop + stx %o1, [%o2] +1: retl + nop +END(hv_mach_watchdog) /* * hv_ncs_request(int cmd, uint64_t realaddr, size_t sz) */ @@ -1187,7 +1209,6 @@ END(hv_ncs_request) /* * hv_ra2pa(uint64_t ra) * - * MACH_DESC * arg0 Real address to convert * ret0 Returned physical address or -1 on error */ @@ -1204,7 +1225,6 @@ END(hv_ra2pa) /* * hv_hpriv(void *func, uint64_t arg1, uint64_t arg2, uint64_t arg3) * - * MACH_DESC * arg0 OS function to call * arg1 First arg to OS function * arg2 Second arg to OS function |