mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 09:25:10 +00:00
- Add RAM disk support to FreeLDR and to the NTLDR emulation layer in the kernel for non-clean archs (ppc and x86)
svn path=/trunk/; revision=34204
This commit is contained in:
parent
96f1392d7b
commit
e7756d443d
3 changed files with 19 additions and 0 deletions
|
@ -601,6 +601,8 @@ LoadAndBootReactOS(PCSTR OperatingSystemName)
|
|||
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)
|
||||
{
|
||||
|
|
|
@ -35,6 +35,8 @@ typedef struct _ROS_LOADER_PARAMETER_BLOCK
|
|||
UCHAR Syms[12];
|
||||
ULONG MmapLength;
|
||||
ULONG MmapAddr;
|
||||
ULONG RdLength;
|
||||
ULONG RdAddr;
|
||||
ULONG DrivesCount;
|
||||
PARC_DISK_SIGNATURE DrivesAddr;
|
||||
ULONG ConfigTable;
|
||||
|
|
|
@ -1148,6 +1148,21 @@ KiRosFrldrLpbToNtLpb(IN PROS_LOADER_PARAMETER_BLOCK RosLoaderBlock,
|
|||
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;
|
||||
|
|
Loading…
Reference in a new issue