aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/start32.S
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk/start32.S')
-rw-r--r--memdisk/start32.S10
1 files changed, 9 insertions, 1 deletions
diff --git a/memdisk/start32.S b/memdisk/start32.S
index ee89b71d..073d049c 100644
--- a/memdisk/start32.S
+++ b/memdisk/start32.S
@@ -2,7 +2,15 @@
# Simple stub to get us to the right point in the 32-bit code;
# this module must be linked first
#
- .text
+ .section ".init", "ax"
.globl _start
_start:
+ /* Zero the bss */
+ cld
+ movl $__bss_start, %edi
+ movl $__bss_end, %ecx
+ subl %edi, %ecx
+ xorl %eax, %eax
+ shrl $2, %ecx
+ rep ; stosl
jmp setup