[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] (TEST) memtest86+ & memtest86 & qemu 1.60
From: |
André Braga |
Subject: |
Re: [Qemu-devel] (TEST) memtest86+ & memtest86 & qemu 1.60 |
Date: |
Thu, 29 Jul 2004 13:31:58 -0300 |
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
<address@hidden> 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
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/qemu-devel
>
--
"No, no, you're not thinking; you're just being logical"
Niels Bohr