[lkml]   [2001]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
SubjectbzImage loading directly from floppy
Hi! broken. If imagesize is 0xf123, bootsect_second only returns
0xf000 in ax, which is < 0xf123, so it continues loading. Then,
bootsect_second returns 0x10000, but it is 16 bit register, so it is
0x0000, and that's also < 0xf123. So it is looping forever.

It can be fixed like this: (Another possible workaround is to set max
size in tools/misc.c to 0xefff instead of 0xffff. OTOH it would be
nice to be able to boot images up to 2.88MB directly from floppy).
(Okay to commit into x86-64 tree?)

--- linux/arch/i386/boot/setup.S Tue May 8 12:11:01 2001
+++ linux/arch/x86_64/boot/setup.S Fri May 25 22:18:57 2001
@@ -771,6 +774,8 @@
incb %cs:bootsect_dst_base+2 # to 0x10000
movb %cs:bootsect_dst_base+2, %ah
+ cmpb $0x20, %ah
+ je realbig
shlb $4, %ah # we now have the number of
# moved frames in %ax
xorb %al, %al
@@ -779,6 +784,13 @@
popw %cx

+ movw $0xffff,%ax
+ popw %bx
+ popw %si
+ popw %cx
+ lret
.word 0, 0, 0, 0
.word 0, 0, 0, 0
I'm "In my country we have almost anarchy and I don't care."
Panos Katsaloulis describing me w.r.t. patents at
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

 \ /
  Last update: 2005-03-22 12:54    [W:0.044 / U:0.152 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site