[syslinux] memdisk patch
Duane Voth
duanev at io.com
Mon Aug 27 19:04:19 PDT 2007
Hello all,
I ran across a couple bugs in memdisk concerning hd images the other
day. With the attached patch I've been able to successfully boot a
32MB gzipped hd image. (I'll put the image up for a short while at
ftp://ftp.io.com/pub/usr/duanev/fdoshd.img.gz)
The pxelinux.cfg entry I'm using is:
label fdos
kernel memdisk
append keeppxe initrd=fdoshd.img.gz
syslinux/memdisk is great, thanks Peter et. al.!
--
Duane Voth
duanev at io.com
-------------- next part --------------
--- memdisk.asm.orig 2007-08-20 13:02:26.000000000 -0500
+++ memdisk.asm 2007-08-20 17:31:17.000000000 -0500
@@ -462,10 +462,10 @@
cmp dword [es:si+4],-1
je .linear_address
- movzx esi,word [es:si+4] ; Offset
+ movzx ebx,word [es:si+4] ; Offset
movzx edi,word [es:si+6] ; Segment
shl edi,4
- add esi,edi
+ add ebx,edi
jmp .got_address
@@ -476,23 +476,24 @@
cmp dword [es:si+20],0 ; > 4 GB addresses not supported
jne .overrun
- mov esi,[es:si+16]
+ mov ebx,[es:si+16]
.got_address:
cmp dword [es:si+12],0 ; LBA too large?
jne .overrun
movzx ecx, word [es:si+2] ; Sectors to transfer
- mov edi,[es:si+8] ; Starting sector
- mov eax,edi
+ mov esi,[es:si+8] ; Starting sector
+ mov eax,esi
add eax,ecx
jc .overrun
cmp eax,[DiskSize]
ja .overrun
shl ecx,SECTORSIZE_LG2-2 ; Convert to dwords
- shl edi,SECTORSIZE_LG2 ; Convert to an offset
- add edi,[DiskBuf]
+ shl esi,SECTORSIZE_LG2 ; Convert to an offset
+ add esi,[DiskBuf]
+ mov edi,ebx
pop es
ret
More information about the Syslinux
mailing list