projects
/
reactos.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[FREELDR] Diverse enhancements.
[reactos.git]
/
boot
/
freeldr
/
freeldr
/
freeldr.c
diff --git
a/boot/freeldr/freeldr/freeldr.c
b/boot/freeldr/freeldr/freeldr.c
index
a425357
..
b1f7296
100644
(file)
--- a/
boot/freeldr/freeldr/freeldr.c
+++ b/
boot/freeldr/freeldr/freeldr.c
@@
-17,47
+17,53
@@
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
*/
+/* INCLUDES *******************************************************************/
+
#include <freeldr.h>
#include <debug.h>
DBG_DEFAULT_CHANNEL(WARNING);
#include <freeldr.h>
#include <debug.h>
DBG_DEFAULT_CHANNEL(WARNING);
-VOID NTAPI HalpInitializePciStubs(VOID);
-VOID NTAPI HalpInitBusHandler(VOID);
+/* FUNCTIONS ******************************************************************/
-VOID
BootMain(LPSTR
CmdLine)
+VOID
__cdecl BootMain(IN PCCH
CmdLine)
{
CmdLineParse(CmdLine);
{
CmdLineParse(CmdLine);
- MachInit(CmdLine);
+ /* Debugger pre-initialization */
+ DebugInit(FALSE);
-
FsInit(
);
+
TRACE("BootMain() called.\n"
);
-
DebugInit(
);
+
MachInit(CmdLine
);
- TRACE("BootMain() called.\n");
+ /* Check if the CPU is new enough */
+ FrLdrCheckCpuCompatibility(); // FIXME: Should be done inside MachInit!
+ /* UI pre-initialization */
if (!UiInitialize(FALSE))
{
if (!UiInitialize(FALSE))
{
- UiMessageBoxCritical("Unable to initialize UI.
\n
");
- goto
q
uit;
+ UiMessageBoxCritical("Unable to initialize UI.");
+ goto
Q
uit;
}
}
+ /* Initialize memory manager */
if (!MmInitializeMemoryManager())
{
if (!MmInitializeMemoryManager())
{
- UiMessageBoxCritical("Unable to initialize memory manager");
- goto
q
uit;
+ UiMessageBoxCritical("Unable to initialize memory manager
.
");
+ goto
Q
uit;
}
}
-#ifdef _M_IX86
- HalpInitializePciStubs();
- HalpInitBusHandler();
-#endif
+ /* Initialize I/O subsystem */
+ FsInit();
+
RunLoader();
RunLoader();
-
q
uit:
+
Q
uit:
/* If we reach this point, something went wrong before, therefore reboot */
/* If we reach this point, something went wrong before, therefore reboot */
+#if defined(__i386__) || defined(_M_AMD64)
DiskStopFloppyMotor();
DiskStopFloppyMotor();
+#endif
Reboot();
}
Reboot();
}
@@
-70,15
+76,14
@@
int __cdecl wctomb(char *mbchar, wchar_t wchar)
return 1;
}
return 1;
}
-int __cdecl mbtowc
(wchar_t *wchar, const char *mbchar, size_t count)
+int __cdecl mbtowc(wchar_t *wchar, const char *mbchar, size_t count)
{
*wchar = (wchar_t)*mbchar;
return 1;
}
// The wctype table is 144 KB, too much for poor freeldr
{
*wchar = (wchar_t)*mbchar;
return 1;
}
// The wctype table is 144 KB, too much for poor freeldr
-int iswctype(wint_t wc, wctype_t wctypeFlags)
+int
__cdecl
iswctype(wint_t wc, wctype_t wctypeFlags)
{
return _isctype((char)wc, wctypeFlags);
}
{
return _isctype((char)wc, wctypeFlags);
}
-