lkml.org 
[lkml]   [2007]   [May]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
Date
From
SubjectRe: 2.6.22-rc1-mm1
Hi,
> This implies a miscompile somewhere, *or* that your bios stomps on
> registers that gcc expect preserved, and adding printf's disturbs the
> register allocation sufficiently.

I think maybe it's caused by gcc optimize, so I add volatile to
read_sector inline assemblly, then kernel can boot successfully.

please check this patch :

diff -ur linux/arch/i386/boot/edd.c linux.new/arch/i386/boot/edd.c
--- linux/arch/i386/boot/edd.c 2007-05-22 10:08:59.000000000 +0000
+++ linux.new/arch/i386/boot/edd.c 2007-05-22 10:06:24.000000000 +0000
@@ -47,7 +47,7 @@
ax = 0x4200; /* Extended Read */
si = (size_t)&dapa;
dx = devno;
- asm ("pushfl; stc; int $0x13; setc %%al; popfl"
+ asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+S" (si), "+d" (devno)
: : "ebx", "ecx", "edi");

@@ -58,7 +58,7 @@
cx = 0x0001; /* Sector 0-0-1 */
dx = devno;
bx = (size_t)buf;
- asm ("pushfl; stc; int $0x13; setc %%al; popfl"
+ asm volatile("pushfl; stc; int $0x13; setc %%al; popfl"
: "+a" (ax), "+c" (cx), "+d" (dx), "+b" (bx)
: : "esi", "edi");

Regards
dave
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
\
 
 \ /
  Last update: 2007-05-22 04:17    [W:0.317 / U:0.208 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site