From 3501a56edc62c7065e0ca92f36281c859548bd8f Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Sat, 28 Mar 2009 13:53:26 -0700 Subject: [PATCH] --- yaml --- r: 139572 b: refs/heads/master c: 32ec7fd08b597586774b92ac1cd2678021ccac1b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/arch/x86/boot/memory.c | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 68a4ea5296a7..56f48cf62ebe 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 01522df346f846906eaf6ca57148641476209909 +refs/heads/master: 32ec7fd08b597586774b92ac1cd2678021ccac1b diff --git a/trunk/arch/x86/boot/memory.c b/trunk/arch/x86/boot/memory.c index a99dbbe77a0c..fcdb10add9c8 100644 --- a/trunk/arch/x86/boot/memory.c +++ b/trunk/arch/x86/boot/memory.c @@ -20,7 +20,7 @@ static int detect_memory_e820(void) { int count = 0; u32 next = 0; - u32 size, id; + u32 size, id, edi; u8 err; struct e820entry *desc = boot_params.e820_map; @@ -29,10 +29,11 @@ static int detect_memory_e820(void) /* Important: %edx and %esi are clobbered by some BIOSes, so they must be either used for the error output - or explicitly marked clobbered. */ - asm("int $0x15; setc %0" + or explicitly marked clobbered. Given that, assume there + is something out there clobbering %ebp and %edi, too. */ + asm("pushl %%ebp; int $0x15; popl %%ebp; setc %0" : "=d" (err), "+b" (next), "=a" (id), "+c" (size), - "=m" (*desc) + "=D" (edi), "=m" (*desc) : "D" (desc), "d" (SMAP), "a" (0xe820) : "esi");