--- FIXED COMMIT LOG FOR r32128. NO CHANGES IN THIS REVISION ---
authorReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Tue, 5 Feb 2008 01:39:22 +0000 (01:39 +0000)
committerReactOS Portable Systems Group <ros-arm-bringup@svn.reactos.org>
Tue, 5 Feb 2008 01:39:22 +0000 (01:39 +0000)
commit74e7cbf5b85ba2cc2d7bb765111bb8fc24e7072e
treefbdbcbe98bc019051388f2f401462b53a4c51423
parent0e6d37fe00ce8e76f069ad833c7cb76572183b21
--- 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
reactos/boot/freeldr/freeldr/disk/ramdisk.c