ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
August 2007
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
21 participants
666 discussions
Start a n
N
ew thread
[greatlrd] 28288: adding more dx test to w32knapi, convert from win32kdxtest tool
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sat Aug 11 18:35:44 2007 New Revision: 28288 URL:
http://svn.reactos.org/svn/reactos?rev=28288&view=rev
Log: adding more dx test to w32knapi, convert from win32kdxtest tool Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/Nt…
============================================================================== --- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c (original) +++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c Sat Aug 11 18:35:44 2007 @@ -44,6 +44,9 @@ VIDEOMEMORY vmList; //DWORD NumFourCC = 0; //DWORD FourCC = 0; + DEVMODE devmode; + HDC hdc; + /* clear data */ memset(&vmList,0,sizeof(VIDEOMEMORY)); @@ -54,7 +57,12 @@ memset(&HalInfo,0,sizeof(DD_HALINFO)); memset(CallBackFlags,0,sizeof(DWORD)*3); - HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); + + + /* Get currenet display mode */ + EnumDisplaySettings(NULL, ENUM_CURRENT_SETTINGS, &devmode); + + hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); ASSERT1(hdc != NULL); hDirectDraw = (HANDLE) Syscall(L"NtGdiDdCreateDirectDrawObject", 1, &hdc); @@ -112,6 +120,59 @@ RTEST(puFourCC == NULL); ASSERT1(pHalInfo != NULL); + if ((pHalInfo->dwSize != sizeof(DD_HALINFO)) && + (pHalInfo->dwSize != sizeof(DD_HALINFO_V4))) + { + RTEST(pHalInfo->dwSize != sizeof(DD_HALINFO)); + ASSERT1(pHalInfo->dwSize != sizeof(DD_HALINFO)); + } + + + + if (pHalInfo->dwSize == sizeof(DD_HALINFO)) + { + /*the offset, in bytes, to primary surface in the display memory */ + RTEST(pHalInfo->vmiData.fpPrimary != 0 ); + + /* unsuse always 0 */ + RTEST(pHalInfo->vmiData.dwFlags == 0 ); + + /* fixme check the res */ + + + RTEST(pHalInfo->vmiData.dwDisplayWidth == devmode.dmPelsWidth ); + RTEST(pHalInfo->vmiData.dwDisplayHeight == devmode.dmPelsHeight ); + /* FIXME + RTEST(pHalInfo->vmiData.lDisplayPitch == 0x1700; + */ + RTEST(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT) ); + ASSERT1(pHalInfo->vmiData.ddpfDisplay.dwSize == sizeof(DDPIXELFORMAT)); + + + /* No fourcc are use on primary screen */ + RTEST(pHalInfo->vmiData.ddpfDisplay.dwFourCC == 0 ); + + /* Count RGB Bits 8/16/24/32 */ + RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBBitCount == devmode.dmBitsPerPel ); + + /* FIXME RGB mask */ + //RTEST(pHalInfo->vmiData.ddpfDisplay.dwRBitMask == 0 ); + //RTEST(pHalInfo->vmiData.ddpfDisplay.dwGBitMask == 0 ); + //RTEST(pHalInfo->vmiData.ddpfDisplay.dwBBitMask == 0 ); + /* primary never set the alpha blend mask */ + RTEST(pHalInfo->vmiData.ddpfDisplay.dwRGBAlphaBitMask == 0 ); + + /* FIXME do not known how test follow thing, for it is diffent for each drv */ + // pHalInfo->vmiData->dwOffscreenAlign : 0x00000100 + // pHalInfo->vmiData->dwOverlayAlign : 0x00000010 + // pHalInfo->vmiData->dwTextureAlign : 0x00000020 + // pHalInfo->vmiData->dwZBufferAlign : 0x00001000 + // pHalInfo->vmiData->dwAlphaAlign : 0x00000000 + + /* the primary display address */ + RTEST(pHalInfo->vmiData.pvPrimary != 0x00000000 ); + } + /* Cleanup ReactX setup */ DeleteDC(hdc); Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw);
17 years, 4 months
1
0
0
0
[fireball] 28287: - Merge 26782, 26783, 26785, 26786 - Merge 26842, 26847, 26861, 26867 - Merge 26958
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 18:32:39 2007 New Revision: 28287 URL:
http://svn.reactos.org/svn/reactos?rev=28287&view=rev
Log: - Merge 26782, 26783, 26785, 26786 - Merge 26842, 26847, 26861, 26867 - Merge 26958 Modified: branches/winldr/arch/i386/hwacpi.c branches/winldr/arch/i386/hwapm.c branches/winldr/arch/i386/pcdisk.c branches/winldr/cache/blocklist.c branches/winldr/cache/cache.c branches/winldr/debug.c branches/winldr/disk/disk.c branches/winldr/disk/partition.c branches/winldr/drivemap.c branches/winldr/freeldr.c branches/winldr/fs/ext2.c branches/winldr/fs/fat.c branches/winldr/fs/fs.c branches/winldr/fs/fsrec.c branches/winldr/fs/iso.c branches/winldr/fs/ntfs.c branches/winldr/include/debug.h branches/winldr/inifile/inifile.c branches/winldr/inifile/parse.c branches/winldr/linuxboot.c branches/winldr/mm/meminit.c branches/winldr/mm/mm.c branches/winldr/reactos/binhive.c branches/winldr/reactos/reactos.c branches/winldr/reactos/registry.c branches/winldr/reactos/setupldr.c branches/winldr/ui/ui.c branches/winldr/windows/conversion.c branches/winldr/windows/peloader.c branches/winldr/windows/winldr.c branches/winldr/windows/wlmemory.c branches/winldr/windows/wlregistry.c Modified: branches/winldr/arch/i386/hwacpi.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/hwacpi.c?rev=2…
============================================================================== --- branches/winldr/arch/i386/hwacpi.c (original) +++ branches/winldr/arch/i386/hwacpi.c Sat Aug 11 18:32:39 2007 @@ -19,8 +19,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> BOOLEAN AcpiPresent = FALSE; @@ -28,49 +26,49 @@ static BOOLEAN FindAcpiBios(VOID) { - PUCHAR Ptr; + PUCHAR Ptr; - /* Find the 'Root System Descriptor Table Pointer' */ - Ptr = (PUCHAR)0xE0000; - while ((ULONG)Ptr < 0x100000) + /* Find the 'Root System Descriptor Table Pointer' */ + Ptr = (PUCHAR)0xE0000; + while ((ULONG)Ptr < 0x100000) { - if (!memcmp(Ptr, "RSD PTR ", 8)) - { - DbgPrint((DPRINT_HWDETECT, "ACPI supported\n")); + if (!memcmp(Ptr, "RSD PTR ", 8)) + { + DbgPrint((DPRINT_HWDETECT, "ACPI supported\n")); - return TRUE; - } + return TRUE; + } - Ptr = (PUCHAR)((ULONG)Ptr + 0x10); + Ptr = (PUCHAR)((ULONG)Ptr + 0x10); } - DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n")); + DbgPrint((DPRINT_HWDETECT, "ACPI not supported\n")); - return FALSE; + return FALSE; } VOID DetectAcpiBios(FRLDRHKEY SystemKey, ULONG *BusNumber) { - WCHAR Buffer[80]; - FRLDRHKEY BiosKey; - LONG Error; + WCHAR Buffer[80]; + FRLDRHKEY BiosKey; + LONG Error; - if (FindAcpiBios()) + if (FindAcpiBios()) { - AcpiPresent = TRUE; - /* Create new bus key */ - swprintf(Buffer, - L"MultifunctionAdapter\\%u", *BusNumber); - Error = RegCreateKey(SystemKey, - Buffer, - &BiosKey); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error)); - return; - } + AcpiPresent = TRUE; + /* Create new bus key */ + swprintf(Buffer, + L"MultifunctionAdapter\\%u", *BusNumber); + Error = RegCreateKey(SystemKey, + Buffer, + &BiosKey); + if (Error != ERROR_SUCCESS) + { + DbgPrint((DPRINT_HWDETECT, "RegCreateKey() failed (Error %u)\n", (int)Error)); + return; + } #if 0 /* Set 'Component Information' */ @@ -80,20 +78,20 @@ 0xFFFFFFFF); #endif - /* Increment bus number */ - (*BusNumber)++; + /* Increment bus number */ + (*BusNumber)++; - /* Set 'Identifier' value */ - Error = RegSetValue(BiosKey, - L"Identifier", - REG_SZ, - (PCHAR)L"ACPI BIOS", - 10 * sizeof(WCHAR)); - if (Error != ERROR_SUCCESS) - { - DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); - return; - } + /* Set 'Identifier' value */ + Error = RegSetValue(BiosKey, + L"Identifier", + REG_SZ, + (PCHAR)L"ACPI BIOS", + 10 * sizeof(WCHAR)); + if (Error != ERROR_SUCCESS) + { + DbgPrint((DPRINT_HWDETECT, "RegSetValue() failed (Error %u)\n", (int)Error)); + return; + } } } Modified: branches/winldr/arch/i386/hwapm.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/hwapm.c?rev=28…
============================================================================== --- branches/winldr/arch/i386/hwapm.c (original) +++ branches/winldr/arch/i386/hwapm.c Sat Aug 11 18:32:39 2007 @@ -47,7 +47,7 @@ return TRUE; } - printf("No APM BIOS found\n"); + DbgPrint((DPRINT_HWDETECT, "No APM BIOS found\n")); return FALSE; } Modified: branches/winldr/arch/i386/pcdisk.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/pcdisk.c?rev=2…
============================================================================== --- branches/winldr/arch/i386/pcdisk.c (original) +++ branches/winldr/arch/i386/pcdisk.c Sat Aug 11 18:32:39 2007 @@ -121,7 +121,7 @@ } // If we get here then the read failed - DiskError("Disk Read Failed", RegsOut.b.ah); + DiskError("Disk Read Failed in LBA mode", RegsOut.b.ah); return FALSE; } @@ -244,7 +244,7 @@ // If we retried 3 times then fail if (RetryCount >= 3) { - DiskError("Disk Read Failed", RegsOut.b.ah); + DiskError("Disk Read Failed in CHS mode, after retrying 3 times", RegsOut.b.ah); return FALSE; } Modified: branches/winldr/cache/blocklist.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/cache/blocklist.c?rev=28…
============================================================================== --- branches/winldr/cache/blocklist.c (original) +++ branches/winldr/cache/blocklist.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> // Returns a pointer to a CACHE_BLOCK structure Modified: branches/winldr/cache/cache.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/cache/cache.c?rev=28287&…
============================================================================== --- branches/winldr/cache/cache.c (original) +++ branches/winldr/cache/cache.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> /////////////////////////////////////////////////////////////////////////////////////// Modified: branches/winldr/debug.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/debug.c?rev=28287&r1=282…
============================================================================== --- branches/winldr/debug.c (original) +++ branches/winldr/debug.c Sat Aug 11 18:32:39 2007 @@ -356,4 +356,10 @@ } } +#else + +VOID DebugPrint(ULONG Mask, char *format, ...) +{ +} + #endif // defined DBG Modified: branches/winldr/disk/disk.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/disk/disk.c?rev=28287&r1…
============================================================================== --- branches/winldr/disk/disk.c (original) +++ branches/winldr/disk/disk.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> #undef UNIMPLEMENTED Modified: branches/winldr/disk/partition.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/disk/partition.c?rev=282…
============================================================================== --- branches/winldr/disk/partition.c (original) +++ branches/winldr/disk/partition.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> BOOLEAN DiskGetActivePartitionEntry(ULONG DriveNumber, Modified: branches/winldr/drivemap.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/drivemap.c?rev=28287&r1=…
============================================================================== --- branches/winldr/drivemap.c (original) +++ branches/winldr/drivemap.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> #ifdef __i386__ Modified: branches/winldr/freeldr.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr.c?rev=28287&r1=2…
============================================================================== --- branches/winldr/freeldr.c (original) +++ branches/winldr/freeldr.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> VOID BootMain(LPSTR CmdLine) Modified: branches/winldr/fs/ext2.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/ext2.c?rev=28287&r1=2…
============================================================================== --- branches/winldr/fs/ext2.c (original) +++ branches/winldr/fs/ext2.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> GEOMETRY Ext2DiskGeometry; // Ext2 file system disk geometry Modified: branches/winldr/fs/fat.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/fat.c?rev=28287&r1=28…
============================================================================== --- branches/winldr/fs/fat.c (original) +++ branches/winldr/fs/fat.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> ULONG BytesPerSector; /* Number of bytes per sector */ Modified: branches/winldr/fs/fs.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/fs.c?rev=28287&r1=282…
============================================================================== --- branches/winldr/fs/fs.c (original) +++ branches/winldr/fs/fs.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> ///////////////////////////////////////////////////////////////////////////////////////////// Modified: branches/winldr/fs/fsrec.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/fsrec.c?rev=28287&r1=…
============================================================================== --- branches/winldr/fs/fsrec.c (original) +++ branches/winldr/fs/fsrec.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> ///////////////////////////////////////////////////////////////////////////////////////////// Modified: branches/winldr/fs/iso.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/iso.c?rev=28287&r1=28…
============================================================================== --- branches/winldr/fs/iso.c (original) +++ branches/winldr/fs/iso.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> #define SECTORSIZE 2048 Modified: branches/winldr/fs/ntfs.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/ntfs.c?rev=28287&r1=2…
============================================================================== --- branches/winldr/fs/ntfs.c (original) +++ branches/winldr/fs/ntfs.c Sat Aug 11 18:32:39 2007 @@ -24,8 +24,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> PNTFS_BOOTSECTOR NtfsBootSector; Modified: branches/winldr/include/debug.h URL:
http://svn.reactos.org/svn/reactos/branches/winldr/include/debug.h?rev=2828…
============================================================================== --- branches/winldr/include/debug.h (original) +++ branches/winldr/include/debug.h Sat Aug 11 18:32:39 2007 @@ -21,29 +21,30 @@ #ifndef __DEBUG_H #define __DEBUG_H +#define DPRINT_NONE 0x00000000 // No debug print +#define DPRINT_WARNING 0x00000001 // OR this with DebugPrintMask to enable debugger messages and other misc stuff +#define DPRINT_MEMORY 0x00000002 // OR this with DebugPrintMask to enable memory management messages +#define DPRINT_FILESYSTEM 0x00000004 // OR this with DebugPrintMask to enable file system messages +#define DPRINT_INIFILE 0x00000008 // OR this with DebugPrintMask to enable .ini file messages +#define DPRINT_UI 0x00000010 // OR this with DebugPrintMask to enable user interface messages +#define DPRINT_DISK 0x00000020 // OR this with DebugPrintMask to enable disk messages +#define DPRINT_CACHE 0x00000040 // OR this with DebugPrintMask to enable cache messages +#define DPRINT_REGISTRY 0x00000080 // OR this with DebugPrintMask to enable registry messages +#define DPRINT_REACTOS 0x00000100 // OR this with DebugPrintMask to enable ReactOS messages +#define DPRINT_LINUX 0x00000200 // OR this with DebugPrintMask to enable Linux messages +#define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages +#define DPRINT_WINDOWS 0x00000800 // OR this with DebugPrintMask to enable messages from Windows loader + +VOID DebugPrint(ULONG Mask, char *format, ...); + #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 - #define DPRINT_MEMORY 0x00000002 // OR this with DebugPrintMask to enable memory management messages - #define DPRINT_FILESYSTEM 0x00000004 // OR this with DebugPrintMask to enable file system messages - #define DPRINT_INIFILE 0x00000008 // OR this with DebugPrintMask to enable .ini file messages - #define DPRINT_UI 0x00000010 // OR this with DebugPrintMask to enable user interface messages - #define DPRINT_DISK 0x00000020 // OR this with DebugPrintMask to enable disk messages - #define DPRINT_CACHE 0x00000040 // OR this with DebugPrintMask to enable cache messages - #define DPRINT_REGISTRY 0x00000080 // OR this with DebugPrintMask to enable registry messages - #define DPRINT_REACTOS 0x00000100 // OR this with DebugPrintMask to enable ReactOS messages - #define DPRINT_LINUX 0x00000200 // OR this with DebugPrintMask to enable Linux messages - #define DPRINT_HWDETECT 0x00000400 // OR this with DebugPrintMask to enable hardware detection messages - #define DPRINT_WINDOWS 0x00000800 // OR this with DebugPrintMask to enable messages from Windows loader - VOID DebugInit(VOID); - VOID DebugPrint(ULONG Mask, char *format, ...); VOID DebugPrint1(char *format, ...); VOID DebugDumpBuffer(ULONG Mask, PVOID Buffer, ULONG Length); #define DbgPrint(_x_) DebugPrint _x_ ; - #define DPRINT1 DebugPrint1 + #define DPRINT1 DebugPrint1 #define BugCheck(_x_) { DebugPrint(DPRINT_WARNING, "Fatal Error: %s:%d(%s)\n", __FILE__, __LINE__, __FUNCTION__); DebugPrint _x_ ; for (;;); } #define DbgDumpBuffer(_x_, _y_, _z_) DebugDumpBuffer(_x_, _y_, _z_) @@ -77,8 +78,8 @@ #else #define DebugInit() - #define DbgPrint(_x_) - #define DPRINT1(_x_) + #define DbgPrint(_x_) { if (0) DebugPrint _x_; } + #define DPRINT1(_x_) { if (0) printf _x_; } #define BugCheck(_x_) #define DbgDumpBuffer(_x_, _y_, _z_) Modified: branches/winldr/inifile/inifile.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/inifile/inifile.c?rev=28…
============================================================================== --- branches/winldr/inifile/inifile.c (original) +++ branches/winldr/inifile/inifile.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> BOOLEAN IniOpenSection(PCSTR SectionName, ULONG* SectionId) Modified: branches/winldr/inifile/parse.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/inifile/parse.c?rev=2828…
============================================================================== --- branches/winldr/inifile/parse.c (original) +++ branches/winldr/inifile/parse.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> PINI_SECTION IniFileSectionListHead = NULL; Modified: branches/winldr/linuxboot.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/linuxboot.c?rev=28287&r1…
============================================================================== --- branches/winldr/linuxboot.c (original) +++ branches/winldr/linuxboot.c Sat Aug 11 18:32:39 2007 @@ -19,8 +19,6 @@ #include <freeldr.h> - -#define NDEBUG #include <debug.h> #ifdef __i386__ Modified: branches/winldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/mm/meminit.c?rev=28287&r…
============================================================================== --- branches/winldr/mm/meminit.c (original) +++ branches/winldr/mm/meminit.c Sat Aug 11 18:32:39 2007 @@ -19,8 +19,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> #ifdef DBG Modified: branches/winldr/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/mm/mm.c?rev=28287&r1=282…
============================================================================== --- branches/winldr/mm/mm.c (original) +++ branches/winldr/mm/mm.c Sat Aug 11 18:32:39 2007 @@ -19,13 +19,11 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> -#ifdef DBG ULONG AllocationCount = 0; +#ifdef DBG VOID VerifyHeap(VOID); VOID DumpMemoryAllocMap(VOID); VOID IncrementAllocationCount(VOID); Modified: branches/winldr/reactos/binhive.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/binhive.c?rev=28…
============================================================================== --- branches/winldr/reactos/binhive.c (original) +++ branches/winldr/reactos/binhive.c Sat Aug 11 18:32:39 2007 @@ -21,8 +21,6 @@ #include <freeldr.h> #include <cmlib.h> - -#define NDEBUG #include <debug.h> /* FUNCTIONS ****************************************************************/ Modified: branches/winldr/reactos/reactos.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/reactos.c?rev=28…
============================================================================== --- branches/winldr/reactos/reactos.c (original) +++ branches/winldr/reactos/reactos.c Sat Aug 11 18:32:39 2007 @@ -20,8 +20,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> ROS_LOADER_PARAMETER_BLOCK LoaderBlock; Modified: branches/winldr/reactos/registry.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/registry.c?rev=2…
============================================================================== --- branches/winldr/reactos/registry.c (original) +++ branches/winldr/reactos/registry.c Sat Aug 11 18:32:39 2007 @@ -19,8 +19,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> static FRLDRHKEY RootKey; Modified: branches/winldr/reactos/setupldr.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/reactos/setupldr.c?rev=2…
============================================================================== --- branches/winldr/reactos/setupldr.c (original) +++ branches/winldr/reactos/setupldr.c Sat Aug 11 18:32:39 2007 @@ -19,6 +19,7 @@ */ #include <freeldr.h> +#include <debug.h> ROS_LOADER_PARAMETER_BLOCK LoaderBlock; char reactos_kernel_cmdline[255]; // Command line passed to kernel Modified: branches/winldr/ui/ui.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/ui/ui.c?rev=28287&r1=282…
============================================================================== --- branches/winldr/ui/ui.c (original) +++ branches/winldr/ui/ui.c Sat Aug 11 18:32:39 2007 @@ -18,8 +18,6 @@ */ #include <freeldr.h> - -#define NDEBUG #include <debug.h> Modified: branches/winldr/windows/conversion.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/conversion.c?rev…
============================================================================== --- branches/winldr/windows/conversion.c (original) +++ branches/winldr/windows/conversion.c Sat Aug 11 18:32:39 2007 @@ -11,8 +11,6 @@ #include <freeldr.h> //#include <ndk/ldrtypes.h> - -#define NDEBUG #include <debug.h> /* FUNCTIONS **************************************************************/ Modified: branches/winldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/peloader.c?rev=2…
============================================================================== --- branches/winldr/windows/peloader.c (original) +++ branches/winldr/windows/peloader.c Sat Aug 11 18:32:39 2007 @@ -15,8 +15,6 @@ /* INCLUDES ***************************************************************/ #include <freeldr.h> - -//#define NDEBUG #include <debug.h> Modified: branches/winldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/winldr.c?rev=282…
============================================================================== --- branches/winldr/windows/winldr.c (original) +++ branches/winldr/windows/winldr.c Sat Aug 11 18:32:39 2007 @@ -22,8 +22,6 @@ #include <freeldr.h> #include <ndk/ldrtypes.h> - -//#define NDEBUG #include <debug.h> //FIXME: Do a better way to retrieve Arc disk information Modified: branches/winldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/wlmemory.c?rev=2…
============================================================================== --- branches/winldr/windows/wlmemory.c (original) +++ branches/winldr/windows/wlmemory.c Sat Aug 11 18:32:39 2007 @@ -11,8 +11,6 @@ #include <freeldr.h> #include <ndk/asm.h> - -#define NDEBUG #include <debug.h> extern ULONG TotalNLSSize; Modified: branches/winldr/windows/wlregistry.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/wlregistry.c?rev…
============================================================================== --- branches/winldr/windows/wlregistry.c (original) +++ branches/winldr/windows/wlregistry.c Sat Aug 11 18:32:39 2007 @@ -9,8 +9,6 @@ /* INCLUDES ***************************************************************/ #include <freeldr.h> - -#define NDEBUG #include <debug.h> // The only global var here, used to mark mem pages as NLS in WinLdrTurnOnPaging()
17 years, 4 months
1
0
0
0
[fireball] 28286: - Fix warnings when compiled with GCC 4.x - Make compilable in recent RosBE
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 18:25:06 2007 New Revision: 28286 URL:
http://svn.reactos.org/svn/reactos?rev=28286&view=rev
Log: - Fix warnings when compiled with GCC 4.x - Make compilable in recent RosBE Modified: branches/winldr/freeldr.rbuild branches/winldr/setupldr.rbuild branches/winldr/windows/peloader.c Modified: branches/winldr/freeldr.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr.rbuild?rev=28286…
============================================================================== --- branches/winldr/freeldr.rbuild (original) +++ branches/winldr/freeldr.rbuild Sat Aug 11 18:25:06 2007 @@ -6,7 +6,7 @@ <library>freeldr_arch</library> <library>freeldr_main</library> <library>rossym</library> - <library>string</library> + <library>libcntpr</library> <library>cmlib</library> <library>rtl</library> </module> Modified: branches/winldr/setupldr.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/setupldr.rbuild?rev=2828…
============================================================================== --- branches/winldr/setupldr.rbuild (original) +++ branches/winldr/setupldr.rbuild Sat Aug 11 18:25:06 2007 @@ -6,7 +6,7 @@ <library>freeldr_arch</library> <library>setupldr_main</library> <library>rossym</library> - <library>string</library> + <library>libcntpr</library> <library>cmlib</library> <library>rtl</library> </module> Modified: branches/winldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/peloader.c?rev=2…
============================================================================== --- branches/winldr/windows/peloader.c (original) +++ branches/winldr/windows/peloader.c Sat Aug 11 18:25:06 2007 @@ -116,7 +116,7 @@ return TRUE; /* Loop through all entries */ - for (;(ImportTable->Name != 0) && (ImportTable->FirstThunk != NULL);ImportTable++) + for (;(ImportTable->Name != 0) && (ImportTable->FirstThunk != 0);ImportTable++) { /* Get pointer to the name */ ImportName = (PCH)VaToPa(RVA(ScanDTE->DllBase, ImportTable->Name)); @@ -520,7 +520,7 @@ /* AddressOfData in thunk entry will become a virtual address (from relative) */ //DbgPrint((DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD was %p\n", ThunkData->u1.AddressOfData)); ThunkData->u1.AddressOfData = - (PIMAGE_IMPORT_BY_NAME)RVA(ImageBase, ThunkData->u1.AddressOfData); + (ULONG)RVA(ImageBase, ThunkData->u1.AddressOfData); //DbgPrint((DPRINT_WINDOWS, "WinLdrpBindImportName(): ThunkData->u1.AOD became %p\n", ThunkData->u1.AddressOfData)); } @@ -532,7 +532,7 @@ // NameTable, OrdinalTable, ExportDirectory->AddressOfNames, ExportDirectory->AddressOfNameOrdinals)); /* Get the hint, convert it to a physical pointer */ - Hint = ((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Hint; + Hint = ((PIMAGE_IMPORT_BY_NAME)VaToPa((PVOID)ThunkData->u1.AddressOfData))->Hint; //DbgPrint((DPRINT_WINDOWS, "HintIndex %d\n", Hint)); /* If Hint is less than total number of entries in the export directory, @@ -540,7 +540,7 @@ if ( (Hint < ExportDirectory->NumberOfNames) && ( - strcmp(VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Name[0]), + strcmp(VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa((PVOID)ThunkData->u1.AddressOfData))->Name[0]), (PCHAR)VaToPa( RVA(DllBase, NameTable[Hint])) ) == 0 ) ) @@ -566,7 +566,7 @@ Middle = (Low + High) >> 1; /* Compare the names */ - Result = strcmp(VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa(ThunkData->u1.AddressOfData))->Name[0]), + Result = strcmp(VaToPa(&((PIMAGE_IMPORT_BY_NAME)VaToPa((PVOID)ThunkData->u1.AddressOfData))->Name[0]), (PCHAR)VaToPa(RVA(DllBase, NameTable[Middle]))); /*DbgPrint((DPRINT_WINDOWS, "Binary search: comparing Import '__', Export '%s'\n",*/ @@ -622,11 +622,11 @@ FunctionTable = (PULONG)VaToPa(RVA(DllBase, ExportDirectory->AddressOfFunctions)); /* Save a pointer to the function */ - ThunkData->u1.Function = (PULONG)RVA(DllBase, FunctionTable[Ordinal]); + ThunkData->u1.Function = (ULONG)RVA(DllBase, FunctionTable[Ordinal]); /* Is it a forwarder? (function pointer isn't within the export directory) */ - if (((ULONG)VaToPa(ThunkData->u1.Function) > (ULONG)ExportDirectory) && - ((ULONG)VaToPa(ThunkData->u1.Function) < ((ULONG)ExportDirectory + ExportSize))) + if (((ULONG)VaToPa((PVOID)ThunkData->u1.Function) > (ULONG)ExportDirectory) && + ((ULONG)VaToPa((PVOID)ThunkData->u1.Function) < ((ULONG)ExportDirectory + ExportSize))) { PLDR_DATA_TABLE_ENTRY DataTableEntry; CHAR ForwardDllName[255]; @@ -634,7 +634,7 @@ ULONG RefExportSize; /* Save the name of the forward dll */ - RtlCopyMemory(ForwardDllName, (PCHAR)VaToPa(ThunkData->u1.Function), sizeof(ForwardDllName)); + RtlCopyMemory(ForwardDllName, (PCHAR)VaToPa((PVOID)ThunkData->u1.Function), sizeof(ForwardDllName)); /* Strip out its extension */ *strchr(ForwardDllName,'.') = '\0'; @@ -665,7 +665,7 @@ BOOLEAN Status; /* Get pointer to the import name */ - ImportName = strchr((PCHAR)VaToPa(ThunkData->u1.Function), '.') + 1; + ImportName = strchr((PCHAR)VaToPa((PVOID)ThunkData->u1.Function), '.') + 1; /* Create a IMAGE_IMPORT_BY_NAME structure, pointing to the local Buffer */ ImportByName = (PIMAGE_IMPORT_BY_NAME)Buffer; @@ -677,7 +677,7 @@ ImportByName->Hint = 0; /* And finally point ThunkData's AddressOfData to that structure */ - RefThunkData.u1.AddressOfData = ImportByName; + RefThunkData.u1.AddressOfData = (ULONG)ImportByName; /* And recursively call ourselves */ Status = WinLdrpBindImportName( @@ -797,7 +797,7 @@ return FALSE; /* Go through each entry in the thunk table and bind it */ - while (((PIMAGE_THUNK_DATA)VaToPa(ThunkData))->u1.AddressOfData != NULL) + while (((PIMAGE_THUNK_DATA)VaToPa(ThunkData))->u1.AddressOfData != 0) { /* Bind it */ Status = WinLdrpBindImportName(
17 years, 4 months
1
0
0
0
[weiden] 28285: CallWindowProc returns 0 if lpPrevWndFunc is NULL
by weiden@svn.reactos.org
Author: weiden Date: Sat Aug 11 15:55:17 2007 New Revision: 28285 URL:
http://svn.reactos.org/svn/reactos?rev=28285&view=rev
Log: CallWindowProc returns 0 if lpPrevWndFunc is NULL Modified: trunk/reactos/dll/win32/user32/windows/message.c Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c (original) +++ trunk/reactos/dll/win32/user32/windows/message.c Sat Aug 11 15:55:17 2007 @@ -1235,9 +1235,11 @@ { WNDPROC_INFO wpInfo; - /* FIXME - can the first parameter be NULL? */ if (lpPrevWndFunc == NULL) - lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, TRUE); + { + WARN("CallWindowProcA: lpPrevWndFunc == NULL!\n"); + return 0; + } if (!IsCallProcHandle(lpPrevWndFunc)) return IntCallWindowProcA(TRUE, lpPrevWndFunc, hWnd, Msg, wParam, lParam); @@ -1270,7 +1272,10 @@ /* FIXME - can the first parameter be NULL? */ if (lpPrevWndFunc == NULL) - lpPrevWndFunc = (WNDPROC)NtUserGetWindowLong(hWnd, GWLP_WNDPROC, FALSE); + { + WARN("CallWindowProcA: lpPrevWndFunc == NULL!\n"); + return 0; + } if (!IsCallProcHandle(lpPrevWndFunc)) return IntCallWindowProcW(FALSE, lpPrevWndFunc, hWnd, Msg, wParam, lParam);
17 years, 4 months
1
0
0
0
[greatlrd] 28284: update with some more dx test
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sat Aug 11 14:11:19 2007 New Revision: 28284 URL:
http://svn.reactos.org/svn/reactos?rev=28284&view=rev
Log: update with some more dx test Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/Nt…
============================================================================== --- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c (original) +++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdQueryDirectDrawObject.c Sat Aug 11 14:11:19 2007 @@ -22,6 +22,99 @@ INT Test_NtGdiDdQueryDirectDrawObject(PTESTINFO pti) { + HANDLE hDirectDraw = NULL; + DD_HALINFO *pHalInfo = NULL; + DWORD *pCallBackFlags = NULL; + LPD3DNTHAL_CALLBACKS puD3dCallbacks = NULL; + LPD3DNTHAL_GLOBALDRIVERDATA puD3dDriverData = NULL; + PDD_D3DBUFCALLBACKS puD3dBufferCallbacks = NULL; + LPDDSURFACEDESC puD3dTextureFormats = NULL; + DWORD *puNumHeaps = NULL; + VIDEOMEMORY *puvmList = NULL; + DWORD *puNumFourCC = NULL; + DWORD *puFourCC = NULL; - return APISTATUS_NORMAL; + DD_HALINFO HalInfo; + DWORD CallBackFlags[4]; + D3DNTHAL_CALLBACKS D3dCallbacks; + D3DNTHAL_GLOBALDRIVERDATA D3dDriverData; + DD_D3DBUFCALLBACKS D3dBufferCallbacks; + DDSURFACEDESC2 D3dTextureFormats[100]; + //DWORD NumHeaps = 0; + VIDEOMEMORY vmList; + //DWORD NumFourCC = 0; + //DWORD FourCC = 0; + + /* clear data */ + memset(&vmList,0,sizeof(VIDEOMEMORY)); + memset(&D3dTextureFormats,0,sizeof(DDSURFACEDESC)); + memset(&D3dBufferCallbacks,0,sizeof(DD_D3DBUFCALLBACKS)); + memset(&D3dDriverData,0,sizeof(D3DNTHAL_GLOBALDRIVERDATA)); + memset(&D3dCallbacks,0,sizeof(D3DNTHAL_CALLBACKS)); + memset(&HalInfo,0,sizeof(DD_HALINFO)); + memset(CallBackFlags,0,sizeof(DWORD)*3); + + HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); + ASSERT1(hdc != NULL); + + hDirectDraw = (HANDLE) Syscall(L"NtGdiDdCreateDirectDrawObject", 1, &hdc); + ASSERT1(hDirectDraw != NULL); + + /* Test ReactX */ + hDirectDraw = (HANDLE) Syscall(L"NtGdiDdCreateDirectDrawObject", 1, &hdc); + + RTEST(NtGdiDdQueryDirectDrawObject( NULL, pHalInfo, + pCallBackFlags, puD3dCallbacks, + puD3dDriverData, puD3dBufferCallbacks, + puD3dTextureFormats, puNumHeaps, + puvmList, puNumFourCC, + puFourCC) == FALSE); + + RTEST(pHalInfo == NULL); + RTEST(pCallBackFlags == NULL); + RTEST(puD3dCallbacks == NULL); + RTEST(puD3dDriverData == NULL); + RTEST(puD3dBufferCallbacks == NULL); + RTEST(puD3dTextureFormats == NULL); + RTEST(puNumFourCC == NULL); + RTEST(puFourCC == NULL); + + RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, + pCallBackFlags, puD3dCallbacks, + puD3dDriverData, puD3dBufferCallbacks, + puD3dTextureFormats, puNumHeaps, + puvmList, puNumFourCC, + puFourCC) == FALSE); + + RTEST(pHalInfo == NULL); + RTEST(pCallBackFlags == NULL); + RTEST(puD3dCallbacks == NULL); + RTEST(puD3dDriverData == NULL); + RTEST(puD3dBufferCallbacks == NULL); + RTEST(puD3dTextureFormats == NULL); + RTEST(puNumFourCC == NULL); + RTEST(puFourCC == NULL); + + pHalInfo = &HalInfo; + RTEST(NtGdiDdQueryDirectDrawObject( hDirectDraw, pHalInfo, + pCallBackFlags, puD3dCallbacks, + puD3dDriverData, puD3dBufferCallbacks, + puD3dTextureFormats, puNumHeaps, + puvmList, puNumFourCC, + puFourCC)== FALSE); + RTEST(pHalInfo != NULL); + RTEST(pCallBackFlags == NULL); + RTEST(puD3dCallbacks == NULL); + RTEST(puD3dDriverData == NULL); + RTEST(puD3dBufferCallbacks == NULL); + RTEST(puD3dTextureFormats == NULL); + RTEST(puNumFourCC == NULL); + RTEST(puFourCC == NULL); + ASSERT1(pHalInfo != NULL); + + /* Cleanup ReactX setup */ + DeleteDC(hdc); + Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw); + + return APISTATUS_NORMAL; }
17 years, 4 months
1
0
0
0
[fireball] 28283: - Merge 26302 (Freeldr's own DEBUG -> ROS's global DBG)
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 13:55:12 2007 New Revision: 28283 URL:
http://svn.reactos.org/svn/reactos?rev=28283&view=rev
Log: - Merge 26302 (Freeldr's own DEBUG -> ROS's global DBG) Modified: branches/winldr/arch/i386/i386disk.c branches/winldr/arch/i386/i386vid.c branches/winldr/comm/rs232.c branches/winldr/debug.c branches/winldr/disk/partition.c branches/winldr/freeldr_arch.rbuild branches/winldr/freeldr_base.rbuild branches/winldr/freeldr_base64k.rbuild branches/winldr/freeldr_startup.rbuild branches/winldr/fs/fat.c branches/winldr/fs/fs.c branches/winldr/fs/ntfs.c branches/winldr/include/debug.h branches/winldr/include/freeldr.h branches/winldr/include/mm.h branches/winldr/inifile/inifile.c branches/winldr/mm/meminit.c branches/winldr/mm/mm.c branches/winldr/windows/wlmemory.c Modified: branches/winldr/arch/i386/i386disk.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/i386disk.c?rev…
============================================================================== --- branches/winldr/arch/i386/i386disk.c (original) +++ branches/winldr/arch/i386/i386disk.c Sat Aug 11 13:55:12 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: branches/winldr/arch/i386/i386vid.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/i386vid.c?rev=…
============================================================================== --- branches/winldr/arch/i386/i386vid.c (original) +++ branches/winldr/arch/i386/i386vid.c Sat Aug 11 13:55:12 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: branches/winldr/comm/rs232.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/comm/rs232.c?rev=28283&r…
============================================================================== --- branches/winldr/comm/rs232.c (original) +++ branches/winldr/comm/rs232.c Sat Aug 11 13:55:12 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: branches/winldr/debug.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/debug.c?rev=28283&r1=282…
============================================================================== --- branches/winldr/debug.c (original) +++ branches/winldr/debug.c Sat Aug 11 13:55:12 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: branches/winldr/disk/partition.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/disk/partition.c?rev=282…
============================================================================== --- branches/winldr/disk/partition.c (original) +++ branches/winldr/disk/partition.c Sat Aug 11 13:55:12 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: branches/winldr/freeldr_arch.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr_arch.rbuild?rev=…
============================================================================== --- branches/winldr/freeldr_arch.rbuild (original) +++ branches/winldr/freeldr_arch.rbuild Sat Aug 11 13:55:12 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_" /> <define name="_NTSYSTEM_" /> <compilerflag>-ffreestanding</compilerflag> @@ -53,9 +50,6 @@ <include base="freeldr_base">cache</include> <include base="ntoskrnl">include</include> <define name="__USE_W32API" /> -<!-- - <define name="DEBUG" /> ---> <define name="_NTHAL_" /> <define name="_NTSYSTEM_" /> <compilerflag>-ffreestanding</compilerflag> @@ -69,4 +63,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: branches/winldr/freeldr_base.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr_base.rbuild?rev=…
============================================================================== --- branches/winldr/freeldr_base.rbuild (original) +++ branches/winldr/freeldr_base.rbuild Sat Aug 11 13:55:12 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: branches/winldr/freeldr_base64k.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr_base64k.rbuild?r…
============================================================================== --- branches/winldr/freeldr_base64k.rbuild (original) +++ branches/winldr/freeldr_base64k.rbuild Sat Aug 11 13:55:12 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_" /> <define name="_NTSYSTEM_" /> <compilerflag>-ffreestanding</compilerflag> Modified: branches/winldr/freeldr_startup.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/winldr/freeldr_startup.rbuild?r…
============================================================================== --- branches/winldr/freeldr_startup.rbuild (original) +++ branches/winldr/freeldr_startup.rbuild Sat Aug 11 13:55:12 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: branches/winldr/fs/fat.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/fat.c?rev=28283&r1=28…
============================================================================== --- branches/winldr/fs/fat.c (original) +++ branches/winldr/fs/fat.c Sat Aug 11 13:55:12 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: branches/winldr/fs/fs.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/fs.c?rev=28283&r1=282…
============================================================================== --- branches/winldr/fs/fs.c (original) +++ branches/winldr/fs/fs.c Sat Aug 11 13:55:12 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: branches/winldr/fs/ntfs.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/fs/ntfs.c?rev=28283&r1=2…
============================================================================== --- branches/winldr/fs/ntfs.c (original) +++ branches/winldr/fs/ntfs.c Sat Aug 11 13:55:12 2007 @@ -415,7 +415,7 @@ return NtfsFixupRecord((PNTFS_RECORD)Buffer); } -#ifdef DEBUG +#ifdef DBG VOID NtfsPrintFile(PNTFS_INDEX_ENTRY IndexEntry) { PWCHAR FileName; @@ -443,7 +443,7 @@ EntryFileName = IndexEntry->FileName.FileName; EntryFileNameLength = IndexEntry->FileName.FileNameLength; -#ifdef DEBUG +#ifdef DBG NtfsPrintFile(IndexEntry); #endif Modified: branches/winldr/include/debug.h URL:
http://svn.reactos.org/svn/reactos/branches/winldr/include/debug.h?rev=2828…
============================================================================== --- branches/winldr/include/debug.h (original) +++ branches/winldr/include/debug.h Sat Aug 11 13:55:12 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: branches/winldr/include/freeldr.h URL:
http://svn.reactos.org/svn/reactos/branches/winldr/include/freeldr.h?rev=28…
============================================================================== --- branches/winldr/include/freeldr.h (original) +++ branches/winldr/include/freeldr.h Sat Aug 11 13:55:12 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: branches/winldr/include/mm.h URL:
http://svn.reactos.org/svn/reactos/branches/winldr/include/mm.h?rev=28283&r…
============================================================================== --- branches/winldr/include/mm.h (original) +++ branches/winldr/include/mm.h Sat Aug 11 13:55:12 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,12 +46,11 @@ #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 { @@ -73,7 +72,7 @@ extern ULONG FreePagesInLookupTable; extern ULONG LastFreePageHint; -#ifdef DEBUG +#ifdef DBG PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type); #endif Modified: branches/winldr/inifile/inifile.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/inifile/inifile.c?rev=28…
============================================================================== --- branches/winldr/inifile/inifile.c (original) +++ branches/winldr/inifile/inifile.c Sat Aug 11 13:55:12 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: branches/winldr/mm/meminit.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/mm/meminit.c?rev=28283&r…
============================================================================== --- branches/winldr/mm/meminit.c (original) +++ branches/winldr/mm/meminit.c Sat Aug 11 13:55:12 2007 @@ -23,7 +23,7 @@ #define NDEBUG #include <debug.h> -#ifdef DEBUG +#ifdef DBG typedef struct { ULONG Type; @@ -50,7 +50,7 @@ { BIOS_MEMORY_MAP BiosMemoryMap[32]; ULONG BiosMemoryMapEntryCount; -#ifdef DEBUG +#ifdef DBG ULONG Index; #endif @@ -60,7 +60,7 @@ 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 @@ return TRUE; } -#ifdef DEBUG +#ifdef DBG PUCHAR MmGetSystemMemoryMapTypeString(ULONG Type) { ULONG Index; Modified: branches/winldr/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/mm/mm.c?rev=28283&r1=282…
============================================================================== --- branches/winldr/mm/mm.c (original) +++ branches/winldr/mm/mm.c Sat Aug 11 13:55:12 2007 @@ -23,7 +23,7 @@ #define NDEBUG #include <debug.h> -#ifdef DEBUG +#ifdef DBG ULONG AllocationCount = 0; VOID VerifyHeap(VOID); @@ -31,7 +31,7 @@ VOID IncrementAllocationCount(VOID); VOID DecrementAllocationCount(VOID); VOID MemAllocTest(VOID); -#endif // DEBUG +#endif // DBG /* * Hack alert @@ -115,12 +115,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; @@ -181,12 +181,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; @@ -236,12 +236,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; @@ -254,21 +254,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))) { @@ -305,14 +305,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; @@ -488,7 +488,7 @@ printf("MemPtr5: 0x%x\n", (int)MemPtr5); MachConsGetCh(); } -#endif // DEBUG +#endif // DBG ULONG GetSystemMemorySize(VOID) { Modified: branches/winldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/windows/wlmemory.c?rev=2…
============================================================================== --- branches/winldr/windows/wlmemory.c (original) +++ branches/winldr/windows/wlmemory.c Sat Aug 11 13:55:12 2007 @@ -547,7 +547,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; @@ -566,7 +566,7 @@ DbgPrint((DPRINT_WINDOWS, "\n")); } } - #endif +#endif // Enable paging
17 years, 4 months
1
0
0
0
[fireball] 28282: Merge part of 26117 (typo fix), 26194
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 13:41:06 2007 New Revision: 28282 URL:
http://svn.reactos.org/svn/reactos?rev=28282&view=rev
Log: Merge part of 26117 (typo fix), 26194 Modified: branches/winldr/arch/i386/hardware.c branches/winldr/include/video.h Modified: branches/winldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/hardware.c?rev…
============================================================================== --- branches/winldr/arch/i386/hardware.c (original) +++ branches/winldr/arch/i386/hardware.c Sat Aug 11 13:41:06 2007 @@ -991,8 +991,8 @@ PartialDescriptor->Type = CmResourceTypeInterrupt; PartialDescriptor->ShareDisposition = CmResourceShareUndetermined; PartialDescriptor->Flags = CM_RESOURCE_INTERRUPT_LATCHED; - PartialDescriptor->u.Interrupt.Level = 0; - PartialDescriptor->u.Interrupt.Vector = 6; + PartialDescriptor->u.Interrupt.Level = 6; + PartialDescriptor->u.Interrupt.Vector = 0; PartialDescriptor->u.Interrupt.Affinity = 0xFFFFFFFF; /* Set DMA channel */ Modified: branches/winldr/include/video.h URL:
http://svn.reactos.org/svn/reactos/branches/winldr/include/video.h?rev=2828…
============================================================================== --- branches/winldr/include/video.h (original) +++ branches/winldr/include/video.h Sat Aug 11 13:41:06 2007 @@ -29,7 +29,7 @@ extern PVOID VideoOffScreenBuffer; -USHORT BiosIsVesaSupported(VOID); // Implemented in i386vid.S, returns the VESA version +USHORT BiosIsVesaSupported(VOID); // Implemented in i386vid.c, returns the VESA version PVOID VideoAllocateOffScreenBuffer(VOID); // Returns a pointer to an off-screen buffer sufficient for the current video mode
17 years, 4 months
1
0
0
0
[fireball] 28281: Merge Revision: 25803 Author: dgorbachev Message: - fix "keyboard does not respond" bug on Biostar board (thanks to Peter Krawies) - fix printf()
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 13:22:22 2007 New Revision: 28281 URL:
http://svn.reactos.org/svn/reactos?rev=28281&view=rev
Log: Merge Revision: 25803 Author: dgorbachev Message: - fix "keyboard does not respond" bug on Biostar board (thanks to Peter Krawies) - fix printf() Modified: branches/winldr/arch/i386/hardware.c branches/winldr/ui/tui.c Modified: branches/winldr/arch/i386/hardware.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/arch/i386/hardware.c?rev…
============================================================================== --- branches/winldr/arch/i386/hardware.c (original) +++ branches/winldr/arch/i386/hardware.c Sat Aug 11 13:22:22 2007 @@ -1675,18 +1675,27 @@ { UCHAR Status; UCHAR Scancode; - + ULONG Loops; + BOOLEAN Result = TRUE; + + /* Identify device */ WRITE_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA, 0xF2); + /* Wait for reply */ + for (Loops = 0; Loops < 100; Loops++) + { StallExecutionProcessor(10000); - Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); - if ((Status & 0x01) != 0x01) + if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) != 0) + break; + } + + if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0) { /* PC/XT keyboard or no keyboard */ DPRINT1("PC/XT keyboard or no keyboard found\n"); - return FALSE; + Result = FALSE; } Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); @@ -1694,32 +1703,37 @@ { /* No ACK received */ DPRINT1("No ACK received\n"); - return FALSE; + Result = FALSE; + } StallExecutionProcessor(10000); + Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); - if ((Status & 0x01) != 0x01) + if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0) { /* Found AT keyboard */ - return TRUE; + return Result; } Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); if (Scancode != 0xAB) { /* No 0xAB received */ + Result = FALSE; DPRINT1("No 0xAB received\n"); - return FALSE; + } StallExecutionProcessor(10000); + Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); - if ((Status & 0x01) != 0x01) + if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0) { /* No byte in buffer */ DPRINT1("No byte in buffer\n"); - return FALSE; + Result = FALSE; + } Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); @@ -1727,12 +1741,12 @@ { /* No 0x41 received */ DPRINT1("No 0x41 received\n"); - return FALSE; + Result = FALSE; } /* Found MF-II keyboard */ DPRINT1("Found MF-II keyboard\n"); - return TRUE; + return Result; } static USHORT @@ -1910,7 +1924,6 @@ DetectPS2AuxPort(VOID) { ULONG Loops; - UCHAR Scancode; UCHAR Status; /* Put the value 0x5A in the output buffer using the @@ -1931,22 +1944,15 @@ for (Loops = 0; Loops < 10; Loops++) { + StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); - if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) != 0) - { - Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); - if ((Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL) != 0) - { - return TRUE; - } break; } - StallExecutionProcessor(10000); - } - - return FALSE; + READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); + + return (Status & CONTROLLER_STATUS_MOUSE_OUTPUT_BUFFER_FULL); } @@ -1968,7 +1974,7 @@ 0xF2); /* Wait for reply */ - for (Loops = 0; Loops < 10; Loops++) + for (Loops = 0; Loops < 100; Loops++) { StallExecutionProcessor(10000); Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); @@ -1993,15 +1999,6 @@ Scancode = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_DATA); if (Scancode != 0x00) Result = FALSE; - - /* Flush output buffer */ - for (Loops = 0; Loops < 10; Loops++) - { - Status = READ_PORT_UCHAR((PUCHAR)CONTROLLER_REGISTER_STATUS); - if ((Status & CONTROLLER_STATUS_OUTPUT_BUFFER_FULL) == 0) - break; - StallExecutionProcessor(10000); - } return Result; } Modified: branches/winldr/ui/tui.c URL:
http://svn.reactos.org/svn/reactos/branches/winldr/ui/tui.c?rev=28281&r1=28…
============================================================================== --- branches/winldr/ui/tui.c (original) +++ branches/winldr/ui/tui.c Sat Aug 11 13:22:22 2007 @@ -45,9 +45,9 @@ { case 'd': case 'u': case 'x': if (c == 'x') - *_itoa(va_arg(ap, unsigned long), str, 16) = 0; + _itoa(va_arg(ap, unsigned long), str, 16); else - *_itoa(va_arg(ap, unsigned long), str, 10) = 0; + _itoa(va_arg(ap, unsigned long), str, 10); ptr = str;
17 years, 4 months
1
0
0
0
[fireball] 28280: - Minor code changes, plus a temporary (DPRINT1) change for the HandleCount != 0 problem.
by fireball@svn.reactos.org
Author: fireball Date: Sat Aug 11 13:04:17 2007 New Revision: 28280 URL:
http://svn.reactos.org/svn/reactos?rev=28280&view=rev
Log: - Minor code changes, plus a temporary (DPRINT1) change for the HandleCount != 0 problem. Modified: trunk/reactos/ntoskrnl/ob/obhandle.c Modified: trunk/reactos/ntoskrnl/ob/obhandle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/obhandle.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ob/obhandle.c (original) +++ trunk/reactos/ntoskrnl/ob/obhandle.c Sat Aug 11 13:04:17 2007 @@ -1259,6 +1259,12 @@ ObjectHeader->HandleCount, ObjectHeader->PointerCount); + /* Save the object header */ + NewEntry.Object = ObjectHeader; + + /* Mask out the internal attributes */ + NewEntry.ObAttributes |= HandleAttributes & OBJ_HANDLE_ATTRIBUTES; + /* Check if this is a kernel handle */ if (HandleAttributes & OBJ_KERNEL_HANDLE) { @@ -1295,12 +1301,6 @@ if (AttachedToProcess) KeUnstackDetachProcess(&ApcState); return Status; } - - /* Save the object header */ - NewEntry.Object = ObjectHeader; - - /* Mask out the internal attributes */ - NewEntry.ObAttributes |= HandleAttributes & OBJ_HANDLE_ATTRIBUTES; /* Remove what's not in the valid access mask */ GrantedAccess = DesiredAccess & (ObjectType->TypeInfo.ValidAccessMask | @@ -1503,11 +1503,11 @@ if (AccessState->GenerateOnClose) { /* Force the attribute on */ - HandleAttributes|= OBJ_AUDIT_OBJECT_CLOSE; + HandleAttributes |= OBJ_AUDIT_OBJECT_CLOSE; } /* Mask out the internal attributes */ - NewEntry.ObAttributes |= HandleAttributes & OBJ_HANDLE_ATTRIBUTES; + NewEntry.ObAttributes |= (HandleAttributes & OBJ_HANDLE_ATTRIBUTES); /* Get the original desired access */ DesiredAccess = AccessState->RemainingDesiredAccess | @@ -2031,7 +2031,12 @@ ExSweepHandleTable(HandleTable, ObpCloseHandleCallback, &Context); - ASSERT(HandleTable->HandleCount == 0); + //ASSERT(HandleTable->HandleCount == 0); + /* HACK: Until the problem is investigated... */ + if (HandleTable->HandleCount != 0) + { + DPRINT1("Leaking %d handles!\n", HandleTable->HandleCount); + } /* Leave the critical region */ KeLeaveCriticalRegion(); @@ -2197,7 +2202,7 @@ /* Fill out the entry */ RtlZeroMemory(&NewHandleEntry, sizeof(HANDLE_TABLE_ENTRY)); NewHandleEntry.Object = ObjectHeader; - NewHandleEntry.ObAttributes |= HandleAttributes & OBJ_HANDLE_ATTRIBUTES; + NewHandleEntry.ObAttributes |= (HandleAttributes & OBJ_HANDLE_ATTRIBUTES); /* Check if we're using a generic mask */ if (DesiredAccess & GENERIC_ACCESS)
17 years, 4 months
1
0
0
0
[greatlrd] 28279: Adding dx test from my win32kdxtest to win32knapi test. win32kdxtest are more like a analysis tools to examine some struct and dumping it, win32knapi is true test tools
by greatlrd@svn.reactos.org
Author: greatlrd Date: Sat Aug 11 12:52:38 2007 New Revision: 28279 URL:
http://svn.reactos.org/svn/reactos?rev=28279&view=rev
Log: Adding dx test from my win32kdxtest to win32knapi test. win32kdxtest are more like a analysis tools to examine some struct and dumping it, win32knapi is true test tools Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c trunk/rostests/apitests/w32knapi/testlist.c trunk/rostests/apitests/w32knapi/w32knapi.c Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/Nt…
============================================================================== --- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c (original) +++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdCreateDirectDrawObject.c Sat Aug 11 12:52:38 2007 @@ -1,4 +1,5 @@ #include "../w32knapi.h" + W32KAPI HANDLE @@ -13,14 +14,17 @@ INT Test_NtGdiDdCreateDirectDrawObject(PTESTINFO pti) { - HDC hdc = CreateDCW(L"Display",NULL,NULL,NULL); + HANDLE hDirectDraw; + HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); ASSERT1(hdc != NULL); + /* Test ReactX */ RTEST(NtGdiDdCreateDirectDrawObject(NULL) == NULL); + RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL); - TEST(NtGdiDdCreateDirectDrawObject(hdc) != NULL); - + /* Cleanup ReactX setup */ DeleteDC(hdc); + Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw); return APISTATUS_NORMAL; } Modified: trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/ntdd/Nt…
============================================================================== --- trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c (original) +++ trunk/rostests/apitests/w32knapi/ntdd/NtGdiDdDeleteDirectDrawObject.c Sat Aug 11 12:52:38 2007 @@ -13,7 +13,19 @@ INT Test_NtGdiDdDeleteDirectDrawObject(PTESTINFO pti) { - TEST(NtGdiDdDeleteDirectDrawObject(NULL) == 0); + HANDLE hDirectDraw; + HDC hdc = CreateDCW(L"DISPLAY",NULL,NULL,NULL); + ASSERT1(hdc != NULL); + + /* Test ReactX */ + RTEST(NtGdiDdDeleteDirectDrawObject(NULL) == FALSE); + RTEST((hDirectDraw=NtGdiDdCreateDirectDrawObject(hdc)) != NULL); + ASSERT1(hDirectDraw != NULL); + RTEST(NtGdiDdDeleteDirectDrawObject(hDirectDraw) == TRUE); + + /* Cleanup ReactX setup */ + DeleteDC(hdc); + Syscall(L"NtGdiDdDeleteDirectDrawObject", 1, &hDirectDraw); return APISTATUS_NORMAL; } Modified: trunk/rostests/apitests/w32knapi/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/testlis…
============================================================================== --- trunk/rostests/apitests/w32knapi/testlist.c (original) +++ trunk/rostests/apitests/w32knapi/testlist.c Sat Aug 11 12:52:38 2007 @@ -20,8 +20,9 @@ { /* DirectDraw */ { L"NtGdiDdCreateDirectDrawObject", Test_NtGdiDdCreateDirectDrawObject }, + { L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject }, { L"NtGdiDdDeleteDirectDrawObject", Test_NtGdiDdDeleteDirectDrawObject }, - { L"NtGdiDdQueryDirectDrawObject", Test_NtGdiDdQueryDirectDrawObject }, + /* ntgdi */ { L"NtGdiArcInternal", Test_NtGdiArcInternal }, Modified: trunk/rostests/apitests/w32knapi/w32knapi.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/w32knapi/w32knap…
============================================================================== --- trunk/rostests/apitests/w32knapi/w32knapi.c (original) +++ trunk/rostests/apitests/w32knapi/w32knapi.c Sat Aug 11 12:52:38 2007 @@ -153,7 +153,7 @@ printf("Win32k native API test\n"); /* Convert to gui thread */ - IsGUIThread(TRUE); + // IsGUIThread(TRUE); <- does not exists on win2k if (!InitOsVersion()) {
17 years, 4 months
1
0
0
0
← Newer
1
...
42
43
44
45
46
47
48
...
67
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
Results per page:
10
25
50
100
200