Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 17 Jan 2004 17:42:00 +0100 (CET)
From:      Norbert Koch <nkoch@gmx.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   i386/61481: a mechanism to wire io-channel-check to userland
Message-ID:  <200401171642.i0HGg0wp000615@k62300.koch>
Resent-Message-ID: <200401171650.i0HGoMAl095604@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200401171642.i0HGg0wp000615>