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
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
October 2006
----- 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
17 participants
357 discussions
Start a n
N
ew thread
[cwittich] 24403: -don't use GetLastError with Reg* functions -remove @16 from def file (msvc doesn't like it)
by cwittich@svn.reactos.org
Author: cwittich Date: Thu Oct 5 01:47:08 2006 New Revision: 24403 URL:
http://svn.reactos.org/svn/reactos?rev=24403&view=rev
Log: -don't use GetLastError with Reg* functions -remove @16 from def file (msvc doesn't like it) Modified: trunk/reactos/dll/cpl/timedate/internettime.c trunk/reactos/dll/cpl/timedate/timedate.def Modified: trunk/reactos/dll/cpl/timedate/internettime.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/internett…
============================================================================== --- trunk/reactos/dll/cpl/timedate/internettime.c (original) +++ trunk/reactos/dll/cpl/timedate/internettime.c Thu Oct 5 01:47:08 2006 @@ -335,40 +335,31 @@ { HKEY hKey; HWND hCheck; - LONG Ret; WCHAR Data[8]; DWORD Size; - Ret = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + if (RegOpenKeyExW(HKEY_LOCAL_MACHINE, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\DateTime\\Parameters", 0, KEY_QUERY_VALUE, - &hKey); - if (Ret != ERROR_SUCCESS) - { - DisplayWin32Error(Ret); - return; - } - - Size = sizeof(Data); - Ret = RegQueryValueExW(hKey, + &hKey) == ERROR_SUCCESS) + { + Size = sizeof(Data); + if (RegQueryValueExW(hKey, L"Type", NULL, NULL, (LPBYTE)Data, - &Size); - if (Ret != ERROR_SUCCESS) - { - DisplayWin32Error(Ret); - } - - if (lstrcmp(Data, L"NTP") == 0) - { - hCheck = GetDlgItem(hwnd, IDC_AUTOSYNC); - SendMessageW(hCheck, BM_SETCHECK, 0, 0); - } - - RegCloseKey(hKey); + &Size) == ERROR_SUCCESS) + { + if (lstrcmp(Data, L"NTP") == 0) + { + hCheck = GetDlgItem(hwnd, IDC_AUTOSYNC); + SendMessageW(hCheck, BM_SETCHECK, 0, 0); + } + } + RegCloseKey(hKey); + } } Modified: trunk/reactos/dll/cpl/timedate/timedate.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/cpl/timedate/timedate.…
============================================================================== --- trunk/reactos/dll/cpl/timedate/timedate.def (original) +++ trunk/reactos/dll/cpl/timedate/timedate.def Thu Oct 5 01:47:08 2006 @@ -1,6 +1,6 @@ LIBRARY timedate.cpl EXPORTS -CPlApplet@16 +CPlApplet ; EOF
18 years, 1 month
1
0
0
0
[fireball] 24402: - Fix warning in winldr.c - Implement WinLdrAllocateDataTableEntry() used for allocating and initializing the DTE - Implement WinLdrLoadImage(), which uses LdrRelocateImageWithBias() from RTL, calling it with loader name "FLx86" (RTL should treat it differently -- ROS/WinLdr-specific behavior)
by fireball@svn.reactos.org
Author: fireball Date: Thu Oct 5 01:36:56 2006 New Revision: 24402 URL:
http://svn.reactos.org/svn/reactos?rev=24402&view=rev
Log: - Fix warning in winldr.c - Implement WinLdrAllocateDataTableEntry() used for allocating and initializing the DTE - Implement WinLdrLoadImage(), which uses LdrRelocateImageWithBias() from RTL, calling it with loader name "FLx86" (RTL should treat it differently -- ROS/WinLdr-specific behavior) Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/peloader.c (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/peloader.c Thu Oct 5 01:36:56 2006 @@ -36,7 +36,74 @@ IN PVOID BasePA, OUT PLDR_DATA_TABLE_ENTRY *NewEntry) { - return FALSE; + PVOID BaseVA = PaToVa(BasePA); + PWSTR Buffer; + PLDR_DATA_TABLE_ENTRY DataTableEntry; + PIMAGE_NT_HEADERS NtHeaders; + USHORT Length; + + /* Allocate memory for a data table entry, zero-initialize it */ + DataTableEntry = (PLDR_DATA_TABLE_ENTRY)MmAllocateMemory(sizeof(LDR_DATA_TABLE_ENTRY)); + if (DataTableEntry == NULL) + return FALSE; + RtlZeroMemory(DataTableEntry, sizeof(LDR_DATA_TABLE_ENTRY)); + + /* Get NT headers from the image */ + NtHeaders = RtlImageNtHeader(BasePA); + + /* Initialize corresponding fields of DTE based on NT headers value */ + DataTableEntry->DllBase = BaseVA; + DataTableEntry->SizeOfImage = NtHeaders->OptionalHeader.SizeOfImage; + DataTableEntry->EntryPoint = (PVOID)((ULONG)BaseVA + + NtHeaders->OptionalHeader.AddressOfEntryPoint); + DataTableEntry->SectionPointer = 0; + DataTableEntry->CheckSum = NtHeaders->OptionalHeader.CheckSum; + + /* Initialize BaseDllName field (UNICODE_STRING) from the Ansi BaseDllName + by simple conversion - copying each character */ + Length = (USHORT)(strlen(BaseDllName) * sizeof(WCHAR)); + Buffer = (PWSTR)MmAllocateMemory(Length); + if (Buffer == NULL) + return FALSE; + RtlZeroMemory(Buffer, Length); + + DataTableEntry->BaseDllName.Length = Length; + DataTableEntry->BaseDllName.MaximumLength = Length; + DataTableEntry->BaseDllName.Buffer = PaToVa(Buffer); + while (*BaseDllName != 0) + { + *Buffer++ = *BaseDllName++; + } + + /* Initialize FullDllName field (UNICODE_STRING) from the Ansi FullDllName + using the same method */ + Length = (USHORT)(strlen(FullDllName) * sizeof(WCHAR)); + Buffer = (PWSTR)MmAllocateMemory(Length); + if (Buffer == NULL) + return FALSE; + RtlZeroMemory(Buffer, Length); + + DataTableEntry->FullDllName.Length = Length; + DataTableEntry->FullDllName.MaximumLength = Length; + DataTableEntry->FullDllName.Buffer = PaToVa(Buffer); + while (*FullDllName != 0) + { + *Buffer++ = *FullDllName++; + } + + /* Initialize what's left - LoadCount which is 1, and set Flags so that + we know this entry is processed */ + DataTableEntry->Flags = LDRP_ENTRY_PROCESSED; + DataTableEntry->LoadCount = 1; + + /* Insert this DTE to a list in the LPB */ + InsertTailList(&WinLdrBlock->LoadOrderListHead, &DataTableEntry->InLoadOrderLinks); + + /* Save pointer to a newly allocated and initialized entry */ + *NewEntry = DataTableEntry; + + /* Return success */ + return TRUE; } /* WinLdrLoadImage loads the specified image from the file (it doesn't @@ -49,7 +116,176 @@ WinLdrLoadImage(IN PCHAR FileName, OUT PVOID *ImageBasePA) { - return FALSE; + PFILE FileHandle; + PVOID PhysicalBase; + PVOID VirtualBase = NULL; + UCHAR HeadersBuffer[SECTOR_SIZE * 2]; + PIMAGE_NT_HEADERS NtHeaders; + PIMAGE_SECTION_HEADER SectionHeader; + ULONG VirtualSize, SizeOfRawData, NumberOfSections; + BOOLEAN Status; + ULONG i, BytesRead; + + //Print(L"Loading %s... ", FileName); + + /* Open the image file */ + FileHandle = FsOpenFile(FileName); + + if (FileHandle == NULL) + { + //Print(L"Can not open the file %s\n",FileName); + UiMessageBox("Can not open the file"); + return FALSE; + } + + /* Load the first 2 sectors of the image so we can read the PE header */ + Status = FsReadFile(FileHandle, SECTOR_SIZE * 2, NULL, HeadersBuffer); + if (!Status) + { + //Print(L"Error reading from file %s\n", FileName); + UiMessageBox("Error reading from file"); + FsCloseFile(FileHandle); + return FALSE; + } + + /* Now read the MZ header to get the offset to the PE Header */ + NtHeaders = RtlImageNtHeader(HeadersBuffer); + + if (!NtHeaders) + { + //Print(L"Error - no NT header found in %s\n", FileName); + UiMessageBox("Error - no NT header found"); + FsCloseFile(FileHandle); + return FALSE; + } + + /* Ensure this is executable image */ + if (((NtHeaders->FileHeader.Characteristics & IMAGE_FILE_EXECUTABLE_IMAGE) == 0)) + { + //Print(L"Not an executable image %s\n", FileName); + UiMessageBox("Not an executable image"); + FsCloseFile(FileHandle); + return FALSE; + } + + /* Store number of sections to read and a pointer to the first section */ + NumberOfSections = NtHeaders->FileHeader.NumberOfSections; + SectionHeader = IMAGE_FIRST_SECTION(NtHeaders); + + /* Try to allocate this memory, if fails - allocate somewhere else */ + PhysicalBase = MmAllocateMemoryAtAddress(NtHeaders->OptionalHeader.SizeOfImage, + (PVOID)NtHeaders->OptionalHeader.ImageBase); + + if (PhysicalBase == NULL) + { + /* It's ok, we don't panic - let's allocate again at any other "low" place */ + MmChangeAllocationPolicy(FALSE); + PhysicalBase = MmAllocateMemory(NtHeaders->OptionalHeader.SizeOfImage); + MmChangeAllocationPolicy(TRUE); + + if (PhysicalBase == NULL) + { + //Print(L"Failed to alloc pages for image %s\n", FileName); + UiMessageBox("Failed to alloc pages for image"); + FsCloseFile(FileHandle); + return FALSE; + } + } + + /* This is the real image base - in form of a virtual address */ + VirtualBase = PaToVa(PhysicalBase); + + DbgPrint((DPRINT_WINDOWS, "Base PA: 0x%X, VA: 0x%X\n", PhysicalBase, VirtualBase)); + + /* Set to 0 position and fully load the file image */ + FsSetFilePointer(FileHandle, 0); + + Status = FsReadFile(FileHandle, NtHeaders->OptionalHeader.SizeOfHeaders, NULL, PhysicalBase); + + if (!Status) + { + //Print(L"Error reading headers %s\n", FileName); + UiMessageBox("Error reading headers"); + FsCloseFile(FileHandle); + return FALSE; + } + + /* Reload the NT Header */ + NtHeaders = RtlImageNtHeader(PhysicalBase); + + /* Load the first section */ + SectionHeader = IMAGE_FIRST_SECTION(NtHeaders); + + /* Fill output parameters */ + *ImageBasePA = PhysicalBase; + + /* Walk through each section and read it (check/fix any possible + bad situations, if they arise) */ + for (i = 0; i < NumberOfSections; i++) + { + VirtualSize = SectionHeader->Misc.VirtualSize; + SizeOfRawData = SectionHeader->SizeOfRawData; + + /* Handle a case when VirtualSize equals 0 */ + if (VirtualSize == 0) + VirtualSize = SizeOfRawData; + + /* If PointerToRawData is 0, then force its size to be also 0 */ + if (SectionHeader->PointerToRawData == 0) + { + SizeOfRawData = 0; + } + else + { + /* Cut the loaded size to the VirtualSize extents */ + if (SizeOfRawData > VirtualSize) + SizeOfRawData = VirtualSize; + } + + /* Actually read the section (if its size is not 0) */ + if (SizeOfRawData != 0) + { + /* Seek to the correct position */ + FsSetFilePointer(FileHandle, SectionHeader->PointerToRawData); + + DbgPrint((DPRINT_WINDOWS, "SH->VA: 0x%X\n", SectionHeader->VirtualAddress)); + + /* Read this section from the file, size = SizeOfRawData */ + Status = FsReadFile(FileHandle, SizeOfRawData, &BytesRead, (PUCHAR)PhysicalBase + SectionHeader->VirtualAddress); + + if (!Status && (BytesRead == 0)) + break; + } + + /* Size of data is less than the virtual size - fill up the remainder with zeroes */ + if (SizeOfRawData < VirtualSize) + RtlZeroMemory((PVOID)(SectionHeader->VirtualAddress + (ULONG)PhysicalBase + SizeOfRawData), VirtualSize - SizeOfRawData); + + SectionHeader++; + } + + /* We are done with the file - close it */ + FsCloseFile(FileHandle); + + /* If loading failed - return right now */ + if (!Status) + return FALSE; + + + /* Relocate the image, if it needs it */ + if (NtHeaders->OptionalHeader.ImageBase != (ULONG)VirtualBase) + { + DbgPrint((DPRINT_WINDOWS, "Relocating %p -> %p\n", + NtHeaders->OptionalHeader.ImageBase, VirtualBase)); + Status = (BOOLEAN)LdrRelocateImageWithBias(PhysicalBase, + 0, + "FLx86", + TRUE, + 3, + FALSE); + } + + return Status; } /* PRIVATE FUNCTIONS *******************************************************/ Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Thu Oct 5 01:36:56 2006 @@ -458,7 +458,6 @@ PLOADER_PARAMETER_BLOCK LoaderBlock, LoaderBlockVA; KERNEL_ENTRY_POINT KiSystemStartup; PLDR_DATA_TABLE_ENTRY KernelDTE, HalDTE; - PIMAGE_NT_HEADERS NtosHeader; // Mm-related things PVOID GdtIdt; ULONG PcrBasePage=0;
18 years, 1 month
1
0
0
0
[fireball] 24401: - Remove some crap from the LoadAndBootWindows() - Change debugging checkpoint to online-asm (all this is temporary), since any code after while(1){}; seems to be just optimized away by gcc - Uncomment NDEBUG for now
by fireball@svn.reactos.org
Author: fireball Date: Thu Oct 5 01:11:16 2006 New Revision: 24401 URL:
http://svn.reactos.org/svn/reactos?rev=24401&view=rev
Log: - Remove some crap from the LoadAndBootWindows() - Change debugging checkpoint to online-asm (all this is temporary), since any code after while(1){}; seems to be just optimized away by gcc - Uncomment NDEBUG for now Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c Thu Oct 5 01:11:16 2006 @@ -21,7 +21,9 @@ #include <freeldr.h> -#define NDEBUG +#include <ndk/ldrtypes.h> + +//#define NDEBUG #include <debug.h> VOID DumpMemoryAllocMap(VOID); @@ -442,7 +444,6 @@ RtlZeroMemory(*GdtIdt, NumPages << MM_PAGE_SHIFT); } - VOID LoadAndBootWindows(PCSTR OperatingSystemName, WORD OperatingSystemVersion) { @@ -454,13 +455,16 @@ BOOLEAN Status; ULONG SectionId; ULONG BootDevice; - PLOADER_PARAMETER_BLOCK LoaderBlock=NULL, LoaderBlockVA; + PLOADER_PARAMETER_BLOCK LoaderBlock, LoaderBlockVA; + KERNEL_ENTRY_POINT KiSystemStartup; PLDR_DATA_TABLE_ENTRY KernelDTE, HalDTE; - KERNEL_ENTRY_POINT KiSystemStartup; + PIMAGE_NT_HEADERS NtosHeader; // Mm-related things - PVOID GdtIdt=NULL; + PVOID GdtIdt; ULONG PcrBasePage=0; ULONG TssBasePage=0; + + //sprintf(MsgBuffer,"Booting Microsoft(R) Windows(R) OS version '%04x' is not implemented yet", OperatingSystemVersion); //UiMessageBox(MsgBuffer); @@ -562,6 +566,7 @@ /* Save entry-point pointer (VA) */ KiSystemStartup = (KERNEL_ENTRY_POINT)KernelDTE->EntryPoint; + LoaderBlockVA = PaToVa(LoaderBlock); /* Debugging... */ @@ -575,23 +580,17 @@ WinLdrpDumpMemoryDescriptors(LoaderBlockVA); - /*__asm - { - or esp, KSEG0_BASE; - or ebp, KSEG0_BASE; - }*/ - - /* - { - ULONG *trrr = (ULONG *)(512*1024*1024); - - *trrr = 0x13131414; - } - - //FIXME! - while (1) {};*/ - - (KiSystemStartup)(LoaderBlockVA); + // temp: offset C9000 + + //FIXME: If I substitute this debugging checkpoint, GCC will "optimize away" the code below + //while (1) {}; + asm(".intel_syntax noprefix\n"); + asm("test1:\n"); + asm("jmp test1\n"); + asm(".att_syntax\n"); + + + (*KiSystemStartup)(LoaderBlockVA); return; }
18 years, 1 month
1
0
0
0
[weiden] 24400: Fix broken resources
by weiden@svn.reactos.org
Author: weiden Date: Wed Oct 4 23:55:53 2006 New Revision: 24400 URL:
http://svn.reactos.org/svn/reactos?rev=24400&view=rev
Log: Fix broken resources Modified: trunk/reactos/base/applications/imagesoft/imagesoft.rc trunk/reactos/base/applications/imagesoft/lang/En.rc trunk/reactos/base/applications/imagesoft/lang/No.rc Modified: trunk/reactos/base/applications/imagesoft/imagesoft.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
============================================================================== --- trunk/reactos/base/applications/imagesoft/imagesoft.rc (original) +++ trunk/reactos/base/applications/imagesoft/imagesoft.rc Wed Oct 4 23:55:53 2006 @@ -10,12 +10,6 @@ LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US 1 24 DISCARDABLE "manifest.xml" - -STRINGTABLE DISCARDABLE -BEGIN - IDS_APPNAME "ImageSoft" - IDS_VERSION "v0.1" -END IDI_IMAGESOFTICON ICON "res/imagesoft.ico" Modified: trunk/reactos/base/applications/imagesoft/lang/En.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
============================================================================== --- trunk/reactos/base/applications/imagesoft/lang/En.rc (original) +++ trunk/reactos/base/applications/imagesoft/lang/En.rc Wed Oct 4 23:55:53 2006 @@ -1,3 +1,11 @@ +LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPNAME "ImageSoft" + IDS_VERSION "v0.1" +END + IDR_MAINMENU MENU BEGIN POPUP "&File" Modified: trunk/reactos/base/applications/imagesoft/lang/No.rc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/imagesof…
============================================================================== --- trunk/reactos/base/applications/imagesoft/lang/No.rc (original) +++ trunk/reactos/base/applications/imagesoft/lang/No.rc Wed Oct 4 23:55:53 2006 @@ -1,4 +1,10 @@ LANGUAGE LANG_NORWEGIAN, SUBLANG_NEUTRAL + +STRINGTABLE DISCARDABLE +BEGIN + IDS_APPNAME "ImageSoft" + IDS_VERSION "v0.1" +END IDR_MAINMENU MENU BEGIN
18 years, 1 month
1
0
0
0
[gedmurphy] 24399: add some overlay icons needed for devmgmt
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Oct 4 23:04:16 2006 New Revision: 24399 URL:
http://svn.reactos.org/svn/reactos?rev=24399&view=rev
Log: add some overlay icons needed for devmgmt Modified: trunk/reactos/dll/win32/setupapi/res/icons/500.ico trunk/reactos/dll/win32/setupapi/res/icons/501.ico trunk/reactos/dll/win32/setupapi/res/icons/502.ico Modified: trunk/reactos/dll/win32/setupapi/res/icons/500.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/setupapi/res/icons/501.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
============================================================================== Binary files - no diff available. Modified: trunk/reactos/dll/win32/setupapi/res/icons/502.ico URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/setupapi/res/ico…
============================================================================== Binary files - no diff available.
18 years, 1 month
1
0
0
0
[weiden] 24398: Fix almost the same bug in LdrGetProcedureAddress as in r24397
by weiden@svn.reactos.org
Author: weiden Date: Wed Oct 4 22:46:57 2006 New Revision: 24398 URL:
http://svn.reactos.org/svn/reactos?rev=24398&view=rev
Log: Fix almost the same bug in LdrGetProcedureAddress as in r24397 Modified: trunk/reactos/subsystems/win32/win32k/ldr/loader.c Modified: trunk/reactos/subsystems/win32/win32k/ldr/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ld…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ldr/loader.c (original) +++ trunk/reactos/subsystems/win32/win32k/ldr/loader.c Wed Oct 4 22:46:57 2006 @@ -66,7 +66,7 @@ NamePtr = (PULONG)((ULONG_PTR)BaseAddress + (ULONG)ExportDir->AddressOfNames); for( i = 0; i < ExportDir->NumberOfNames; i++, NamePtr++, OrdinalPtr++) { - if (!_strnicmp(Name->Buffer, (char*)((ULONG_PTR)BaseAddress + *NamePtr), Name->Length)) + if (!strcmp(Name->Buffer, (char*)((ULONG_PTR)BaseAddress + *NamePtr))) { *ProcedureAddress = (PVOID)((ULONG_PTR)BaseAddress + (ULONG)AddressPtr[*OrdinalPtr]); return STATUS_SUCCESS;
18 years, 1 month
1
0
0
0
[weiden] 24397: - Fix binary search algorithm in LdrGetProcedureAddress - Fix temporary ntdll export hack (r24395)
by weiden@svn.reactos.org
Author: weiden Date: Wed Oct 4 20:51:51 2006 New Revision: 24397 URL:
http://svn.reactos.org/svn/reactos?rev=24397&view=rev
Log: - Fix binary search algorithm in LdrGetProcedureAddress - Fix temporary ntdll export hack (r24395) Modified: trunk/reactos/dll/ntdll/def/ntdll.def trunk/reactos/dll/ntdll/main/i386/dispatch.S trunk/reactos/ntoskrnl/ldr/rtl.c trunk/reactos/ntoskrnl/ps/psmgr.c Modified: trunk/reactos/dll/ntdll/def/ntdll.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.def?re…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.def (original) +++ trunk/reactos/dll/ntdll/def/ntdll.def Wed Oct 4 20:51:51 2006 @@ -38,7 +38,7 @@ KiUserCallbackDispatcher@12 KiUserExceptionDispatcher@8 KiIntSystemCall@0 -KeFastSystemCallRet@0 ; big hack since LdrGetProcedureAddress is broken +KiFastSystemCallRet@0 KiFastSystemCall@0 LdrAccessResource@16 LdrAddRefDll@8 Modified: trunk/reactos/dll/ntdll/main/i386/dispatch.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/main/i386/dispat…
============================================================================== --- trunk/reactos/dll/ntdll/main/i386/dispatch.S (original) +++ trunk/reactos/dll/ntdll/main/i386/dispatch.S Wed Oct 4 20:51:51 2006 @@ -257,9 +257,9 @@ sysenter .endfunc -.func KeFastSystemCallRet@0 -.globl _KeFastSystemCallRet@0 -_KeFastSystemCallRet@0: +.func KiFastSystemCallRet@0 +.globl _KiFastSystemCallRet@0 +_KiFastSystemCallRet@0: /* Just return to caller */ ret Modified: trunk/reactos/ntoskrnl/ldr/rtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ldr/rtl.c?rev=243…
============================================================================== --- trunk/reactos/ntoskrnl/ldr/rtl.c (original) +++ trunk/reactos/ntoskrnl/ldr/rtl.c Wed Oct 4 20:51:51 2006 @@ -69,22 +69,15 @@ { mid = (minn + maxn) / 2; CurrentNamePtr = (PCHAR)RVA(BaseAddress, NamePtr[mid]); - res = strncmp(CurrentNamePtr, Name->Buffer, Name->Length); + res = strcmp(CurrentNamePtr, Name->Buffer); if (res == 0) { /* * Check if the beginning of the name matched, but it's still * not the whole name. */ - if (CurrentNamePtr[Name->Length] != 0) - { - res = -1; - } - else - { - *ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]); - return STATUS_SUCCESS; - } + *ProcedureAddress = (PVOID)RVA(BaseAddress, AddressPtr[OrdinalPtr[mid]]); + return STATUS_SUCCESS; } if (res > 0) maxn = mid - 1; Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c Wed Oct 4 20:51:51 2006 @@ -42,7 +42,7 @@ ANSI_STRING CallbackName = RTL_CONSTANT_STRING("KiUserCallbackDispatcher"); ANSI_STRING RaiseName = RTL_CONSTANT_STRING("KiRaiseUserExceptionDispatcher"); ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall"); -ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KeFastSystemCallRet"); +ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KiFastSystemCallRet"); ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall"); PHANDLE_TABLE PspCidTable;
18 years, 1 month
1
0
0
0
[gedmurphy] 24396: - Open the device propsheet for child items (not parents as there isn't much point) - Tag the Device ID onto the treeview items and provide functionality to tear it down - Remove/change some code which wasn't needed to speed up opening time3 - We now have a pretty functional device manager. However it's heavily reliant on devmgr.dll, therefore functionality per device will rely on how complete this lib is.
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Oct 4 20:39:45 2006 New Revision: 24396 URL:
http://svn.reactos.org/svn/reactos?rev=24396&view=rev
Log: - Open the device propsheet for child items (not parents as there isn't much point) - Tag the Device ID onto the treeview items and provide functionality to tear it down - Remove/change some code which wasn't needed to speed up opening time3 - We now have a pretty functional device manager. However it's heavily reliant on devmgr.dll, therefore functionality per device will rely on how complete this lib is. Modified: trunk/reactos/base/applications/devmgmt/devmgmt.rbuild trunk/reactos/base/applications/devmgmt/enumdevices.c trunk/reactos/base/applications/devmgmt/mainwnd.c trunk/reactos/base/applications/devmgmt/precomp.h Modified: trunk/reactos/base/applications/devmgmt/devmgmt.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/devmgmt.rbuild (original) +++ trunk/reactos/base/applications/devmgmt/devmgmt.rbuild Wed Oct 4 20:39:45 2006 @@ -15,6 +15,7 @@ <library>user32</library> <library>comctl32</library> <library>advapi32</library> + <library>devmgr</library> <compilationunit name="unit.c"> <file>about.c</file> <file>devmgmt.c</file> Modified: trunk/reactos/base/applications/devmgmt/enumdevices.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/enumdevices.c (original) +++ trunk/reactos/base/applications/devmgmt/enumdevices.c Wed Oct 4 20:39:45 2006 @@ -12,10 +12,84 @@ static SP_CLASSIMAGELIST_DATA ImageListData; static HDEVINFO hDevInfo; - -VOID OpenPropSheet(HTREEITEM hItem) -{ - DisplayString(_T("Device Propsheet not yet implemented")); +VOID +FreeDeviceStrings(HWND hTV) +{ + HTREEITEM hItem; + + hItem = TreeView_GetRoot(hTV); + + if (hItem) + { + hItem = TreeView_GetChild(hTV, + hItem); + /* loop the parent items */ + while (hItem) + { + hItem = TreeView_GetChild(hTV, + hItem); + if (hItem == NULL) + break; + + /* loop the child items and free the DeviceID */ + while (TRUE) + { + HTREEITEM hOldItem; + TV_ITEM tvItem; + //TCHAR Buf[100]; + + tvItem.hItem = hItem; + tvItem.mask = TVIF_PARAM;// | TVIF_TEXT; + //tvItem.pszText = Buf; + //tvItem.cchTextMax = 99; + + (void)TreeView_GetItem(hTV, &tvItem); + + //MessageBox(NULL, Buf, NULL, 0); + + HeapFree(GetProcessHeap(), + 0, + (LPTSTR)tvItem.lParam); + + hOldItem = hItem; + + hItem = TreeView_GetNextSibling(hTV, + hItem); + if (hItem == NULL) + { + hItem = hOldItem; + break; + } + } + + hItem = TreeView_GetParent(hTV, + hItem); + hItem = TreeView_GetNextSibling(hTV, + hItem); + } + } +} + + +VOID +OpenPropSheet(HWND hTV, + HTREEITEM hItem) +{ + TV_ITEM tvItem; + + tvItem.hItem = hItem; + tvItem.mask = TVIF_PARAM; + + if (TreeView_GetItem(hTV, &tvItem) && + (LPTSTR)tvItem.lParam != NULL) + { + DevicePropertiesExW(hTV, + NULL, + (LPTSTR)tvItem.lParam, + 0, + FALSE); + } + } @@ -23,6 +97,7 @@ InsertIntoTreeView(HWND hTV, HTREEITEM hRoot, LPTSTR lpLabel, + LPTSTR DeviceID, INT DevImage) { TV_ITEM tvi; @@ -31,9 +106,10 @@ ZeroMemory(&tvi, sizeof(tvi)); ZeroMemory(&tvins, sizeof(tvins)); - tvi.mask = TVIF_TEXT | TVIF_IMAGE | TVIF_SELECTEDIMAGE; + tvi.mask = TVIF_TEXT | TVIF_PARAM | TVIF_IMAGE | TVIF_SELECTEDIMAGE; tvi.pszText = lpLabel; tvi.cchTextMax = lstrlen(lpLabel); + tvi.lParam = (LPARAM)DeviceID; tvi.iImage = DevImage; tvi.iSelectedImage = DevImage; @@ -58,11 +134,11 @@ UINT Ret; *DevPresent = FALSE; + *DevClassName = _T('\0'); Ret = CM_Enumerate_Classes(ClassIndex, &ClassGuid, 0); - if (Ret != CR_SUCCESS) { /* all classes enumerated */ @@ -84,10 +160,6 @@ &RequiredSize)) { lstrcpy(DevClassName, ClassName); - } - else - { - *DevClassName = _T('\0'); } if (!SetupDiGetClassImageIndex(&ImageListData, @@ -111,7 +183,6 @@ return 0; } - KeyClass = SetupDiOpenClassRegKeyEx(&ClassGuid, MAXIMUM_ALLOWED, DIOCR_INSTALLER, @@ -145,65 +216,54 @@ static INT EnumDevices(INT index, - TCHAR* DeviceClassName, - TCHAR* DeviceName) + LPTSTR DeviceClassName, + LPTSTR DeviceName, + LPTSTR *DeviceID) { SP_DEVINFO_DATA DeviceInfoData; - DWORD RequiredSize = 0; - GUID *guids = NULL; - BOOL bRet; + DWORD DevIdSize; *DeviceName = _T('\0'); - - bRet = SetupDiClassGuidsFromName(DeviceClassName, - NULL, - RequiredSize, - &RequiredSize); - if (RequiredSize == 0) - return -2; - - if (!bRet) - { - guids = HeapAlloc(GetProcessHeap(), - 0, - RequiredSize * sizeof(GUID)); - if (guids == NULL) - return -1; - - bRet = SetupDiClassGuidsFromName(DeviceClassName, - guids, - RequiredSize, - &RequiredSize); - - if (!bRet || RequiredSize == 0) - { - /* incorrect class name */ - HeapFree(GetProcessHeap(), 0, guids); - return -3; - } - } - - HeapFree(GetProcessHeap(), 0, guids); - if(hDevInfo == INVALID_HANDLE_VALUE) - { - if(!bRet) - { - /* device info is unavailable */ - return -4; - } - } + *DeviceID = NULL; ZeroMemory(&DeviceInfoData, sizeof(SP_DEVINFO_DATA)); DeviceInfoData.cbSize = sizeof(SP_DEVINFO_DATA); - bRet = SetupDiEnumDeviceInfo(hDevInfo, - index, - &DeviceInfoData); - - if (!bRet) + if (!SetupDiEnumDeviceInfo(hDevInfo, + index, + &DeviceInfoData)) { /* no such device */ return -1; + } + + /* get the device ID */ + if (!SetupDiGetDeviceInstanceId(hDevInfo, + &DeviceInfoData, + NULL, + 0, + &DevIdSize)) + { + if (GetLastError() == ERROR_INSUFFICIENT_BUFFER) + { + (*DeviceID) = (LPTSTR)HeapAlloc(GetProcessHeap(), + 0, + DevIdSize * sizeof(TCHAR)); + if (*DeviceID) + { + if (!SetupDiGetDeviceInstanceId(hDevInfo, + &DeviceInfoData, + *DeviceID, + DevIdSize, + NULL)) + { + HeapFree(GetProcessHeap(), + 0, + *DeviceID); + *DeviceID = NULL; + } + } + } } /* get the device's friendly name */ @@ -216,17 +276,16 @@ NULL)) { /* if the friendly name fails, try the description instead */ - bRet = SetupDiGetDeviceRegistryProperty(hDevInfo, - &DeviceInfoData, - SPDRP_DEVICEDESC, - 0, - (BYTE*)DeviceName, - MAX_DEV_LEN, - NULL); - if (!bRet) + if (!SetupDiGetDeviceRegistryProperty(hDevInfo, + &DeviceInfoData, + SPDRP_DEVICEDESC, + 0, + (BYTE*)DeviceName, + MAX_DEV_LEN, + NULL)) { /* if the description fails, just give up! */ - return -5; + return -2; } } @@ -241,6 +300,7 @@ HTREEITEM hDevItem; TCHAR DevName[MAX_DEV_LEN]; TCHAR DevDesc[MAX_DEV_LEN]; + LPTSTR DeviceID = NULL; BOOL DevExist = FALSE; INT ClassRet; INT index = 0; @@ -264,6 +324,7 @@ hDevItem = InsertIntoTreeView(Info->hTreeView, hRoot, DevDesc, + NULL, DevImage); } else @@ -271,6 +332,7 @@ hDevItem = InsertIntoTreeView(Info->hTreeView, hRoot, DevName, + NULL, DevImage); } @@ -278,12 +340,14 @@ { Ret = EnumDevices(DevIndex, DevName, - DeviceName); + DeviceName, + &DeviceID); if (Ret == 0) { InsertIntoTreeView(Info->hTreeView, hDevItem, DeviceName, + DeviceID, DevImage); } @@ -298,6 +362,7 @@ hDevInfo = NULL; } + /* don't insert classes with no devices */ if (!TreeView_GetChild(Info->hTreeView, hDevItem)) { @@ -366,6 +431,7 @@ hRoot = InsertIntoTreeView(Info->hTreeView, NULL, ComputerName, + NULL, RootImage); return hRoot; Modified: trunk/reactos/base/applications/devmgmt/mainwnd.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/mainwnd.c (original) +++ trunk/reactos/base/applications/devmgmt/mainwnd.c Wed Oct 4 20:39:45 2006 @@ -285,7 +285,8 @@ if (!TreeView_GetChild(Info->hTreeView, hSelected)) { - OpenPropSheet(hSelected); + OpenPropSheet(Info->hTreeView, + hSelected); } } break; @@ -348,13 +349,18 @@ case IDC_PROP: { HTREEITEM hSelected = TreeView_GetSelection(Info->hTreeView); - OpenPropSheet(hSelected); + OpenPropSheet(Info->hTreeView, + hSelected); } break; case IDC_REFRESH: { - HTREEITEM hRoot = InitTreeView(Info); + HTREEITEM hRoot; + + FreeDeviceStrings(Info->hTreeView); + + hRoot = InitTreeView(Info); if (hRoot) ListDevicesByType(Info, hRoot); } @@ -525,6 +531,7 @@ case WM_CLOSE: { + FreeDeviceStrings(Info->hTreeView); DestroyMenu(Info->hShortcutMenu); DestroyWindow(hwnd); } @@ -532,8 +539,6 @@ case WM_DESTROY: { - //DestroyMainWnd(Info); - HeapFree(ProcessHeap, 0, Info); Modified: trunk/reactos/base/applications/devmgmt/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/devmgmt/…
============================================================================== --- trunk/reactos/base/applications/devmgmt/precomp.h (original) +++ trunk/reactos/base/applications/devmgmt/precomp.h Wed Oct 4 20:39:45 2006 @@ -53,7 +53,29 @@ /* enumdevices.c */ -VOID OpenPropSheet(HTREEITEM hItem); +// undocumented API's from devmgr +#ifdef _UNICODE +#define DevicePropertiesEx DevicePropertiesExW +INT_PTR +WINAPI +DevicePropertiesExW(IN HWND hWndParent OPTIONAL, + IN LPCWSTR lpMachineName OPTIONAL, + IN LPCWSTR lpDeviceID OPTIONAL, + IN DWORD dwFlags OPTIONAL, + IN BOOL bShowDevMgr); +#else +#define DevicePropertiesEx DevicePropertiesExA +INT_PTR +WINAPI +DevicePropertiesExA(IN HWND hWndParent OPTIONAL, + IN LPCSTR lpMachineName OPTIONAL, + IN LPCSTR lpDeviceID OPTIONAL, + IN DWORD dwFlags OPTIONAL, + IN BOOL bShowDevMgr); +#endif + +VOID FreeDeviceStrings(HWND hTV); +VOID OpenPropSheet(HWND hTV, HTREEITEM hItem); HTREEITEM InitTreeView(PMAIN_WND_INFO Info); VOID ListDevicesByType(PMAIN_WND_INFO Info, HTREEITEM hRoot);
18 years, 1 month
1
0
0
0
[ion] 24395: - Implement XPSP2+ syscall stub that uses indirect pointer instead of executable code inside KUSER_SHARED_DATA. - Someone (FILIP!) please fix LdrGetProcedureAddress. It's broken and I had to rename an ntdll export to make it work (see comments). - Make sure you REBUILD CLEAN. This commit changes NCITool!!! - Setup some NPX-related CPU features in SharedUserData during KiInitializeKernel. - Remove some now-deprecated initialization functions.
by ion@svn.reactos.org
Author: ion Date: Wed Oct 4 20:00:36 2006 New Revision: 24395 URL:
http://svn.reactos.org/svn/reactos?rev=24395&view=rev
Log: - Implement XPSP2+ syscall stub that uses indirect pointer instead of executable code inside KUSER_SHARED_DATA. - Someone (FILIP!) please fix LdrGetProcedureAddress. It's broken and I had to rename an ntdll export to make it work (see comments). - Make sure you REBUILD CLEAN. This commit changes NCITool!!! - Setup some NPX-related CPU features in SharedUserData during KiInitializeKernel. - Remove some now-deprecated initialization functions. Modified: trunk/reactos/dll/ntdll/def/ntdll.def trunk/reactos/dll/ntdll/main/i386/dispatch.S trunk/reactos/ntoskrnl/KrnlFun.c trunk/reactos/ntoskrnl/ex/init.c trunk/reactos/ntoskrnl/ke/i386/cpu.c trunk/reactos/ntoskrnl/ke/i386/kiinit.c trunk/reactos/ntoskrnl/ke/i386/trap.s trunk/reactos/ntoskrnl/ldr/rtl.c trunk/reactos/ntoskrnl/ps/psmgr.c trunk/reactos/tools/nci/ncitool.c Modified: trunk/reactos/dll/ntdll/def/ntdll.def URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/def/ntdll.def?re…
============================================================================== --- trunk/reactos/dll/ntdll/def/ntdll.def (original) +++ trunk/reactos/dll/ntdll/def/ntdll.def Wed Oct 4 20:00:36 2006 @@ -37,6 +37,9 @@ KiUserApcDispatcher@16 KiUserCallbackDispatcher@12 KiUserExceptionDispatcher@8 +KiIntSystemCall@0 +KeFastSystemCallRet@0 ; big hack since LdrGetProcedureAddress is broken +KiFastSystemCall@0 LdrAccessResource@16 LdrAddRefDll@8 LdrDisableThreadCalloutsForDll@4 Modified: trunk/reactos/dll/ntdll/main/i386/dispatch.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/ntdll/main/i386/dispat…
============================================================================== --- trunk/reactos/dll/ntdll/main/i386/dispatch.S (original) +++ trunk/reactos/dll/ntdll/main/i386/dispatch.S Wed Oct 4 20:00:36 2006 @@ -236,6 +236,35 @@ ret 8 .endfunc +.func KiIntSystemCall@0 +.globl _KiIntSystemCall@0 +_KiIntSystemCall@0: + + /* Set stack in EDX and do the interrupt */ + lea edx, [esp+8] + int 0x2E + + /* Return to caller */ + ret +.endfunc + +.func KiFastSystemCall@0 +.globl _KiFastSystemCall@0 +_KiFastSystemCall@0: + + /* Put ESP in EDX and do the SYSENTER */ + mov edx, esp + sysenter +.endfunc + +.func KeFastSystemCallRet@0 +.globl _KeFastSystemCallRet@0 +_KeFastSystemCallRet@0: + + /* Just return to caller */ + ret +.endfunc + .func RtlpGetStackLimits@8 .globl _RtlpGetStackLimits@8 _RtlpGetStackLimits@8: Modified: trunk/reactos/ntoskrnl/KrnlFun.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/KrnlFun.c?rev=243…
============================================================================== --- trunk/reactos/ntoskrnl/KrnlFun.c (original) +++ trunk/reactos/ntoskrnl/KrnlFun.c Wed Oct 4 20:00:36 2006 @@ -27,8 +27,10 @@ // Ke: // // - FIXES: -// * Get rid of KiRosPrintAddress and use KiDumpParameterImages instead. +// * Stop using CachedModules. +// * Try to make MmInit1 NTLDR compatible. // * Sanitize some context fields during conversions. +// * Figure out why the DPC stack doesn't really work. // * Add DR macro/save and VM macro/save. // - FEATURES: // * New optimized table-based tick-hashed timer implementation. Modified: trunk/reactos/ntoskrnl/ex/init.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/init.c?rev=243…
============================================================================== --- trunk/reactos/ntoskrnl/ex/init.c (original) +++ trunk/reactos/ntoskrnl/ex/init.c Wed Oct 4 20:00:36 2006 @@ -67,18 +67,9 @@ ULONG i; BOOLEAN BootDriveFound = FALSE; - /* - * NOTE: - * The shared user page has been zeroed-out right after creation. - * There is NO need to do this again. - */ - Ki386SetProcessorFeatures(); - - /* Set the Version Data */ + /* Set the Product Type */ SharedUserData->NtProductType = NtProductWinNt; SharedUserData->ProductTypeIsValid = TRUE; - SharedUserData->NtMajorVersion = 5; - SharedUserData->NtMinorVersion = 0; /* * Retrieve the current dos system path Modified: trunk/reactos/ntoskrnl/ke/i386/cpu.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/cpu.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/cpu.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/cpu.c Wed Oct 4 20:00:36 2006 @@ -650,97 +650,6 @@ } VOID -INIT_FUNCTION -Ki386SetProcessorFeatures(VOID) -{ - OBJECT_ATTRIBUTES ObjectAttributes; - UNICODE_STRING KeyName = - RTL_CONSTANT_STRING(L"\\Registry\\Machine\\System\\CurrentControlSet\\Control\\Session Manager\\Kernel"); - UNICODE_STRING ValueName = RTL_CONSTANT_STRING(L"FastSystemCallDisable"); - HANDLE KeyHandle; - ULONG ResultLength; - struct - { - KEY_VALUE_PARTIAL_INFORMATION Info; - UCHAR Buffer[20]; - } ValueData; - NTSTATUS Status; - ULONG FastSystemCallDisable = 0; - - SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_PRECISION_ERRATA] = FALSE; - SharedUserData->ProcessorFeatures[PF_FLOATING_POINT_EMULATED] = FALSE; - SharedUserData->ProcessorFeatures[PF_COMPARE_EXCHANGE_DOUBLE] = - (KeFeatureBits & KF_CMPXCHG8B) ? TRUE : FALSE; - SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = - (KeFeatureBits & KF_MMX) ? TRUE : FALSE; - SharedUserData->ProcessorFeatures[PF_PPC_MOVEMEM_64BIT_OK] = FALSE; - SharedUserData->ProcessorFeatures[PF_ALPHA_BYTE_INSTRUCTIONS] = FALSE; - SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] = - (KeFeatureBits & KF_XMMI) ? TRUE : FALSE; - SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = - (KeFeatureBits & KF_RDTSC) ? TRUE : FALSE; - - /* Does the CPU Support Fast System Call? */ - if (KeFeatureBits & KF_FAST_SYSCALL) { - - /* FIXME: Check for Family == 6, Model < 3 and Stepping < 3 and disable */ - - /* Make sure it's not disabled in registry */ - InitializeObjectAttributes(&ObjectAttributes, - &KeyName, - OBJ_CASE_INSENSITIVE, - NULL, - NULL); - Status = ZwOpenKey(&KeyHandle, - KEY_QUERY_VALUE, - &ObjectAttributes); - - if (NT_SUCCESS(Status)) { - - /* Read the Value then Close the Key */ - Status = ZwQueryValueKey(KeyHandle, - &ValueName, - KeyValuePartialInformation, - &ValueData, - sizeof(ValueData), - &ResultLength); - if (NT_SUCCESS(Status)) - { - if (ResultLength == sizeof(ValueData) && - ValueData.Info.Type == REG_DWORD) - { - FastSystemCallDisable = *(PULONG)ValueData.Info.Data != 0; - } - - ZwClose(KeyHandle); - } - } - - } else { - - /* Disable SYSENTER/SYSEXIT, because the CPU doesn't support it */ - FastSystemCallDisable = 1; - - } - - if (FastSystemCallDisable) { - /* Use INT2E */ - const unsigned char Entry[7] = {0x8D, 0x54, 0x24, 0x08, /* lea 0x8(%esp),%edx */ - 0xCD, 0x2E, /* int 0x2e */ - 0xC3}; /* ret */ - memcpy(&SharedUserData->SystemCall, Entry, sizeof(Entry)); - } else { - /* Use SYSENTER */ - const unsigned char Entry[5] = {0x8B, 0xD4, /* movl %esp,%edx */ - 0x0F, 0x34, /* sysenter */ - 0xC3}; /* ret */ - memcpy(&SharedUserData->SystemCall, Entry, sizeof(Entry)); - /* Enable SYSENTER/SYSEXIT */ - KiFastSystemCallDisable = 0; - } -} - -VOID NTAPI KeFlushCurrentTb(VOID) { Modified: trunk/reactos/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/kiinit.c?…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/kiinit.c (original) +++ trunk/reactos/ntoskrnl/ke/i386/kiinit.c Wed Oct 4 20:00:36 2006 @@ -421,6 +421,20 @@ /* Set the NX Support policy */ SharedUserData->NXSupportPolicy = NXSupportPolicy; + /* Set basic CPU Features that user mode can read */ + SharedUserData->ProcessorFeatures[PF_MMX_INSTRUCTIONS_AVAILABLE] = + (KeFeatureBits & KF_MMX); + SharedUserData->ProcessorFeatures[PF_COMPARE_EXCHANGE_DOUBLE] = + (KeFeatureBits & KF_CMPXCHG8B); + SharedUserData->ProcessorFeatures[PF_XMMI_INSTRUCTIONS_AVAILABLE] = + ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI)); + SharedUserData->ProcessorFeatures[PF_XMMI64_INSTRUCTIONS_AVAILABLE] = + ((KeFeatureBits & KF_FXSR) && (KeFeatureBits & KF_XMMI64)); + SharedUserData->ProcessorFeatures[PF_3DNOW_INSTRUCTIONS_AVAILABLE] = + (KeFeatureBits & KF_3DNOW); + SharedUserData->ProcessorFeatures[PF_RDTSC_INSTRUCTION_AVAILABLE] = + (KeFeatureBits & KF_RDTSC); + /* Setup the Idle Thread */ KeInitializeThread(InitProcess, InitThread, Modified: trunk/reactos/ntoskrnl/ke/i386/trap.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/i386/trap.s?re…
============================================================================== --- trunk/reactos/ntoskrnl/ke/i386/trap.s (original) +++ trunk/reactos/ntoskrnl/ke/i386/trap.s Wed Oct 4 20:00:36 2006 @@ -134,7 +134,7 @@ popf /* Set our EFLAGS */ or dword ptr [esp], EFLAGS_INTERRUPT_MASK /* Re-enable IRQs in EFLAGS, to fake INT */ push KGDT_R3_CODE + RPL_MASK - push KUSER_SHARED_SYSCALL_RET + push dword ptr ds:KUSER_SHARED_SYSCALL_RET /* Setup the Trap Frame stack */ push 0 Modified: trunk/reactos/ntoskrnl/ldr/rtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ldr/rtl.c?rev=243…
============================================================================== --- trunk/reactos/ntoskrnl/ldr/rtl.c (original) +++ trunk/reactos/ntoskrnl/ldr/rtl.c Wed Oct 4 20:00:36 2006 @@ -55,6 +55,12 @@ * -- Filip Navara, August 1st, 2005 */ + /* + * I don't know who wrote this code but it's not working. + * Test case: KiFastSystemCall and KiFastSystemCallRet in ntdll. + * Former can't be found even though it's exported. + */ + OrdinalPtr = (PUSHORT)RVA(BaseAddress, ExportDir->AddressOfNameOrdinals); NamePtr = (PULONG)RVA(BaseAddress, ExportDir->AddressOfNames); Modified: trunk/reactos/ntoskrnl/ps/psmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ps/psmgr.c?rev=24…
============================================================================== --- trunk/reactos/ntoskrnl/ps/psmgr.c (original) +++ trunk/reactos/ntoskrnl/ps/psmgr.c Wed Oct 4 20:00:36 2006 @@ -41,6 +41,9 @@ ANSI_STRING ExceptName = RTL_CONSTANT_STRING("KiUserExceptionDispatcher"); ANSI_STRING CallbackName = RTL_CONSTANT_STRING("KiUserCallbackDispatcher"); ANSI_STRING RaiseName = RTL_CONSTANT_STRING("KiRaiseUserExceptionDispatcher"); +ANSI_STRING FastName = RTL_CONSTANT_STRING("KiFastSystemCall"); +ANSI_STRING FastReturnName = RTL_CONSTANT_STRING("KeFastSystemCallRet"); +ANSI_STRING InterruptName = RTL_CONSTANT_STRING("KiIntSystemCall"); PHANDLE_TABLE PspCidTable; @@ -97,6 +100,34 @@ /* Get user-mode exception raise trampoline */ Status = PspLookupSystemDllEntryPoint(&RaiseName, &KeRaiseUserExceptionDispatcher); + if (!NT_SUCCESS(Status)) return Status; + + /* Check if this is a machine that supports SYSENTER */ + if (KeFeatureBits & KF_FAST_SYSCALL) + { + /* Get user-mode sysenter stub */ + Status = PspLookupSystemDllEntryPoint(&FastName, + (PVOID)&SharedUserData-> + SystemCall); + if (!NT_SUCCESS(Status)) return Status; + + /* Get user-mode sysenter return stub */ + Status = PspLookupSystemDllEntryPoint(&FastReturnName, + (PVOID)&SharedUserData-> + SystemCallReturn); + } + else + { + /* Get the user-mode interrupt stub */ + Status = PspLookupSystemDllEntryPoint(&InterruptName, + (PVOID)&SharedUserData-> + SystemCall); + } + + /* Set the test instruction */ + if (!NT_SUCCESS(Status)) SharedUserData->TestRetInstruction = 0xC3; + + /* Return the status */ return Status; } Modified: trunk/reactos/tools/nci/ncitool.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/nci/ncitool.c?rev=24…
============================================================================== --- trunk/reactos/tools/nci/ncitool.c (original) +++ trunk/reactos/tools/nci/ncitool.c Wed Oct 4 20:00:36 2006 @@ -51,7 +51,7 @@ #if defined(__GNUC__) #define UserModeStub_x86 " movl $0x%x, %%eax\n" \ " movl $KUSER_SHARED_SYSCALL, %%ecx\n" \ - " call *%%ecx\n" \ + " call *(%%ecx)\n" \ " ret $0x%x\n\n" #elif defined(_MSC_VER) #define UserModeStub_x86 " asm { \n" \
18 years, 1 month
1
0
0
0
[weiden] 24394: Don't compile with -Wconversion since we have function callbacks that have parameters with sizes different from int without forward declarations. Fixes superfluous warnings.
by weiden@svn.reactos.org
Author: weiden Date: Wed Oct 4 19:19:23 2006 New Revision: 24394 URL:
http://svn.reactos.org/svn/reactos?rev=24394&view=rev
Log: Don't compile with -Wconversion since we have function callbacks that have parameters with sizes different from int without forward declarations. Fixes superfluous warnings. Modified: trunk/reactos/lib/cmlib/cmlib.mak Modified: trunk/reactos/lib/cmlib/cmlib.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.mak?rev=24…
============================================================================== --- trunk/reactos/lib/cmlib/cmlib.mak (original) +++ trunk/reactos/lib/cmlib/cmlib.mak Wed Oct 4 19:19:23 2006 @@ -30,7 +30,7 @@ CMLIB_HOST_OBJECTS = \ $(subst $(CMLIB_BASE), $(CMLIB_INT), $(CMLIB_HOST_SOURCES:.c=.o)) -CMLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith -Wconversion \ +CMLIB_HOST_CFLAGS = -O3 -Wall -Wwrite-strings -Wpointer-arith \ -D_X86_ -D__i386__ -D_REACTOS_ -D_NTOSKRNL_\ -DCMLIB_HOST -D_M_IX86 -I$(CMLIB_BASE) -Iinclude/reactos -Iinclude/psdk -Iinclude/ddk -Iinclude/crt \ -D__NO_CTYPE_INLINES
18 years, 1 month
1
0
0
0
← Newer
1
...
26
27
28
29
30
31
32
...
36
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
Results per page:
10
25
50
100
200