[FREELDR]
[reactos.git] / reactos / boot / freeldr / freeldr / arch / i386 / entry.S
index 61d44b0..795cd40 100644 (file)
@@ -19,6 +19,7 @@
 
 #include <asm.inc>
 #include <arch/pc/x86common.h>
+#include <arch/pc/pcbios.h>
 
 EXTERN _BootMain:PROC
 EXTERN _InitIdt:PROC
@@ -70,11 +71,19 @@ _FrldrStartup:
     /* Initialize the idt */
     call _InitIdt
 
-    /* Pass the command line to BootMain */
-#ifdef _USE_ML
+#ifndef _USE_ML
+    /* Clean out bss */
     xor eax, eax
-#else
+    mov edi, offset __bss_start__
+    mov ecx, offset __bss_end__ + 3
+    sub ecx, edi
+    shr ecx, 2
+    rep stosd
+
+    /* Pass the command line to BootMain */
     mov eax, offset cmdline
+#else
+    xor eax, eax
 #endif
 
        /* GO! */
@@ -189,10 +198,10 @@ _PxeCallApi:
     ret
 
 
-PUBLIC _SoftReboot
-_SoftReboot:
+PUBLIC _Reboot
+_Reboot:
     /* Set the function ID */
-    mov bx, FNID_SoftReboot
+    mov bx, FNID_Reboot
 
     /*Switch to real mode (We don't return) */
     jmp SwitchToReal