diff options
-rw-r--r-- | sys/boot/i386/boot2/boot1.S | 4 | ||||
-rw-r--r-- | sys/boot/i386/btx/lib/btxcsu.s | 10 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/boot/i386/boot2/boot1.S b/sys/boot/i386/boot2/boot1.S index 44af56b..5b0f6f7 100644 --- a/sys/boot/i386/boot2/boot1.S +++ b/sys/boot/i386/boot2/boot1.S @@ -193,10 +193,6 @@ main.5: mov %dx,MEM_ARG # Save args sub %si,%cx # count rep # Relocate movsb # client - sub %di,%cx # Byte count - xorb %al,%al # Zero assumed bss from - rep # the end of boot2.bin - stosb # up to 0x10000 /* * Enable A20 so we can access memory above 1 meg. diff --git a/sys/boot/i386/btx/lib/btxcsu.s b/sys/boot/i386/btx/lib/btxcsu.s index f08ae75..6a00659 100644 --- a/sys/boot/i386/btx/lib/btxcsu.s +++ b/sys/boot/i386/btx/lib/btxcsu.s @@ -30,7 +30,15 @@ # # Client entry point. # -_start: movl %eax,__base # Set base address +_start: cld + pushl %eax + movl $_edata,%edi + movl $_end,%ecx + subl %edi, %ecx + xorb %al, %al + rep + stosb + popl __base movl %esp,%eax # Set addl $ARGADJ,%eax # argument movl %eax,__args # pointer |