grub-devel
[Top][All Lists]
Advanced

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

Re: [PATCH] Workaround for the keyboard hang problem in intel mac


From: Bean
Subject: Re: [PATCH] Workaround for the keyboard hang problem in intel mac
Date: Thu, 8 May 2008 01:29:56 +0800

On Thu, May 8, 2008 at 1:09 AM, Pavel Roskin <address@hidden> wrote:
> On Wed, 2008-05-07 at 21:55 +0800, Bean wrote:
>
>  > +     /*
>  > +      * Due to a bug in apple's bootcamp implementation, INT 16/AH = 0 
> would
>  > +      * cause the machine to hang at the second keystroke. However, we can
>  > +      * work around this problem by ensuring the presence of keystroke 
> with
>  > +      * INT 16/AH = 1 before calling INT 16/AH = 0.
>  > +      */
>
>  Can it be because interrupts are not enabled during the call?

I just check, enabling interrupt alone doesn't solve the problem.
According to the discussion at:

https://www.opensolaris.org/jive/thread.jspa?threadID=7554&tstart=0

Some I/O port is not implemented, I guess this cause INT 16/AH = 0 to
wait forever.

>
>  > +     pushfw
>  > +     sti
>  ...
>  > +     popfw
>
>  I would prefer explicit sti and cli without saving flags on the stack,
>  unless we want the code work with both enabled and disabled interrupts.
>
>  Robustness is not always handling unexpected situations.  Sometimes it's
>  enforcing the rules and being clear about it.
>
>  It's just a suggestion, not an invitation for a long discussion about
>  three instructions :-)

Yep, actually, I think even the ending cli can be omitted, because it
will jump right back to protected mode after the keystroke is
received.

-- 
Bean

reply via email to

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