linux/arch/i386
Mikael Pettersson 1514ab09ed [x86 setup] APM detection logic bug fix
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>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-25 12:02:21 -07:00
..
boot [x86 setup] APM detection logic bug fix 2007-07-25 12:02:21 -07:00
crypto
kernel ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source 2007-07-25 01:29:39 -04:00
lib i386: Move all simple string operations out of line 2007-07-21 18:37:08 -07:00
mach-default
mach-es7000
mach-generic
mach-visws
mach-voyager
math-emu
mm ACPI: Kconfig: remove CONFIG_ACPI_SLEEP from source 2007-07-25 01:29:39 -04:00
oprofile
pci x86-64: introduce struct pci_sysdata to facilitate sharing of ->sysdata 2007-07-21 18:37:14 -07:00
power
video
xen x86_64: Fix xen section warnings 2007-07-22 11:17:17 -07:00
defconfig i386: Update defconfig 2007-07-21 18:37:07 -07:00
Kconfig i386: move the kernel to 16MB for NUMA-Q 2007-07-21 18:37:12 -07:00
Kconfig.cpu i386: Allow KVM on i386 nonpae 2007-07-19 14:37:05 -07:00
Kconfig.debug
Makefile
Makefile.cpu