[ros-diffs] [ros-arm-bringup] 34454: - Make sure this is XIP (Execute in Place) boot and not ramdisk boot before warning the user. Silences an incorrect debug print during ramdisk boot.

ros-arm-bringup at svn.reactos.org ros-arm-bringup at svn.reactos.org
Sun Jul 13 10:20:03 CEST 2008


Author: ros-arm-bringup
Date: Sun Jul 13 03:20:02 2008
New Revision: 34454

URL: http://svn.reactos.org/svn/reactos?rev=34454&view=rev
Log:
- Make sure this is XIP (Execute in Place) boot and not ramdisk boot before warning the user. Silences an incorrect debug print during ramdisk boot.

Modified:
    trunk/reactos/ntoskrnl/ex/xipdisp.c

Modified: trunk/reactos/ntoskrnl/ex/xipdisp.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/xipdisp.c?rev=34454&r1=34453&r2=34454&view=diff
==============================================================================
--- trunk/reactos/ntoskrnl/ex/xipdisp.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ex/xipdisp.c [iso-8859-1] Sun Jul 13 03:20:02 2008
@@ -42,7 +42,7 @@
 NTAPI
 XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock)
 {
-    PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose;
+    PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose, XipRam;
     PMEMORY_ALLOCATION_DESCRIPTOR XipDescriptor;
 
     /* Get the command line */
@@ -51,6 +51,7 @@
 
     /* Get XIP settings */
     XipBoot = strstr(CommandLine, "XIPBOOT");
+    XipRam = strstr(CommandLine, "XIPRAM=");
     XipRom = strstr(CommandLine, "XIPROM=");
     XipMegs = strstr(CommandLine, "XIPMEGS=");
     XipVerbose = strstr(CommandLine, "XIPVERBOSE");
@@ -69,6 +70,12 @@
     /* Find the XIP memory descriptor */
     XipDescriptor = XIPpFindMemoryDescriptor(LoaderBlock);
     if (!XipDescriptor) return;
+    
+    //
+    // Make sure this is really XIP, and not RAM Disk -- also validate XIP
+    // Basically, either this is a ROM boot or a RAM boot, but not both nor none
+    //
+    if (!((ULONG_PTR)XipRom ^ (ULONG_PTR)XipRam)) return;
 
     /* FIXME: TODO */
     DPRINT1("ReactOS does not yet support eXecute In Place boot technology\n");



More information about the Ros-diffs mailing list