[syslinux] Re: mboot.c32, weird e820 map on HP blade machine, possible memory corruption

Ram Yalamanchili ramy at stanford.edu
Wed Mar 15 12:47:06 PST 2006


Tim,

I guess my suspicion was right :) This seems to be a BIOS bug.

memset of regs_in fixed the problem and boots the blade. Thanks for your
suggestion. Please add this into the patch as well.

One more thing is, do you prefer the displaying of some numbers instead of
.'s while loading the file from network? I modified the code so i can see
the size of files instead, however this shows the zcat extracted size and
not what we got from the network (compressed size). I just like to see
something more informative than .'s :)

--- ../../../syslinux-3.11/com32/modules/mboot.c        2006-03-10
16:14:27.000040000 -0800
+++ mboot.c     2006-03-15 11:39:53.000197000 -0800
@@ -476,8 +478,8 @@
     }

     while (next_load_addr + LOAD_CHUNK <= section_addr) {
+        printf("\rLoading %s: ", filename);
         bsize = gzread(fp, next_load_addr, LOAD_CHUNK);
-        printf("%s",".");

         if (bsize < 0) {
             printf("\nFatal: read error in %s\n", filename);
@@ -489,16 +491,16 @@
         sizep[0] += bsize;

         if (bsize < LOAD_CHUNK) {
-            printf("%s","\n");
+            printf("%8d KB\n", (int)(next_load_addr - start)/1024);
             gzclose(fp);
             return;
         }
+        printf("%8d KB", (int)(next_load_addr - start)/1024);
     }

     /* Running out of memory.  Try and use up the last bit */
     if (section_addr > next_load_addr) {
         bsize = gzread(fp, next_load_addr, section_addr - next_load_addr);
-        printf("%s",".");
     } else {
         bsize = 0;
     }
@@ -512,6 +514,8 @@
     next_load_addr += bsize;
     sizep[0] += bsize;

+    printf("\rLoading %s: %8d KB", filename, (int)(next_load_addr -
start)/1024);
+
     if (!gzeof(fp)) {
         gzclose(fp);
         printf("\nFatal: out of memory reading %s\n", filename);



> Date: Wed, 15 Mar 2006 10:24:14 +0000
> From: Tim Deegan <Tim.Deegan at cl.cam.ac.uk>
> Subject: Re: [syslinux] Re: mboot.c32, weird e820 map on HP blade
> 	machine,	possible memory corruption
> To: syslinux at zytor.com
> Message-ID: <20060315102414.GC32024 at tyer.cl.cam.ac.uk>
> Content-Type: text/plain; charset=iso-8859-1
>
> Hi Ram,
>
> Just saw your latest message about optimization levels.  Does explicitly
> clearing the registers help?  Shouldn't make a difference, since es:edi
> is the only address we pass, but...
>
> --- old/mboot.c 2006-03-15 10:12:43.000000000 +0000
> +++ ./mboot.c   2006-03-15 10:13:21.000000000 +0000
> @@ -359,6 +359,7 @@
>      while(((void *)(e820 + 1)) < __com32.cs_bounce +
>      __com32.cs_bounce_size)
>      {
>          memset(e820, 0, sizeof (*e820));
> +        memset(&regs_in, 0, sizeof regs_in);
>          e820->size = sizeof(*e820) - sizeof(e820->size);
>
>          /* Ask the BIOS to fill in this descriptor */
>
>
>
> ------------------------------
>
> _______________________________________________
> SYSLINUX mailing list
> Submissions to SYSLINUX at zytor.com
> Unsubscribe or set options at:
> http://www.zytor.com/mailman/listinfo/syslinux
> Please do not send private replies to mailing list traffic.
>
>
> End of SYSLINUX Digest, Vol 36, Issue 13
> ****************************************
>





More information about the Syslinux mailing list