Author: ros-arm-bringup
Date: Sun Jun 29 21:42:12 2008
New Revision: 34204
URL:
http://svn.reactos.org/svn/reactos?rev=34204&view=rev
Log:
- Add RAM disk support to FreeLDR and to the NTLDR emulation layer in the kernel for
non-clean archs (ppc and x86)
Modified:
trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
trunk/reactos/include/reactos/rosldr.h
trunk/reactos/ntoskrnl/ke/freeldr.c
Modified: trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/react…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/reactos/reactos.c [iso-8859-1] Sun Jun 29 21:42:12
2008
@@ -601,6 +601,8 @@
LoaderBlock.ModsCount = 0;
LoaderBlock.ModsAddr = reactos_modules;
LoaderBlock.DrivesAddr = reactos_arc_disk_info;
+ LoaderBlock.RdAddr = (ULONG)gRamDiskBase;
+ LoaderBlock.RdLength = gRamDiskSize;
LoaderBlock.MmapLength = (unsigned
long)MachGetMemoryMap((PBIOS_MEMORY_MAP)reactos_memory_map, 32) * sizeof(memory_map_t);
if (LoaderBlock.MmapLength)
{
Modified: trunk/reactos/include/reactos/rosldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/rosldr.h?r…
==============================================================================
--- trunk/reactos/include/reactos/rosldr.h [iso-8859-1] (original)
+++ trunk/reactos/include/reactos/rosldr.h [iso-8859-1] Sun Jun 29 21:42:12 2008
@@ -35,6 +35,8 @@
UCHAR Syms[12];
ULONG MmapLength;
ULONG MmapAddr;
+ ULONG RdLength;
+ ULONG RdAddr;
ULONG DrivesCount;
PARC_DISK_SIGNATURE DrivesAddr;
ULONG ConfigTable;
Modified: trunk/reactos/ntoskrnl/ke/freeldr.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/freeldr.c?rev=…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/freeldr.c [iso-8859-1] Sun Jun 29 21:42:12 2008
@@ -1148,6 +1148,21 @@
KERNEL_DESCRIPTOR_PAGE(RosEntry->ModEnd),
0,
&Base);
+
+ //
+ // Check if we have a ramdisk
+ //
+ if ((RosLoaderBlock->RdAddr) && (RosLoaderBlock->RdLength))
+ {
+ //
+ // Build a descriptor for it
+ //
+ KiRosAllocateNtDescriptor(LoaderXIPRom,
+ KERNEL_DESCRIPTOR_PAGE(RosLoaderBlock->RdAddr),
+ (RosLoaderBlock->RdLength + PAGE_SIZE - 1) >>
PAGE_SHIFT,
+ 0,
+ &Base);
+ }
/* Setup command line */
LoaderBlock->LoadOptions = BldrCommandLine;