All of lore.kernel.org
 help / color / mirror / Atom feed
From: "André Braga" <meianoite@gmail.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] (TEST) memtest86+ & memtest86 & qemu 1.60
Date: Thu, 29 Jul 2004 13:31:58 -0300	[thread overview]
Message-ID: <2ad73a04072909317831ef00@mail.gmail.com> (raw)
In-Reply-To: <4109138A.8040108@ambientebrasil.com.br>

There's a bug in the floppy emulation code. And this patch (by Jani
Monoses) is supposed to fix it (I guess... Unless the bug in memtest
is triggered by a different event than failing to read the last
sectors, but that's highly unlikely since it works OK from the ISO)


- - - - - - - - - - - - - - - - - - - cut: fbblockpatch.diff - - - - -
- - - - - - - - - - - - - - - - -

Index: block.c
===================================================================
RCS file: /cvsroot/qemu/qemu/block.c,v
retrieving revision 1.10
diff -u -r1.10 block.c
--- block.c	14 Jul 2004 17:20:30 -0000	1.10
+++ block.c	23 Jul 2004 15:12:21 -0000
@@ -311,6 +311,7 @@
 {
     int ret, n, fd;
     int64_t offset;
+    int bytes = 512;
     
     if (!bs->inserted)
         return -1;
@@ -320,7 +321,7 @@
             fd = bs->cow_fd;
             offset = bs->cow_sectors_offset;
         } else if (sector_num == 0 && bs->boot_sector_enabled) {
-            memcpy(buf, bs->boot_sector_data, 512);
+            memcpy(buf, bs->boot_sector_data, bytes);
             n = 1;
             goto next;
         } else {
@@ -335,8 +336,11 @@
             offset += sector_num * 512;
             lseek64(fd, offset, SEEK_SET);
             ret = read(fd, buf, n * 512);
+	    
             if (ret != n * 512) {
-                return -1;
+		if (ret == -1)    
+	                return -1;
+		bytes = ret;
             }
         }
     next:

- - - - - - - - - - - - - - - - - - - cut: fbblockpatch.diff - - - - -
- - - - - - - - - - - - - - - - -


On Thu, 29 Jul 2004 12:11:06 -0300, Leonardo Marques de Souza
<leonardo@ambientebrasil.com.br> wrote:
> Hello,
> 
> i tested this programs:
> 
> - Memtest86+ v1.20 (www.memtest.org)
> - Memtest86    v3.1a (www.memtest86.com)
> 
> Well, booting the 'iso' version of this programs all goes fine:
> 
> - qemu -cdrom memtest86+1.20.iso (OK)
> - qemu -cdrom memtest86_3.1a.iso    (OK)
> 
> Humm... interesting thing... the L1 cache is more slow than L2 cache.
> This "PentiumPro" cpu need to switch this caches. hehe  :P
> 
> But using floppy version i got some "EIP" errors.
>    (if you wait 10 seconds this show more errors)
> - qemu -fda memtest86+-1.20.bin
> - qemu -fda memtest86_3.1a.bin
> 
> using -isa or -stdvga i got "EIP" erros more "fast"
> 
> i tested other version of memtest (normal and plus) and the same error
> happens.
> 
> _______________________________________________
> Qemu-devel mailing list
> Qemu-devel@nongnu.org
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
> 


-- 
"No, no, you're not thinking; you're just being logical"
Niels Bohr

  reply	other threads:[~2004-07-29 16:35 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-29 15:11 [Qemu-devel] (TEST) memtest86+ & memtest86 & qemu 1.60 Leonardo Marques de Souza
2004-07-29 16:31 ` André Braga [this message]
2004-07-29 19:48   ` SPAM[RBL] " Leonardo Marques de Souza
2004-07-29 19:56     ` André Braga

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=2ad73a04072909317831ef00@mail.gmail.com \
    --to=meianoite@gmail.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.