Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86, setup: When probing memory with e801, use ax/bx as a pair

When we use BIOS function e801 to probe memory, we should use ax/bx
(or cx/dx) as a pair, not mix and match. This was a typo during the
translation from assembly code, and breaks at least one set of
machines in the field (which return cx = dx = 0).

Reported-and-tested-by: Chris Samuel <chris@csamuel.org>
Fix-proposed-by: Thomas Meyer <thomas@m3y3r.de>
Link: http://lkml.kernel.org/r/1303566747.12067.10.camel@localhost.localdomain

+1 -1
+1 -1
arch/x86/boot/memory.c
··· 91 91 if (oreg.ax > 15*1024) { 92 92 return -1; /* Bogus! */ 93 93 } else if (oreg.ax == 15*1024) { 94 - boot_params.alt_mem_k = (oreg.dx << 6) + oreg.ax; 94 + boot_params.alt_mem_k = (oreg.bx << 6) + oreg.ax; 95 95 } else { 96 96 /* 97 97 * This ignores memory above 16MB if we have a memory