sysbeep-keep-at-halt.patch -- NetBSD 11.0/x86: keep sysbeep0 attached at halt, so "options BEEP_ONHALT" can sound (NetBSD PR kern/60735). Needs pcppi-keep-at-halt.patch as well. Apply in usr/src with: patch -p0 Author: Royce Williams License: the same terms as each NetBSD source file it modifies. --- sys/arch/x86/isa/clock.c.orig +++ sys/arch/x86/isa/clock.c @@ -169,9 +169,20 @@ void sysbeepattach(device_t, device_t, void *); int sysbeepdetach(device_t, int); +/* + * SYSBEEP_KEEP_AT_HALT -- NOT DVF_DETACH_SHUTDOWN. With that flag, + * config_detach_all() at arch/i386/i386/machdep.c:838 detaches sysbeep0 + * during an ordinary "shutdown -h", sysbeepdetach() clears ppi_attached, + * and the BEEP_ONHALT block 47 lines later calls a sysbeep() that does + * nothing. PR kern/60735; upstream x86/isa/clock.c rev 1.44 reverts rev + * 1.32, which is where the flag was added. + * + * NOT SUFFICIENT ALONE: see PCPPI_KEEP_AT_HALT in sys/dev/isa/pcppi.c, + * without which the beep sounds at an unprogrammed 18 Hz. + */ CFATTACH_DECL3_NEW(sysbeep, 0, sysbeepmatch, sysbeepattach, sysbeepdetach, NULL, NULL, NULL, - DVF_DETACH_SHUTDOWN); + 0); static int ppi_attached; static pcppi_tag_t ppicookie;