Hi,
I've reviewed stage 1 of GRUB and found a few oddities. This patch removes a
pointless instruction, which, I think was a leftover from some reworking.
Wolf Lammen
--
GMX ProMail (250 MB Mailbox, 50 FreeSMS, Virenschutz, 2,99 EUR/Monat...)
jetzt 3 Monate GRATIS + 3x DER SPIEGEL +++ http://www.gmx.net/derspiegel +++
This is the third in a series of patches that removes a bug and some glitches
from GRUB stage 1. This is against grub-0.94 (alpha), my first two patches
applied.
Submitted by Wolf Lammen, ookami1<at>gmx<dot>de
I looked through the complete code of stage 1 and found some oddities.
This patch addresses one: removal of a pointless instruction, presumely a
leftover from some earlier reworking. Impact: A clean up, saving 4 bytes
of code.
Details: When entering the code path for lba_mode, memory is accessed using
registers DS:SI, without initializing SI. These registers were last set by
the message routine, when printing out the notification string (unless a buggy
BIOS clobbered this register while executing INT 13, function 41). Thus DS:SI
should point to the terminating \0 of the notification string.
Using the PC emulator bochs, I verified that "ead\0" from the Read_Error_String
was actually loaded into ECX, only to be soon after overwritten by either
INT 13, function 8, or by a counter in the copy_buffer path.
This patch removes this instruction.
--- stage1.S 2004-02-08 19:39:52.000000000 +0100
+++ stage1.new 2004-02-08 19:38:07.000000000 +0100
@@ -176,9 +176,6 @@
jz chs_mode
lba_mode:
- /* save the total number of sectors */
- movl 0x10(%si), %ecx
-
/* set %si to the disk address packet */
movw $ABS(disk_address_packet), %si
_______________________________________________
Bug-grub mailing list
[EMAIL PROTECTED]
http://mail.gnu.org/mailman/listinfo/bug-grub