Date: Tue, 10 Mar 1998 02:30:03 +0300 (MSK) From: Andrew Maltsev <am@amsoft.ru> To: walter@fortean.com (Bruce M. Walter) Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: APM power off (patch) Message-ID: <199803092330.CAA06308@amsoft.ru> In-Reply-To: <Pine.BSF.3.96.980309174043.18073A-100000@aries.fortean.com> from "Bruce M. Walter" at "Mar 9, 98 05:58:54 pm"
next in thread | previous in thread | raw e-mail | index | archive | help
> If a powerfail occurs, the daemon is notified. When it decides to > poweroff the system, executes the command 'reboot -p'. This starts a > kernel shutdown with the RB_POWEROFF flag set. The system then goes > through a regular reboot/shutdown sequence: > > 1) Execute all registered SHUTDOWN_PRE_SYNC functions > 2) Kill all processes > 3) Sync the filesystem > 4) Execute all registered SHUTDOWN_POST_SYNC functions > 5) (with patches) Execute all registered SHUTDOWN_POWEROFF functions > 6) Halt if requested > 7) Check for a panic > 8) Reboot > > Steps 1, 4 and 5 call functions which can exist outside the kernel in > drivers and LKM's. These functions have access to the RB_* flags passed > to reboot and can do whatever they need to poweroff the system. Ok. I understand. But should we distinguish devices and core system? All the time I mean powering off core system after all devices were shut down or powered down by their drivers - by at_shutdown queues or other means. So, step 8) should be: 8) reboot or power off, whatever requested. It's only thing I'm pretending for now :) For most systems (even server systems) it's enough according to my expirience.. But of course it would be nice to have easy way to manage power supply of any device (and then post calls to at_shutdown queues or register apropriate services). Only problem I see is how to correspond exact device to exact APM device id. It's known only to BIOS and only for devices BIOS understand (if I read spec right). To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803092330.CAA06308>