linux/arch/i386/boot
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
..
compressed xen: disable vdso "nosegneg" on native boot 2007-07-20 08:44:19 -07:00
tools [x86 setup] build/tools.c: fix comment 2007-07-18 11:36:17 -07:00
.gitignore Update .gitignore for arch/i386/boot 2007-07-19 14:32:38 -07:00
a20.c A20 handling code 2007-07-12 10:55:55 -07:00
apm.c [x86 setup] APM detection logic bug fix 2007-07-25 12:02:21 -07:00
bitops.h Simple bitops for the new x86 setup code. 2007-07-12 10:55:54 -07:00
boot.h [x86 setup] Fix assembly constraints 2007-07-18 11:36:17 -07:00
cmdline.c Command-line parsing code for the new x86 setup code 2007-07-12 10:55:55 -07:00
code16gcc.h Header file to produce 16-bit code with gcc 2007-07-12 10:55:54 -07:00
copy.S String-handling functions for the new x86 setup code. 2007-07-12 10:55:55 -07:00
cpu.c CPU features verification for the new x86 setup code 2007-07-12 10:55:55 -07:00
cpucheck.c [x86 setup] Fix assembly constraints 2007-07-18 11:36:17 -07:00
edd.c EDD probing code for the new x86 setup code 2007-07-12 10:55:55 -07:00
header.S Assembly header and main routine for new x86 setup code 2007-07-12 10:55:55 -07:00
install.sh kbuild: drop vmlinux dependency from "make install" 2006-01-09 20:36:48 +01:00
main.c Assembly header and main routine for new x86 setup code 2007-07-12 10:55:55 -07:00
Makefile [PATCH] x86: do not recompile boot for each build 2007-07-18 11:36:17 -07:00
mca.c [x86 setup] Fix assembly constraints 2007-07-18 11:36:17 -07:00
memory.c Memory probing support for the new x86 setup code 2007-07-12 10:55:55 -07:00
mtools.conf.in Linux-2.6.12-rc2 2005-04-16 15:20:36 -07:00
pm.c [x86 setup] Fix assembly constraints 2007-07-18 11:36:17 -07:00
pmjump.S Code for actual protected-mode entry 2007-07-12 10:55:55 -07:00
printf.c Console-writing code for the new x86 setup code 2007-07-12 10:55:55 -07:00
setup.ld Linker script for the new x86 setup code 2007-07-12 10:55:55 -07:00
string.c String-handling functions for the new x86 setup code. 2007-07-12 10:55:55 -07:00
tty.c [x86 setup] Save/restore DS around invocations of INT 10h 2007-07-18 11:36:17 -07:00
version.c Version string for the new x86 setup code 2007-07-12 10:55:55 -07:00
vesa.h Video mode probing support for the new x86 setup code 2007-07-12 10:55:55 -07:00
video-bios.c Video mode probing support for the new x86 setup code 2007-07-12 10:55:55 -07:00
video-vesa.c Video mode probing support for the new x86 setup code 2007-07-12 10:55:55 -07:00
video-vga.c Video mode probing support for the new x86 setup code 2007-07-12 10:55:55 -07:00
video.c [x86 setup] VGA: Clear the Protect bit before setting the vertical height 2007-07-18 11:36:17 -07:00
video.h [x86 setup] Save/restore DS around invocations of INT 10h 2007-07-18 11:36:17 -07:00
voyager.c [x86 setup] Fix assembly constraints 2007-07-18 11:36:17 -07:00