Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-17 Thread Robert Millan
On Sat, Aug 16, 2008 at 09:44:22AM -0500, David Fries wrote: > On Sat, Aug 16, 2008 at 02:33:17PM +0200, Robert Millan wrote: > > > > We have 4 ports on i386. A proper implementation of grub_cpu_idle > > should work fine on all of them. When I say "proper" I mean that > > 'hlt' instruction shoul

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-16 Thread David Fries
On Sat, Aug 16, 2008 at 02:33:17PM +0200, Robert Millan wrote: > On Fri, Aug 15, 2008 at 10:11:09PM -0500, David Fries wrote: > > [...]. Until I have an > > application for it, I'll have to let someone else implement support > > for grub_cpu_idle. > > We have 4 ports on i386. A proper implementa

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-16 Thread Robert Millan
On Fri, Aug 15, 2008 at 10:11:09PM -0500, David Fries wrote: > [...]. Until I have an > application for it, I'll have to let someone else implement support > for grub_cpu_idle. We have 4 ports on i386. A proper implementation of grub_cpu_idle should work fine on all of them. When I say "proper"

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-15 Thread David Fries
On Tue, Aug 12, 2008 at 11:10:37AM +0200, Robert Millan wrote: > > Hi David, > > I'm sorry that you already went on to provide a patch, but the problem is > not that. > > The problem is that on some platforms (like coreboot), the firmware won't > setup any IDT for us, and so we need to do this o

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-13 Thread Marco Gerards
David Fries <[EMAIL PROTECTED]> writes: > Enable grub_cpu_idle for i386 to halt the CPU and modify the menu code > to make use of it. This will save power when booting. > Or maybe I should say it will keep the CPU from running so hot when > the timer is counting down. > > It isn't safe to call ha

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-12 Thread Robert Millan
On Tue, Aug 12, 2008 at 11:10:37AM +0200, Robert Millan wrote: > > +void > > +grub_cpu_idle () > > +{ > > + struct timespec req={0,1}; > > + nanosleep (&req, NULL); > > +} > > grub_cpu_idle is intended to be a (cpu-independant) primitive, not a stub for > nanosleep. Ah, sorry. I notice you're

Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-12 Thread Robert Millan
On Mon, Aug 11, 2008 at 10:07:08PM -0500, David Fries wrote: > Enable grub_cpu_idle for i386 to halt the CPU and modify the menu code > to make use of it. This will save power when booting. > Or maybe I should say it will keep the CPU from running so hot when > the timer is counting down. > > It

[PATCH] Enable grub_cpu_idle for i386 to halt the CPU

2008-08-11 Thread David Fries
Enable grub_cpu_idle for i386 to halt the CPU and modify the menu code to make use of it. This will save power when booting. Or maybe I should say it will keep the CPU from running so hot when the timer is counting down. It isn't safe to call halt in protected mode as interrupts are disabled. I