Module Name: src Committed By: thorpej Date: Tue Sep 29 01:17:22 UTC 2020
Modified Files: src/sys/arch/alpha/alpha: pal.s src/sys/arch/alpha/include: alpha_cpu.h Log Message: Add alpha_pal_wtint(), which invokes the WTINT PALcode call. To generate a diff of this commit: cvs rdiff -u -r1.15 -r1.16 src/sys/arch/alpha/alpha/pal.s cvs rdiff -u -r1.51 -r1.52 src/sys/arch/alpha/include/alpha_cpu.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/arch/alpha/alpha/pal.s diff -u src/sys/arch/alpha/alpha/pal.s:1.15 src/sys/arch/alpha/alpha/pal.s:1.16 --- src/sys/arch/alpha/alpha/pal.s:1.15 Mon May 13 21:38:30 2002 +++ src/sys/arch/alpha/alpha/pal.s Tue Sep 29 01:17:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: pal.s,v 1.15 2002/05/13 21:38:30 thorpej Exp $ */ +/* $NetBSD: pal.s,v 1.16 2020/09/29 01:17:22 thorpej Exp $ */ /* * Copyright (c) 1994, 1995 Carnegie-Mellon University. @@ -39,7 +39,7 @@ * and Richard T. Witek. */ -__KERNEL_RCSID(1, "$NetBSD: pal.s,v 1.15 2002/05/13 21:38:30 thorpej Exp $"); +__KERNEL_RCSID(1, "$NetBSD: pal.s,v 1.16 2020/09/29 01:17:22 thorpej Exp $"); inc2: .stabs __FILE__,132,0,0,inc2; .loc 1 __LINE__ /* @@ -155,3 +155,26 @@ LEAF_NOPROFILE(alpha_pal_wrvptptr,1) call_pal PAL_OSF1_wrvptptr RET END(alpha_pal_wrvptptr) + +/* + * alpha_pal_wtint: Wait for interrupt. [PRIVILEGED] + * + * Arguments: + * a0 maximum number of clock interrupts to skip + * + * Return value: + * v0 actual number of clock interrupts skipped + * + * WTINT waits, in a low power mode, for either any device interrupt or + * for the next clock interrupt (a0 == 0) or up to the specified number + * of clock interrupts to pass. Note that the PCC may slow or stop + * while waiting. + * + * Not all PALcode versions support WTINT. If it is not supported, + * an OPDEC fault will occur. + */ + .text +LEAF_NOPROFILE(alpha_pal_wtint,1) + call_pal PAL_wtint + RET + END(alpha_pal_wtint) Index: src/sys/arch/alpha/include/alpha_cpu.h diff -u src/sys/arch/alpha/include/alpha_cpu.h:1.51 src/sys/arch/alpha/include/alpha_cpu.h:1.52 --- src/sys/arch/alpha/include/alpha_cpu.h:1.51 Sat Sep 5 16:29:08 2020 +++ src/sys/arch/alpha/include/alpha_cpu.h Tue Sep 29 01:17:22 2020 @@ -1,4 +1,4 @@ -/* $NetBSD: alpha_cpu.h,v 1.51 2020/09/05 16:29:08 thorpej Exp $ */ +/* $NetBSD: alpha_cpu.h,v 1.52 2020/09/29 01:17:22 thorpej Exp $ */ /* * Copyright (c) 1996 Carnegie-Mellon University. @@ -378,6 +378,7 @@ void alpha_pal_halt(void) __attribute__ unsigned long _alpha_pal_swpipl(unsigned long); /* for profiling */ void alpha_pal_wrent(void *, unsigned long); void alpha_pal_wrvptptr(unsigned long); +unsigned long alpha_pal_wtint(unsigned long); #define alpha_pal_draina() __asm volatile("call_pal %0 # PAL_draina" \ : : "i" (PAL_draina) : "memory")