diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-25 17:52:37 -0400 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2011-04-25 17:52:37 -0400 |
commit | 39b68976ac653cfdc7f872a293e8b7928de2dcc6 (patch) | |
tree | caf1d25a448fdf56878de7fb700b26655676ca0d /arch/x86/boot | |
parent | 5dd12af05ca6b7d052c06a9ca4ff755fdfa25ae4 (diff) |
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
Diffstat (limited to 'arch/x86/boot')
-rw-r--r-- | arch/x86/boot/memory.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c index cae3feb1035e..db75d07c3645 100644 --- a/arch/x86/boot/memory.c +++ b/arch/x86/boot/memory.c | |||
@@ -91,7 +91,7 @@ static int detect_memory_e801(void) | |||
91 | if (oreg.ax > 15*1024) { | 91 | if (oreg.ax > 15*1024) { |
92 | return -1; /* Bogus! */ | 92 | return -1; /* Bogus! */ |
93 | } else if (oreg.ax == 15*1024) { | 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 | } else { | 95 | } else { |
96 | /* | 96 | /* |
97 | * This ignores memory above 16MB if we have a memory | 97 | * This ignores memory above 16MB if we have a memory |