grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: David Fries
Subject: Re: [PATCH] Enable grub_cpu_idle for i386 to halt the CPU
Date: Sat, 16 Aug 2008 09:44:22 -0500
User-agent: Mutt/1.5.4i

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 implementation of grub_cpu_idle
> should work fine on all of them.  When I say "proper" I mean that
> 'hlt' instruction should be usable without doing strange gimmicks.

<sarcasm>
Gasp, grub_biosdisk_rw calls grub_biosdisk_rw_int13_extensions which
for i386/pc call prot_to_real and back.  There's like 40 other calls
doing this strange gimmick of going to real mode for various things.
</sarcasm>

> Your patch simply works around the fact that 'hlt' is broken on 32-bit by
> going back to i8086 mode in order to use it.

Pavel Roskin didn't like an earlier patch of mine to add a whole 10
assembly instructions to the core.mod.  This is the first time I've
dealt with the uglieness of BIOS, but I don't see why anyone would
trade a straight forward 6 instruction grub_cpu_idle to make use of
the BIOS facilities, for reimplementing an interrupt stack and drivers
to acknowledge those interrupts, when grub heavily depends on BIOS to
be there and working.

I believe that's what one calls platform specific.  i386/pc provides
the support required for hlt to work, coreboot doesn't, it's coreboot
that would need interrupts setup, a different platform, a different
solution, and very much independent.

Maybe I should mention that hlt is already being used in real mode.
Protected mode interrupts would cause that to break.

-- 
David Fries <address@hidden>
http://fries.net/~david/ (PGP encryption key available)




reply via email to

[Prev in Thread] Current Thread [Next in Thread]