public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Mikael Pettersson <mikpe@it.uu.se>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH 2.6.23-rc1] APM detection logic bug fix
Date: Mon, 23 Jul 2007 15:34:45 -0700	[thread overview]
Message-ID: <46A52D05.4050603@zytor.com> (raw)
In-Reply-To: <200707232225.l6NMPxrq009114@harpo.it.uu.se>

Mikael Pettersson wrote:
> Starting with kernel 2.6.23-rc1, the i386 APM driver fails
> on several of my machines with the message:
> 
> apm: BIOS not found
> 
> This happens because of a bug in the i386 boot code rewrite
> from assembler to C. The original assembly code had the
> following code in its APM BIOS presence test (boot/setup.S):
> 
> 	andw	$0x02, %cx			# Is 32 bit supported?
> 	je	done_apm_bios			# No 32-bit, no (good) APM BIOS
> 
> That is, the code bails out if bit 2 is zero.
> 
> In the new C version, this is coded as (boot/apm.c):
> 
> 	if (cx & 0x02)		/* 32 bits supported? */
> 		return -1;
> 
> Here we see that the test has been accidentally inverted.
> 
> The fix is to negate the test. I've verified that this
> allows the APM driver to work again on my affected machines.
> 
> Signed-off-by: Mikael Pettersson <mikpe@it.uu.se>
> 

Thanks, applied.

	-hpa

      reply	other threads:[~2007-07-23 22:35 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-07-23 22:25 [PATCH 2.6.23-rc1] APM detection logic bug fix Mikael Pettersson
2007-07-23 22:34 ` H. Peter Anvin [this message]

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=46A52D05.4050603@zytor.com \
    --to=hpa@zytor.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mikpe@it.uu.se \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox