i386/61481: a mechanism to wire io-channel-check to userland
Norbert Koch
nkoch at gmx.de
Sat Jan 17 08:50:29 PST 2004
>Number: 61481
>Category: i386
>Synopsis: a mechanism to wire io-channel-check to userland
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-i386
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Sat Jan 17 08:50:21 PST 2004
>Closed-Date:
>Last-Modified:
>Originator: Norbert Koch
>Release: FreeBSD 4.9-STABLE i386
>Organization:
>Environment:
System: FreeBSD k62300.koch 4.9-STABLE FreeBSD 4.9-STABLE #0: Thu Jan 1 18:47:59 CET 2004 root at k62300.koch:/usr/src/sys/compile/K62300IOCHK i386
>Description:
I am using FreeBSD in an embedded product. Most of our disk
activity goes to a static ram disk. As power failures are a
normal operating condition we need some way to ensure that
the filesystem on our ram disk is not corrupted.
Our power supply's power fail signal is wired to our cpu board's
io-channel-check signal which triggers an nmi.
I made a small modification to i386/i386/trap.c to allow this
condition to be signaled to userland via a selectable signal.
I added a sysctl and mis-used an (hopefully) unused syscall.
The syscall expects a signal number (or -1 for uninstalling).
Only processes with uid=0 are allowed to do this.
When power fails my application logs the powerfail to a file
on the sram disk, calls sync() and then idles until power
goes off.
>How-To-Repeat:
>Fix:
See enclosed patches against 4.9-stable.
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-i386
mailing list