Re: 2.6.22-rc1-mm1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux