Please glance over this piece in the current setup.S
bad_sig:
movw %cs, %ax # SETUPSEG
subw $DELTA_INITSEG, %ax # INITSEG
movw %ax, %ds
xorb %bh, %bh
movb (497), %bl # get setup sect from
bootsect
subw $4, %bx # LILO loads 4 sectors of
setup
shlw $7, %bx # convert to dwords
(1sect=2^7 dwords)
movw %bx, %cx
shrw $2, %bx # convert to segment
addw $SYSSEG, %bx
movw %bx, %cs:start_sys_seg
# Move rest of setup code/data to here
movw $2048, %di # four sectors loaded by
LILO
subw %si, %si
movw %cs, %ax # aka SETUPSEG
movw %ax, %es
movw $SYSSEG, %ax
movw %ax, %ds
rep
movsw
a long time ago (when it was still written in as86) I converted all movsw
to movsd and (the part, relevant to the above, of ) my patch looked like
this:
@@ -188,9 +188,9 @@
xor bh,bh
mov bl,[497] ! get setup sects from boot sector
sub bx,#4 ! LILO loads 4 sectors of setup
- shl bx,#8 ! convert to words
+ shl bx,#7 ! convert to dwords (1sect=2^7 dwords)
mov cx,bx
- shr bx,#3 ! convert to segment
+ shr bx,#2 ! convert to segment
add bx,#SYSSEG
seg cs
mov start_sys_seg,bx
@@ -203,7 +203,7 @@
mov ax,#SYSSEG
mov ds,ax
rep
- movsw
+ movsd
mov ax,cs ! aka #SETUPSEG
mov ds,ax
see that 8 becoming 7 and 3 becoming 2 above? Now, the current version
uses movsw and yet we still have 7 and 2 instead of 8 and 3. This is just
a "surface look" which makes me think it is obviously incorrect.
Anyway, I think it is wrong and here is the patch to fix it:
http://www.ocston.org/~tigran/patches/setup-2.3.36-p6.patch
Thanks,
------
Tigran A. Aivazian | http://www.sco.com
Escalations Research Group | tel: +44-(0)1923-813796
Santa Cruz Operation Ltd | http://www.ocston.org/~tigran
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/