From owner-freebsd-hackers Mon Mar 9 14:45:35 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id OAA18959 for freebsd-hackers-outgoing; Mon, 9 Mar 1998 14:45:35 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from amsoft.ru (amsoft.ru [194.87.86.241]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id OAA18799 for ; Mon, 9 Mar 1998 14:43:45 -0800 (PST) (envelope-from am@amsoft.ru) Received: (from am@localhost) by amsoft.ru (8.8.8/amsoft/1.0) id BAA05980 ; Tue, 10 Mar 1998 01:25:42 +0300 (MSK) From: Andrew Maltsev Message-Id: <199803092225.BAA05980@amsoft.ru> Subject: Re: APM power off (patch) In-Reply-To: from "Bruce M. Walter" at "Mar 9, 98 04:30:01 pm" To: walter@fortean.com (Bruce M. Walter) Date: Tue, 10 Mar 1998 01:25:41 +0300 (MSK) Cc: freebsd-hackers@FreeBSD.ORG Organization: AM'soft X-Location: Oryol (http://www.oryol.ru/), Russia X-Phone: +7 086 229 9988 X-Mailer: ELM [version 2.4ME+ PL32 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > What can be more standart, than ioctl(/dev/apm) for userland and > > apm_power_off for kernel stuff? > > > > Or should we call it machine_power_off() and place a hook in > > i386/machdep.c? > > The idea is to have a kernel callout hook using the at_shutdown interface. Ok. Please forgive me my stupidness - I still cannot understand what can be broken by calling something_power_off as a very last step of system shutdown procedure? Yes, all that at_shutdown, at_very_shutdown and so on may exist, but what difference does it make? > My personal feeling is that I don't want any APM code at all in my > kernels, especially my server boxes. I do want UPS shutdown code. With > the callout mechanism, I only get the shutdown code which is in the > drivers I use *AND* the kernel doesn't have to know diddly squat about > what ugly and convoluted things I need to do to turn off a UPS or > Motherbord from Vendor XYZ with APM version 99.34 :) APM provides (trough very unpleasant polling interface, yes) the more or less universal mechanism to do the job. How are you planning to power off without APM? Direct i/o programming - it would be a lot of work for nothing.. Or do you mean to switch to real mode after system has been shut down and only then initialize APM and call 0x5307 (by one function in which name there is no `apm' :))? Seems a bit reasonable for busy server (because of 1 Hz polling in APM), but only a bit.. Supposing even 100 cycles to check that no event happened - it's only about 0.00004 percent perfomance degrade. If I understood all wrong - I beg your pardon. It's only some hours ago I first time read that APM spec and started thinking around :) To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message