--- FIXED COMMIT LOG FOR r32128. NO CHANGES IN THIS REVISION ---

Implement ramdisk support for FreeLDR (ramdisk.c and ramdisk.h). The implementation is portable across all architectures.
We also define a virual ramdisk file (hardcoded name is reactos.img, on the boot volume) for testing ramdisk support on architectures without native ramdisk support (such as x86). This could be further extended to allow network booting as a ramdisk at a later time, but is now primarly for test purposes.
We introduce two new FreeLDR command-line parameters that should be sent by non-x86 firmware: rdbase and rdsize, and a new freeldr.ini ARC path: ramdisk(0) -- this is compatible with Windows.
For compatibility and status output, we use 8MB chunks for reading virtual ramdisk files (a dot is displayed for each additional 8MB chunk).
Finally, for code-reuse, the ramdisk implementation will "steal" the BIOS support routines in the arch-vtable and replace them with simple memcpy wrappers. To the disk/filesystem routines in FreeLDR, they think they are reading from the BIOS (or other firmware), but instead, the sector reads are coming from memory).
For now, only FAT ramdisks have been tested, and a sector size of 512 bytes is implied. We also disable the FAT block cache since it wouldn't make much sense to cache RAM.
*** Note that kernel ramdisk support is missing, so once the kernel attempts to load drivers from the boot device (ramdisk(0)), it will panic. This is currently non an issue on non-x86 builds since the kernel won't get that far for a while.


svn path=/trunk/; revision=32129
This commit is contained in:
ReactOS Portable Systems Group 2008-02-05 01:39:22 +00:00
parent 0e6d37fe00
commit 74e7cbf5b8

View file

@ -95,7 +95,7 @@ RamDiskCheckForVirtualFile(VOID)
// Get the file size
//
gRamDiskSize = FsGetFileSize(RamFile);
TuiPrintf("Found virtual ramdisk (%dKB) \n", gRamDiskSize / 1024);
TuiPrintf("Found virtual ramdisk (%dKB)\n", gRamDiskSize / 1024);
if (!gRamDiskSize) return;
//