Re: [PATCH] THE LINUX/I386 BOOT PROTOCOL - Breaking the 256 limit (ping)

Alon Bar-Lev
2006-08-28T20:29:34Z

[-- Attachment #1: Type: text/plain, Size: 191 bytes --]

On 8/28/06, Matt Domsch <Matt_Domsch@dell.com> wrote:
> OK, I'll look at fixing that, and using %esi throughout.
>
> Thanks,
> Matt
>

Something as the attached?

Best Regards,
Alon Bar-Lev.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: edd-esi-null.diff --]
[-- Type: text/x-diff; name="edd-esi-null.diff", Size: 1057 bytes --]

--- linux-2.6.18-rc4-mm2/arch/i386/boot/edd.S 2006-06-18 04:49:35.000000000 +0300
+++ linux-2.6.18-rc4-mm2.new/arch/i386/boot/edd.S 2006-08-28 23:21:01.000000000 +0300
@@ -22,14 +22,16 @@
# edd=of disables EDD completely (edd=off)
# edd=sk skips the MBR test (edd=skipmbr)
pushl %esi
- cmpl $0, %cs:cmd_line_ptr
- jz done_cl
movl %cs:(cmd_line_ptr), %esi
+ andl %esi, %esi
+ jz done_cl
# ds:esi has the pointer to the command line now
- movl $(COMMAND_LINE_SIZE-7), %ecx
+ movw $(COMMAND_LINE_SIZE-7), %cx
# loop through kernel command line one byte at a time
cl_loop:
- cmpl $EDD_CL_EQUALS, (%si)
+ cmpb $0, (%esi)
+ jz done_cl
+ cmpl $EDD_CL_EQUALS, (%esi)
jz found_edd_equals
incl %esi
loop cl_loop
@@ -37,9 +39,9 @@ cl_loop:
found_edd_equals:
# only looking at first two characters after equals
addl $4, %esi
- cmpw $EDD_CL_OFF, (%si) # edd=of
+ cmpw $EDD_CL_OFF, (%esi) # edd=of
jz do_edd_off
- cmpw $EDD_CL_SKIP, (%si) # edd=sk
+ cmpw $EDD_CL_SKIP, (%esi) # edd=sk
jz do_edd_skipmbr
jmp done_cl