CHAR SystemRoot[255];
static CHAR szLoadingMsg[] = "Loading ReactOS...";
BOOLEAN FrLdrBootType;
-extern ULONG_PTR KernelBase;
-extern ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
+ULONG_PTR KernelBase;
+ROS_KERNEL_ENTRY_POINT KernelEntryPoint;
BOOLEAN
FrLdrLoadDriver(PCHAR szFileName,
ULONG SectionId;
PIMAGE_NT_HEADERS NtHeader;
PVOID LoadBase;
-
ULONG_PTR Base;
ULONG Size;
- extern BOOLEAN AcpiPresent;
-
//
// Open the operating system section
// specified in the .ini file
LoaderBlock.ArchExtra = (ULONG)MachHwDetect();
UiDrawProgressBarCenter(5, 100, szLoadingMsg);
- if (AcpiPresent) LoaderBlock.Flags |= MB_FLAGS_ACPI_TABLE;
LoaderBlock.DrivesCount = reactos_disk_count;
UiDrawStatusText("Loading...");
+ //
+ // If we have a ramdisk, this will switch to the ramdisk disk routines
+ // which read from memory instead of using the firmware. This has to be done
+ // after hardware detection, since hardware detection will require using the
+ // real routines in order to perform disk-detection (just because we're on a
+ // ram-boot doesn't mean the user doesn't have actual disks installed too!)
+ //
+ RamDiskSwitchFromBios();
+
/*
* Try to open system drive
*/
FrLdrLoadBootDrivers(szBootPath, 40);
//UiUnInitialize("Booting ReactOS...");
- /*
- * Now boot the kernel
- */
- DiskStopFloppyMotor();
- MachVideoPrepareForReactOS(FALSE);
+ //
+ // Perform architecture-specific pre-boot configuration
+ //
+ MachPrepareForReactOS(FALSE);
+
+ //
+ // Setup paging and jump to kernel
+ //
FrLdrStartup(0x2badb002);
}