Home | Info | Community | Development | myReactOS | Contact Us
ReactOS Development > Doxygenxipdisp.c
Go to the documentation of this file.
00001 /* 00002 * PROJECT: ReactOS Kernel 00003 * LICENSE: GPL - See COPYING in the top level directory 00004 * FILE: ntoskrnl/ex/xipdisp.c 00005 * PURPOSE: eXecute In Place (XIP) Support. 00006 * PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org) 00007 */ 00008 00009 /* INCLUDES ******************************************************************/ 00010 00011 #include <ntoskrnl.h> 00012 #include <debug.h> 00013 00014 /* GLOBALS *******************************************************************/ 00015 00016 /* FUNCTIONS *****************************************************************/ 00017 00018 PMEMORY_ALLOCATION_DESCRIPTOR 00019 NTAPI 00020 INIT_FUNCTION 00021 XIPpFindMemoryDescriptor(IN PLOADER_PARAMETER_BLOCK LoaderBlock) 00022 { 00023 PLIST_ENTRY NextEntry; 00024 PMEMORY_ALLOCATION_DESCRIPTOR Descriptor = NULL; 00025 00026 /* Loop the memory descriptors */ 00027 for (NextEntry = LoaderBlock->MemoryDescriptorListHead.Flink; 00028 NextEntry != &LoaderBlock->MemoryDescriptorListHead; 00029 NextEntry = NextEntry->Flink) 00030 { 00031 /* Get the current descriptor and check if it's the XIP ROM */ 00032 Descriptor = CONTAINING_RECORD(NextEntry, 00033 MEMORY_ALLOCATION_DESCRIPTOR, 00034 ListEntry); 00035 if (Descriptor->MemoryType == LoaderXIPRom) return Descriptor; 00036 } 00037 00038 /* Nothing found if we got here */ 00039 return NULL; 00040 } 00041 00042 VOID 00043 NTAPI 00044 INIT_FUNCTION 00045 XIPInit(IN PLOADER_PARAMETER_BLOCK LoaderBlock) 00046 { 00047 PCHAR CommandLine, XipBoot, XipRom, XipMegs, XipVerbose, XipRam; 00048 PMEMORY_ALLOCATION_DESCRIPTOR XipDescriptor; 00049 00050 /* Get the command line */ 00051 CommandLine = LoaderBlock->LoadOptions; 00052 if (!CommandLine) return; 00053 00054 /* Get XIP settings */ 00055 XipBoot = strstr(CommandLine, "XIPBOOT"); 00056 XipRam = strstr(CommandLine, "XIPRAM="); 00057 XipRom = strstr(CommandLine, "XIPROM="); 00058 XipMegs = strstr(CommandLine, "XIPMEGS="); 00059 XipVerbose = strstr(CommandLine, "XIPVERBOSE"); 00060 00061 /* Check if this is a verbose boot */ 00062 if (XipVerbose) 00063 { 00064 /* Print out our header */ 00065 DbgPrint("\n\nXIP: debug timestamp at line %d in %s: <<<%s %s>>>\n\n", 00066 __LINE__, 00067 __FILE__, 00068 __DATE__, 00069 __TIME__); 00070 } 00071 00072 /* Find the XIP memory descriptor */ 00073 XipDescriptor = XIPpFindMemoryDescriptor(LoaderBlock); 00074 if (!XipDescriptor) return; 00075 00076 // 00077 // Make sure this is really XIP, and not RAM Disk -- also validate XIP 00078 // Basically, either this is a ROM boot or a RAM boot, but not both nor none 00079 // 00080 if (!((ULONG_PTR)XipRom ^ (ULONG_PTR)XipRam)) return; 00081 00082 /* FIXME: TODO */ 00083 DPRINT1("ReactOS does not yet support eXecute In Place boot technology\n"); 00084 DPRINT("%s MB requested (XIP = %s)\n", XipMegs, XipBoot); 00085 } 00086 00087 /* EOF */ Generated on Fri May 25 2012 04:35:32 for ReactOS by
1.7.6.1
|