All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Roskin <proski@gnu.org>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: Re: [PATCH] Workaround for the keyboard hang problem in intel mac
Date: Wed, 07 May 2008 13:09:30 -0400	[thread overview]
Message-ID: <1210180170.2321.6.camel@dv> (raw)
In-Reply-To: <ca0f59980805070655m4c66104dweb561582807f340d@mail.gmail.com>

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?

> +	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 :-)

-- 
Regards,
Pavel Roskin



  reply	other threads:[~2008-05-07 17:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-05-06 17:12 [PATCH] Workaround for the keyboard hang problem in intel mac Bean
2008-05-07 12:55 ` Robert Millan
2008-05-07 13:55   ` Bean
2008-05-07 17:09     ` Pavel Roskin [this message]
2008-05-07 17:29       ` Bean

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1210180170.2321.6.camel@dv \
    --to=proski@gnu.org \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.