From b99f4db352f766219f17a87f060fe3fb6e82ac7c Mon Sep 17 00:00:00 2001 From: Aleksey Bragin Date: Sat, 11 Aug 2007 09:55:12 +0000 Subject: [PATCH] - Merge 26302 (Freeldr's own DEBUG -> ROS's global DBG) svn path=/branches/winldr/; revision=28283 --- arch/i386/i386disk.c | 56 ++++++++++++++++++++---------------------- arch/i386/i386vid.c | 5 ---- comm/rs232.c | 6 ++--- debug.c | 4 +-- disk/partition.c | 6 ----- freeldr_arch.rbuild | 25 ++++++++++++++----- freeldr_base.rbuild | 3 --- freeldr_base64k.rbuild | 3 --- freeldr_startup.rbuild | 3 --- fs/fat.c | 6 +---- fs/fs.c | 2 -- fs/ntfs.c | 4 +-- include/debug.h | 6 ++--- include/freeldr.h | 2 ++ include/mm.h | 7 +++--- inifile/inifile.c | 2 -- mm/meminit.c | 8 +++--- mm/mm.c | 30 +++++++++++----------- windows/wlmemory.c | 4 +-- 19 files changed, 83 insertions(+), 99 deletions(-) diff --git a/arch/i386/i386disk.c b/arch/i386/i386disk.c index 71626214bab..20d7c697395 100644 --- a/arch/i386/i386disk.c +++ b/arch/i386/i386disk.c @@ -165,37 +165,35 @@ BOOLEAN DiskGetExtendedDriveParameters(ULONG DriveNumber, PVOID Buffer, USHORT B memcpy(Buffer, Ptr, BufferSize); -#ifdef DEBUG - DbgPrint((DPRINT_DISK, "size of buffer: %x\n", Ptr[0])); - DbgPrint((DPRINT_DISK, "information flags: %x\n", Ptr[1])); - DbgPrint((DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2])); - DbgPrint((DPRINT_DISK, "number of physical heads on drive: %u\n", *(PULONG)&Ptr[4])); - DbgPrint((DPRINT_DISK, "number of physical sectors per track: %u\n", *(PULONG)&Ptr[6])); - DbgPrint((DPRINT_DISK, "total number of sectors on drive: %I64u\n", *(unsigned long long*)&Ptr[8])); - DbgPrint((DPRINT_DISK, "bytes per sector: %u\n", Ptr[12])); - if (Ptr[0] >= 0x1e) + DbgPrint((DPRINT_DISK, "size of buffer: %x\n", Ptr[0])); + DbgPrint((DPRINT_DISK, "information flags: %x\n", Ptr[1])); + DbgPrint((DPRINT_DISK, "number of physical cylinders on drive: %u\n", *(PULONG)&Ptr[2])); + DbgPrint((DPRINT_DISK, "number of physical heads on drive: %u\n", *(PULONG)&Ptr[4])); + DbgPrint((DPRINT_DISK, "number of physical sectors per track: %u\n", *(PULONG)&Ptr[6])); + DbgPrint((DPRINT_DISK, "total number of sectors on drive: %I64u\n", *(unsigned long long*)&Ptr[8])); + DbgPrint((DPRINT_DISK, "bytes per sector: %u\n", Ptr[12])); + if (Ptr[0] >= 0x1e) + { + DbgPrint((DPRINT_DISK, "EED configuration parameters: %x:%x\n", Ptr[13], Ptr[14])); + if (Ptr[13] != 0xffff && Ptr[14] != 0xffff) { - DbgPrint((DPRINT_DISK, "EED configuration parameters: %x:%x\n", Ptr[13], Ptr[14])); - if (Ptr[13] != 0xffff && Ptr[14] != 0xffff) - { - PUCHAR SpecPtr = (PUCHAR)((Ptr[13] << 4) + Ptr[14]); - DbgPrint((DPRINT_DISK, "SpecPtr: %x\n", SpecPtr)); - DbgPrint((DPRINT_DISK, "physical I/O port base address: %x\n", *(PUSHORT)&SpecPtr[0])); - DbgPrint((DPRINT_DISK, "disk-drive control port address: %x\n", *(PUSHORT)&SpecPtr[2])); - DbgPrint((DPRINT_DISK, "drive flags: %x\n", SpecPtr[4])); - DbgPrint((DPRINT_DISK, "proprietary information: %x\n", SpecPtr[5])); - DbgPrint((DPRINT_DISK, "IRQ for drive: %u\n", SpecPtr[6])); - DbgPrint((DPRINT_DISK, "sector count for multi-sector transfers: %u\n", SpecPtr[7])); - DbgPrint((DPRINT_DISK, "DMA control: %x\n", SpecPtr[8])); - DbgPrint((DPRINT_DISK, "programmed I/O control: %x\n", SpecPtr[9])); - DbgPrint((DPRINT_DISK, "drive options: %x\n", *(PUSHORT)&SpecPtr[10])); - } + PUCHAR SpecPtr = (PUCHAR)((Ptr[13] << 4) + Ptr[14]); + DbgPrint((DPRINT_DISK, "SpecPtr: %x\n", SpecPtr)); + DbgPrint((DPRINT_DISK, "physical I/O port base address: %x\n", *(PUSHORT)&SpecPtr[0])); + DbgPrint((DPRINT_DISK, "disk-drive control port address: %x\n", *(PUSHORT)&SpecPtr[2])); + DbgPrint((DPRINT_DISK, "drive flags: %x\n", SpecPtr[4])); + DbgPrint((DPRINT_DISK, "proprietary information: %x\n", SpecPtr[5])); + DbgPrint((DPRINT_DISK, "IRQ for drive: %u\n", SpecPtr[6])); + DbgPrint((DPRINT_DISK, "sector count for multi-sector transfers: %u\n", SpecPtr[7])); + DbgPrint((DPRINT_DISK, "DMA control: %x\n", SpecPtr[8])); + DbgPrint((DPRINT_DISK, "programmed I/O control: %x\n", SpecPtr[9])); + DbgPrint((DPRINT_DISK, "drive options: %x\n", *(PUSHORT)&SpecPtr[10])); } - if (Ptr[0] >= 0x42) - { - DbgPrint((DPRINT_DISK, "signature: %x\n", Ptr[15])); - } -#endif + } + if (Ptr[0] >= 0x42) + { + DbgPrint((DPRINT_DISK, "signature: %x\n", Ptr[15])); + } return TRUE; } diff --git a/arch/i386/i386vid.c b/arch/i386/i386vid.c index 54edc29216e..1c33ee6804e 100644 --- a/arch/i386/i386vid.c +++ b/arch/i386/i386vid.c @@ -162,10 +162,8 @@ USHORT BiosIsVesaSupported(VOID) { REGS Regs; PVESA_SVGA_INFO SvgaInfo = (PVESA_SVGA_INFO)BIOSCALLBUFFER; -#ifdef DEBUG //USHORT* VideoModes; //USHORT Index; -#endif // defined DEBUG DbgPrint((DPRINT_UI, "BiosIsVesaSupported()\n")); @@ -210,7 +208,6 @@ USHORT BiosIsVesaSupported(VOID) return 0x0000; } -#ifdef DEBUG DbgPrint((DPRINT_UI, "Supported.\n")); DbgPrint((DPRINT_UI, "SvgaInfo->Signature[4] = %c%c%c%c\n", SvgaInfo->Signature[0], SvgaInfo->Signature[1], SvgaInfo->Signature[2], SvgaInfo->Signature[3])); DbgPrint((DPRINT_UI, "SvgaInfo->VesaVersion = v%d.%d\n", ((SvgaInfo->VesaVersion >> 8) & 0xFF), (SvgaInfo->VesaVersion & 0xFF))); @@ -242,8 +239,6 @@ USHORT BiosIsVesaSupported(VOID) //} DbgPrint((DPRINT_UI, "\n")); - //getch(); -#endif // defined DEBUG return SvgaInfo->VesaVersion; } diff --git a/comm/rs232.c b/comm/rs232.c index 4fd0994341b..0cda8479ea0 100644 --- a/comm/rs232.c +++ b/comm/rs232.c @@ -23,7 +23,7 @@ /* MACROS *******************************************************************/ -#ifdef DEBUG +#ifdef DBG #define DEFAULT_BAUD_RATE 19200 @@ -275,11 +275,11 @@ VOID Rs232PortPutByte(UCHAR ByteToSend) WRITE_PORT_UCHAR (SER_THR(Rs232PortBase), ByteToSend); } -#endif +#endif /* defined DBG */ BOOLEAN Rs232PortInUse(ULONG Base) { -#ifdef DEBUG +#ifdef DBG return PortInitialized && Rs232PortBase == (PUCHAR)Base ? TRUE : FALSE; #else return FALSE; diff --git a/debug.c b/debug.c index e6ec90af98d..aaa92a55994 100644 --- a/debug.c +++ b/debug.c @@ -21,7 +21,7 @@ #include -#ifdef DEBUG +#ifdef DBG //#define DEBUG_ALL //#define DEBUG_INIFILE @@ -356,4 +356,4 @@ VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length) } } -#endif // defined DEBUG +#endif // defined DBG diff --git a/disk/partition.c b/disk/partition.c index 792775069ea..80feb1ea668 100644 --- a/disk/partition.c +++ b/disk/partition.c @@ -199,9 +199,7 @@ BOOLEAN DiskGetFirstExtendedPartitionEntry(PMASTER_BOOT_RECORD MasterBootRecord, BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMASTER_BOOT_RECORD BootRecord) { char ErrMsg[64]; -#ifdef DEBUG ULONG Index; -#endif // Read master boot record if (!MachDiskReadLogicalSectors(DriveNumber, LogicalSectorNumber, 1, (PVOID)DISKREADBUFFER)) @@ -211,8 +209,6 @@ BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMA RtlCopyMemory(BootRecord, (PVOID)DISKREADBUFFER, sizeof(MASTER_BOOT_RECORD)); -#ifdef DEBUG - DbgPrint((DPRINT_DISK, "Dumping partition table for drive 0x%x:\n", DriveNumber)); DbgPrint((DPRINT_DISK, "Boot record logical start sector = %d\n", LogicalSectorNumber)); DbgPrint((DPRINT_DISK, "sizeof(MASTER_BOOT_RECORD) = 0x%x.\n", sizeof(MASTER_BOOT_RECORD))); @@ -233,8 +229,6 @@ BOOLEAN DiskReadBootRecord(ULONG DriveNumber, ULONGLONG LogicalSectorNumber, PMA DbgPrint((DPRINT_DISK, "PartitionSectorCount: 0x%x\n", BootRecord->PartitionTable[Index].PartitionSectorCount)); } -#endif // defined DEBUG - // Check the partition table magic value if (BootRecord->MasterBootRecordMagic != 0xaa55) { diff --git a/freeldr_arch.rbuild b/freeldr_arch.rbuild index c92eaf3edc6..54cf57bcb7d 100644 --- a/freeldr_arch.rbuild +++ b/freeldr_arch.rbuild @@ -6,9 +6,6 @@ cache include - - - -ffreestanding @@ -53,9 +50,6 @@ cache include - -ffreestanding @@ -69,4 +63,23 @@ + + + + include + cache + include + + + + boot.s + console.c + disk.c + hardware.c + loader.c + mach.c + video.c + + + diff --git a/freeldr_base.rbuild b/freeldr_base.rbuild index 67815a7c98f..53e3e0da268 100644 --- a/freeldr_base.rbuild +++ b/freeldr_base.rbuild @@ -4,9 +4,6 @@ . include - - - -ffreestanding diff --git a/freeldr_base64k.rbuild b/freeldr_base64k.rbuild index 4e3975bc7c9..3f6b74f3001 100644 --- a/freeldr_base64k.rbuild +++ b/freeldr_base64k.rbuild @@ -2,9 +2,6 @@ include include - -ffreestanding diff --git a/freeldr_startup.rbuild b/freeldr_startup.rbuild index 9a7cb43d838..815201a88a2 100644 --- a/freeldr_startup.rbuild +++ b/freeldr_startup.rbuild @@ -2,9 +2,6 @@ include include - -ffreestanding -fno-builtin -fno-inline diff --git a/fs/fat.c b/fs/fat.c index c3e2744542d..2f2cb3b59eb 100644 --- a/fs/fat.c +++ b/fs/fat.c @@ -78,8 +78,6 @@ BOOLEAN FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG Partitio // Get the FAT type FatType = FatDetermineFatType(FatVolumeBootSector, PartitionSectorCount); -#ifdef DEBUG - DbgPrint((DPRINT_FILESYSTEM, "Dumping boot sector:\n")); if (ISFATX(FatType)) @@ -155,9 +153,7 @@ BOOLEAN FatOpenVolume(ULONG DriveNumber, ULONG VolumeStartSector, ULONG Partitio DbgPrint((DPRINT_FILESYSTEM, "BootSectorMagic: 0x%x\n", FatVolumeBootSector->BootSectorMagic)); } -#endif // defined DEBUG - - // + // // Set the correct partition offset // FatVolumeStartSector = VolumeStartSector; diff --git a/fs/fs.c b/fs/fs.c index f4595a637df..b45698beb46 100644 --- a/fs/fs.c +++ b/fs/fs.c @@ -152,7 +152,6 @@ PFILE FsOpenFile(PCSTR FileName) break; } -#ifdef DEBUG // // Check return value // @@ -164,7 +163,6 @@ PFILE FsOpenFile(PCSTR FileName) { DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() failed.\n")); } -#endif // defined DEBUG return FileHandle; } diff --git a/fs/ntfs.c b/fs/ntfs.c index a92a993e7b9..3125a44a476 100644 --- a/fs/ntfs.c +++ b/fs/ntfs.c @@ -415,7 +415,7 @@ static BOOLEAN NtfsReadMftRecord(ULONG MFTIndex, PNTFS_MFT_RECORD Buffer) return NtfsFixupRecord((PNTFS_RECORD)Buffer); } -#ifdef DEBUG +#ifdef DBG VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) { PWCHAR FileName; @@ -443,7 +443,7 @@ static BOOLEAN NtfsCompareFileName(PCHAR FileName, PNTFS_INDEX_ENTRY IndexEntry) EntryFileName = IndexEntry->FileName.FileName; EntryFileNameLength = IndexEntry->FileName.FileNameLength; -#ifdef DEBUG +#ifdef DBG NtfsPrintFile(IndexEntry); #endif diff --git a/include/debug.h b/include/debug.h index 848c9dd74f0..723575eedd2 100644 --- a/include/debug.h +++ b/include/debug.h @@ -21,7 +21,7 @@ #ifndef __DEBUG_H #define __DEBUG_H -#ifdef DEBUG +#ifdef DBG #define DPRINT_NONE 0x00000000 // No debug print #define DPRINT_WARNING 0x00000001 // OR this with DebugPrintMask to enable debugger messages and other misc stuff @@ -72,7 +72,7 @@ void INSTRUCTION_BREAKPOINT4(unsigned long addr); void MEMORY_READWRITE_BREAKPOINT4(unsigned long addr); void MEMORY_WRITE_BREAKPOINT4(unsigned long addr); -#endif +#endif // defined __i386__ #else @@ -82,7 +82,7 @@ void MEMORY_WRITE_BREAKPOINT4(unsigned long addr); #define BugCheck(_x_) #define DbgDumpBuffer(_x_, _y_, _z_) -#endif // defined DEBUG +#endif // defined DBG #define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is unimplemented!\n")) diff --git a/include/freeldr.h b/include/freeldr.h index 4e973e70231..57f307adfe5 100644 --- a/include/freeldr.h +++ b/include/freeldr.h @@ -67,6 +67,8 @@ #include #include #include +#elif _MIPS_ +#include #endif /* misc files */ #include diff --git a/include/mm.h b/include/mm.h index 86914943c77..bdc0bf9e416 100644 --- a/include/mm.h +++ b/include/mm.h @@ -37,7 +37,7 @@ typedef struct ULONG Reserved; } PACKED BIOS_MEMORY_MAP, *PBIOS_MEMORY_MAP; -#if defined(__i386__) || defined(_PPC_) +#if defined(__i386__) || defined(_PPC_) || defined(_MIPS_) #define MM_PAGE_SIZE 4096 #define MM_PAGE_MASK 0xFFF @@ -46,13 +46,12 @@ typedef struct #define MM_SIZE_TO_PAGES(a) \ ( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) ) +#endif // defined __i386__ or _PPC_ or _MIPS_ // // This is the zone which is used by the OS loader // #define LOADER_HIGH_ZONE ((16*1024*1024) >> MM_PAGE_SHIFT) //16Mb page -#endif // defined __i386__ or _PPC_ - typedef struct { TYPE_OF_MEMORY PageAllocated; // Type of allocated memory (LoaderFree if this memory is free) @@ -73,7 +72,7 @@ extern ULONG TotalPagesInLookupTable; extern ULONG FreePagesInLookupTable; extern ULONG LastFreePageHint; -#ifdef DEBUG +#ifdef DBG PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type); #endif diff --git a/inifile/inifile.c b/inifile/inifile.c index 26638cc4383..f4c9869af34 100644 --- a/inifile/inifile.c +++ b/inifile/inifile.c @@ -83,9 +83,7 @@ BOOLEAN IniReadSettingByNumber(ULONG SectionId, ULONG SettingNumber, PCHAR Setti { PINI_SECTION Section = (PINI_SECTION)SectionId; PINI_SECTION_ITEM SectionItem; -#ifdef DEBUG ULONG RealSettingNumber = SettingNumber; -#endif DbgPrint((DPRINT_INIFILE, ".001 NameSize = %d ValueSize = %d\n", NameSize, ValueSize)); DbgPrint((DPRINT_INIFILE, "IniReadSettingByNumber() SectionId = 0x%x\n", SectionId)); diff --git a/mm/meminit.c b/mm/meminit.c index bbef9f987ea..ffafd8c409a 100644 --- a/mm/meminit.c +++ b/mm/meminit.c @@ -23,7 +23,7 @@ #define NDEBUG #include -#ifdef DEBUG +#ifdef DBG typedef struct { ULONG Type; @@ -50,7 +50,7 @@ BOOLEAN MmInitializeMemoryManager(VOID) { BIOS_MEMORY_MAP BiosMemoryMap[32]; ULONG BiosMemoryMapEntryCount; -#ifdef DEBUG +#ifdef DBG ULONG Index; #endif @@ -60,7 +60,7 @@ BOOLEAN MmInitializeMemoryManager(VOID) BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap, sizeof(BiosMemoryMap) / sizeof(BIOS_MEMORY_MAP)); -#ifdef DEBUG +#ifdef DBG // Dump the system memory map if (BiosMemoryMapEntryCount != 0) { @@ -116,7 +116,7 @@ BOOLEAN MmInitializeMemoryManager(VOID) return TRUE; } -#ifdef DEBUG +#ifdef DBG PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type) { ULONG Index; diff --git a/mm/mm.c b/mm/mm.c index b9083861751..624fa8f5cae 100644 --- a/mm/mm.c +++ b/mm/mm.c @@ -23,7 +23,7 @@ #define NDEBUG #include -#ifdef DEBUG +#ifdef DBG ULONG AllocationCount = 0; VOID VerifyHeap(VOID); @@ -31,7 +31,7 @@ VOID DumpMemoryAllocMap(VOID); VOID IncrementAllocationCount(VOID); VOID DecrementAllocationCount(VOID); VOID MemAllocTest(VOID); -#endif // DEBUG +#endif // DBG /* * Hack alert @@ -115,12 +115,12 @@ PVOID MmAllocateMemoryWithType(ULONG MemorySize, TYPE_OF_MEMORY MemoryType) } -#ifdef DEBUG +#ifdef DBG IncrementAllocationCount(); DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d. AllocCount: %d\n", MemorySize, PagesNeeded, FirstFreePageFromEnd, AllocationCount)); DbgPrint((DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer)); //VerifyHeap(); -#endif // DEBUG +#endif // DBG // Now return the pointer return MemPointer; @@ -181,12 +181,12 @@ PVOID MmAllocateMemoryAtAddress(ULONG MemorySize, PVOID DesiredAddress, TYPE_OF_ FreePagesInLookupTable -= PagesNeeded; MemPointer = (PVOID)(StartPageNumber * MM_PAGE_SIZE); -#ifdef DEBUG +#ifdef DBG IncrementAllocationCount(); DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d. AllocCount: %d\n", MemorySize, PagesNeeded, StartPageNumber, AllocationCount)); DbgPrint((DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer)); //VerifyHeap(); -#endif // DEBUG +#endif // DBG // Now return the pointer return MemPointer; @@ -236,12 +236,12 @@ PVOID MmAllocateHighestMemoryBelowAddress(ULONG MemorySize, PVOID DesiredAddress FreePagesInLookupTable -= PagesNeeded; MemPointer = (PVOID)(FirstFreePageFromEnd * MM_PAGE_SIZE); -#ifdef DEBUG +#ifdef DBG IncrementAllocationCount(); DbgPrint((DPRINT_MEMORY, "Allocated %d bytes (%d pages) of memory starting at page %d. AllocCount: %d\n", MemorySize, PagesNeeded, FirstFreePageFromEnd, AllocationCount)); DbgPrint((DPRINT_MEMORY, "Memory allocation pointer: 0x%x\n", MemPointer)); //VerifyHeap(); -#endif // DEBUG +#endif // DBG // Now return the pointer return MemPointer; @@ -254,21 +254,21 @@ VOID MmFreeMemory(PVOID MemoryPointer) ULONG Idx; PPAGE_LOOKUP_TABLE_ITEM RealPageLookupTable = (PPAGE_LOOKUP_TABLE_ITEM)PageLookupTableAddress; -#ifdef DEBUG +#ifdef DBG // Make sure we didn't get a bogus pointer if (MemoryPointer >= (PVOID)(TotalPagesInLookupTable * MM_PAGE_SIZE)) { BugCheck((DPRINT_MEMORY, "Bogus memory pointer (0x%x) passed to MmFreeMemory()\n", MemoryPointer)); } -#endif // DEBUG +#endif // DBG // Find out the page number of the first // page of memory they allocated PageNumber = MmGetPageNumberFromAddress(MemoryPointer); PageCount = RealPageLookupTable[PageNumber].PageAllocationLength; -#ifdef DEBUG +#ifdef DBG // Make sure we didn't get a bogus pointer if ((PageCount < 1) || (PageCount > (TotalPagesInLookupTable - PageNumber))) { @@ -305,14 +305,14 @@ VOID MmFreeMemory(PVOID MemoryPointer) FreePagesInLookupTable += PageCount; -#ifdef DEBUG +#ifdef DBG DecrementAllocationCount(); DbgPrint((DPRINT_MEMORY, "Freed %d pages of memory starting at page %d. AllocationCount: %d\n", PageCount, PageNumber, AllocationCount)); //VerifyHeap(); -#endif // DEBUG +#endif // DBG } -#ifdef DEBUG +#ifdef DBG VOID VerifyHeap(VOID) { ULONG Idx; @@ -488,7 +488,7 @@ VOID MemAllocTest(VOID) printf("MemPtr5: 0x%x\n", (int)MemPtr5); MachConsGetCh(); } -#endif // DEBUG +#endif // DBG ULONG GetSystemMemorySize(VOID) { diff --git a/windows/wlmemory.c b/windows/wlmemory.c index 88808832a92..511c14754d7 100644 --- a/windows/wlmemory.c +++ b/windows/wlmemory.c @@ -547,7 +547,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, DbgPrint((DPRINT_WINDOWS, "Memory Descriptor List prepared, printing PDE\n")); List_PaToVa(&LoaderBlock->MemoryDescriptorListHead); - #if DEBUG +#ifdef DBG { ULONG *PDE_Addr=(ULONG *)PDE;//0xC0300000; int j; @@ -566,7 +566,7 @@ WinLdrTurnOnPaging(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, DbgPrint((DPRINT_WINDOWS, "\n")); } } - #endif +#endif // Enable paging