Author: hpoussin
Date: Tue Apr 10 13:31:51 2007
New Revision: 26302
URL:
http://svn.reactos.org/svn/reactos?rev=26302&view=rev
Log:
Replace freeldr DEBUG define, by the global DBG define
Modified:
trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c
trunk/reactos/boot/freeldr/freeldr/comm/rs232.c
trunk/reactos/boot/freeldr/freeldr/debug.c
trunk/reactos/boot/freeldr/freeldr/disk/partition.c
trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild
trunk/reactos/boot/freeldr/freeldr/freeldr_startup.rbuild
trunk/reactos/boot/freeldr/freeldr/fs/fat.c
trunk/reactos/boot/freeldr/freeldr/fs/fs.c
trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
trunk/reactos/boot/freeldr/freeldr/include/debug.h
trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
trunk/reactos/boot/freeldr/freeldr/include/mm.h
trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
trunk/reactos/boot/freeldr/freeldr/mm/meminit.c
trunk/reactos/boot/freeldr/freeldr/mm/mm.c
trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386disk.c Tue Apr 10 13:31:51 2007
@@ -165,37 +165,35 @@
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;
}
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386vid.c Tue Apr 10 13:31:51 2007
@@ -162,10 +162,8 @@
{
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 @@
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 @@
//}
DbgPrint((DPRINT_UI, "\n"));
- //getch();
-#endif // defined DEBUG
return SvgaInfo->VesaVersion;
}
Modified: trunk/reactos/boot/freeldr/freeldr/comm/rs232.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/comm/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/comm/rs232.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/comm/rs232.c Tue Apr 10 13:31:51 2007
@@ -23,7 +23,7 @@
/* MACROS *******************************************************************/
-#ifdef DEBUG
+#ifdef DBG
#define DEFAULT_BAUD_RATE 19200
@@ -275,11 +275,11 @@
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;
Modified: trunk/reactos/boot/freeldr/freeldr/debug.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/debug.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/debug.c Tue Apr 10 13:31:51 2007
@@ -21,7 +21,7 @@
#include <debug.h>
-#ifdef DEBUG
+#ifdef DBG
//#define DEBUG_ALL
//#define DEBUG_INIFILE
@@ -356,4 +356,4 @@
}
}
-#endif // defined DEBUG
+#endif // defined DBG
Modified: trunk/reactos/boot/freeldr/freeldr/disk/partition.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/disk/…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/disk/partition.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/disk/partition.c Tue Apr 10 13:31:51 2007
@@ -199,9 +199,7 @@
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))
@@ -210,8 +208,6 @@
}
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));
@@ -233,8 +229,6 @@
DbgPrint((DPRINT_DISK, "PartitionSectorCount: 0x%x\n",
BootRecord->PartitionTable[Index].PartitionSectorCount));
}
-#endif // defined DEBUG
-
// Check the partition table magic value
if (BootRecord->MasterBootRecordMagic != 0xaa55)
{
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_arch.rbuild Tue Apr 10 13:31:51 2007
@@ -6,9 +6,6 @@
<include base="freeldr_base">cache</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
-<!--
- <define name="DEBUG" />
--->
<define name="_NTHAL_" />
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
@@ -52,9 +49,6 @@
<include base="freeldr_base">cache</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
-<!--
- <define name="DEBUG" />
--->
<define name="_NTHAL_" />
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
@@ -67,4 +61,23 @@
</module>
</if>
</directory>
+ <directory name="mips">
+ <if property="ARCH" value="mips">
+ <module name="freeldr_arch" type="objectlibrary">
+ <include base="freeldr_base">include</include>
+ <include base="freeldr_base">cache</include>
+ <include base="ntoskrnl">include</include>
+ <define name="__USE_W32API" />
+ <define name="DEBUG" />
+ <define name="_NTHAL_" />
+ <file>boot.s</file>
+ <file>console.c</file>
+ <file>disk.c</file>
+ <file>hardware.c</file>
+ <file>loader.c</file>
+ <file>mach.c</file>
+ <file>video.c</file>
+ </module>
+ </if>
+ </directory>
</directory>
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base.rbuild Tue Apr 10 13:31:51 2007
@@ -4,9 +4,6 @@
<include base="cmlib">.</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
-<!--
- <define name="DEBUG" />
--->
<define name="_NTHAL_" />
<define name="_NTSYSTEM_" />
<compilerflag>-ffreestanding</compilerflag>
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_base64k.rbuild Tue Apr 10 13:31:51 2007
@@ -2,9 +2,6 @@
<include base="freeldr_base64k">include</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
-<!--
- <define name="DEBUG" />
--->
<define name="_NTHAL_" />
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
Modified: trunk/reactos/boot/freeldr/freeldr/freeldr_startup.rbuild
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/freeldr_startup.rbuild (original)
+++ trunk/reactos/boot/freeldr/freeldr/freeldr_startup.rbuild Tue Apr 10 13:31:51 2007
@@ -2,9 +2,6 @@
<include base="freeldr_startup">include</include>
<include base="ntoskrnl">include</include>
<define name="__USE_W32API" />
-<!--
- <define name="DEBUG" />
--->
<compilerflag>-ffreestanding</compilerflag>
<compilerflag>-fno-builtin</compilerflag>
<compilerflag>-fno-inline</compilerflag>
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fat.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fa…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fat.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fat.c Tue Apr 10 13:31:51 2007
@@ -77,8 +77,6 @@
// Get the FAT type
FatType = FatDetermineFatType(FatVolumeBootSector, PartitionSectorCount);
-
-#ifdef DEBUG
DbgPrint((DPRINT_FILESYSTEM, "Dumping boot sector:\n"));
@@ -155,9 +153,7 @@
DbgPrint((DPRINT_FILESYSTEM, "BootSectorMagic: 0x%x\n",
FatVolumeBootSector->BootSectorMagic));
}
-#endif // defined DEBUG
-
- //
+ //
// Set the correct partition offset
//
FatVolumeStartSector = VolumeStartSector;
Modified: trunk/reactos/boot/freeldr/freeldr/fs/fs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/fs…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/fs.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/fs.c Tue Apr 10 13:31:51 2007
@@ -152,7 +152,6 @@
break;
}
-#ifdef DEBUG
//
// Check return value
//
@@ -164,7 +163,6 @@
{
DbgPrint((DPRINT_FILESYSTEM, "FsOpenFile() failed.\n"));
}
-#endif // defined DEBUG
return FileHandle;
}
Modified: trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/fs/nt…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/fs/ntfs.c Tue Apr 10 13:31:51 2007
@@ -400,7 +400,7 @@
return NtfsFixupRecord((PNTFS_RECORD)Buffer);
}
-#ifdef DEBUG
+#ifdef DBG
VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry)
{
PWCHAR FileName;
@@ -428,7 +428,7 @@
EntryFileName = IndexEntry->FileName.FileName;
EntryFileNameLength = IndexEntry->FileName.FileNameLength;
-#ifdef DEBUG
+#ifdef DBG
NtfsPrintFile(IndexEntry);
#endif
Modified: trunk/reactos/boot/freeldr/freeldr/include/debug.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/debug.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/debug.h Tue Apr 10 13:31:51 2007
@@ -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 MEMORY_READWRITE_BREAKPOINT4(unsigned long addr);
void MEMORY_WRITE_BREAKPOINT4(unsigned long addr);
-#endif
+#endif // defined __i386__
#else
@@ -82,7 +82,7 @@
#define BugCheck(_x_)
#define DbgDumpBuffer(_x_, _y_, _z_)
-#endif // defined DEBUG
+#endif // defined DBG
#define UNIMPLEMENTED() BugCheck((DPRINT_WARNING, "This function is
unimplemented!\n"))
Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h Tue Apr 10 13:31:51 2007
@@ -67,6 +67,8 @@
#include <arch/i386/machxbox.h>
#include <internal/i386/intrin_i.h>
#include <internal/i386/ke.h>
+#elif _MIPS_
+#include <arch/mips/arcbios.h>
#endif
/* misc files */
#include <keycodes.h>
Modified: trunk/reactos/boot/freeldr/freeldr/include/mm.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/include/mm.h (original)
+++ trunk/reactos/boot/freeldr/freeldr/include/mm.h Tue Apr 10 13:31:51 2007
@@ -37,7 +37,7 @@
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,7 +46,7 @@
#define MM_SIZE_TO_PAGES(a) \
( ((a) >> MM_PAGE_SHIFT) + ((a) & MM_PAGE_MASK ? 1 : 0) )
-#endif // defined __i386__ or _PPC_
+#endif // defined __i386__ or _PPC_ or _MIPS_
typedef struct
{
@@ -68,7 +68,7 @@
extern ULONG FreePagesInLookupTable;
extern ULONG LastFreePageHint;
-#ifdef DEBUG
+#ifdef DBG
PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type);
#endif
Modified: trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inifi…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/inifile/inifile.c Tue Apr 10 13:31:51 2007
@@ -83,9 +83,7 @@
{
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));
Modified: trunk/reactos/boot/freeldr/freeldr/mm/meminit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/me…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/meminit.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/meminit.c Tue Apr 10 13:31:51 2007
@@ -22,7 +22,7 @@
#define NDEBUG
#include <debug.h>
-#ifdef DEBUG
+#ifdef DBG
typedef struct
{
ULONG Type;
@@ -49,7 +49,7 @@
{
BIOS_MEMORY_MAP BiosMemoryMap[32];
ULONG BiosMemoryMapEntryCount;
-#ifdef DEBUG
+#ifdef DBG
ULONG Index;
#endif
@@ -59,7 +59,7 @@
BiosMemoryMapEntryCount = MachGetMemoryMap(BiosMemoryMap, sizeof(BiosMemoryMap) /
sizeof(BIOS_MEMORY_MAP));
-#ifdef DEBUG
+#ifdef DBG
// Dump the system memory map
if (BiosMemoryMapEntryCount != 0)
{
@@ -101,7 +101,7 @@
return TRUE;
}
-#ifdef DEBUG
+#ifdef DBG
PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type)
{
ULONG Index;
Modified: trunk/reactos/boot/freeldr/freeldr/mm/mm.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/mm…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/mm/mm.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/mm/mm.c Tue Apr 10 13:31:51 2007
@@ -22,7 +22,7 @@
#define NDEBUG
#include <debug.h>
-#ifdef DEBUG
+#ifdef DBG
ULONG AllocationCount = 0;
VOID VerifyHeap(VOID);
@@ -30,7 +30,7 @@
VOID IncrementAllocationCount(VOID);
VOID DecrementAllocationCount(VOID);
VOID MemAllocTest(VOID);
-#endif // DEBUG
+#endif // DBG
/*
* Hack alert
@@ -114,12 +114,12 @@
}
-#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;
@@ -173,12 +173,12 @@
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;
@@ -228,12 +228,12 @@
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;
@@ -246,21 +246,21 @@
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)))
{
@@ -297,14 +297,14 @@
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
-}
-
-#ifdef DEBUG
+#endif // DBG
+}
+
+#ifdef DBG
VOID VerifyHeap(VOID)
{
ULONG Idx;
@@ -480,7 +480,7 @@
printf("MemPtr5: 0x%x\n", (int)MemPtr5);
MachConsGetCh();
}
-#endif // DEBUG
+#endif // DBG
ULONG GetSystemMemorySize(VOID)
{
Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c (original)
+++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c Tue Apr 10 13:31:51 2007
@@ -534,7 +534,7 @@
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;
@@ -553,7 +553,7 @@
DbgPrint((DPRINT_WINDOWS, "\n"));
}
}
- #endif
+#endif
// Enable paging