aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot')
-rw-r--r--arch/x86/boot/memory.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/arch/x86/boot/memory.c b/arch/x86/boot/memory.c
index a99dbbe77a0c..fcdb10add9c8 100644
--- a/arch/x86/boot/memory.c
+++ b/arch/x86/boot/memory.c
@@ -20,7 +20,7 @@ static int detect_memory_e820(void)
20{ 20{
21 int count = 0; 21 int count = 0;
22 u32 next = 0; 22 u32 next = 0;
23 u32 size, id; 23 u32 size, id, edi;
24 u8 err; 24 u8 err;
25 struct e820entry *desc = boot_params.e820_map; 25 struct e820entry *desc = boot_params.e820_map;
26 26
@@ -29,10 +29,11 @@ static int detect_memory_e820(void)
29 29
30 /* Important: %edx and %esi are clobbered by some BIOSes, 30 /* Important: %edx and %esi are clobbered by some BIOSes,
31 so they must be either used for the error output 31 so they must be either used for the error output
32 or explicitly marked clobbered. */ 32 or explicitly marked clobbered. Given that, assume there
33 asm("int $0x15; setc %0" 33 is something out there clobbering %ebp and %edi, too. */
34 asm("pushl %%ebp; int $0x15; popl %%ebp; setc %0"
34 : "=d" (err), "+b" (next), "=a" (id), "+c" (size), 35 : "=d" (err), "+b" (next), "=a" (id), "+c" (size),
35 "=m" (*desc) 36 "=D" (edi), "=m" (*desc)
36 : "D" (desc), "d" (SMAP), "a" (0xe820) 37 : "D" (desc), "d" (SMAP), "a" (0xe820)
37 : "esi"); 38 : "esi");
38 39