Commit graph

48388 commits

Author SHA1 Message Date
Pierre Schweitzer d858435e44 [KMTEST]
Add more tests for FsRtlIs*InExpression()
Those are currently failing on ReactOS

svn path=/trunk/; revision=53858
2011-09-26 05:51:39 +00:00
Timo Kreuzer aac37d162e [FREELDR]
- Get rid of MmAllocateMemory, freeing about 1MB of low physical memory for the kernel
- verify that MmMarkPagesInLookupTable is not called with invalid page regions
- add maximum allocation to heap statistics

<long explanation>
There was a function called MmAllocateMemory, what was commented as "// Temporary forwarder..." since January 2008. This function allocated one page of memory and marked it as LoaderOsLoaderHeap. This function was used by the fat filesystem code (and linuxboot.c) which allocated and freed memory in small chunks all the time. Since MmFreeMemory() is not implemented at all (obviously someone removed it) we were allocating one full page for allocations as small as 8 bytes and never free them. This accumulated to a total of 240 pages, almost 1MB, split into into 14 chunks. This memory was never freed by the kernel (the kernel keeps the loader heap memory for some reason) and fragmented the low memory region.
Remove MmAllocateMemory completely and replace references in the fat code with MmHeapAlloc. The maximum heap usage after this was 184 KB, heap size is 4MB. 
</long explanation>

svn path=/trunk/; revision=53857
2011-09-25 19:19:50 +00:00
Amine Khaldi b1da30c092 [ACTPRXY]
* Enclose midl-incompatible declarations as widl-only. Fixes actxprxy MSVC build.

svn path=/trunk/; revision=53856
2011-09-25 16:28:58 +00:00
Giannis Adamopoulos dc6c2f8e88 [user32_apitest]
- In TrackMouseEvent tests, use mouse_event function to move the mouse cause this causes low level hooks to be called and SetCursorPos doesn't
- Test low level mouse hooks for TrackMouseEvent
- Test ways to block WM_MOUSEHOVER and WM_MOUSELEAVE. This is useful to detect where each message is generated
- clean up the code a bit by adding FLUSH_MESSAGES macro that checks for expected message queue status and flushes the message queue

svn path=/trunk/; revision=53855
2011-09-25 16:05:09 +00:00
Dmitry Gorbachev c334575fcd [Explorer]
Link with libmingw32.

svn path=/trunk/; revision=53854
2011-09-25 16:02:29 +00:00
Dmitry Gorbachev 5be9321dae [NTOSKRNL]
Disable mouse when reading from keyboard port.

svn path=/trunk/; revision=53853
2011-09-25 16:02:14 +00:00
Dmitry Gorbachev e66ae73d2b [PSDK]
Remove duplicate lines, noticed by sharpsighted forum people.

svn path=/trunk/; revision=53852
2011-09-25 16:01:44 +00:00
Rafal Harabien 3b040dbb1e [SYSDM] - Improve polish translation of virtual memory dialog
svn path=/trunk/; revision=53851
2011-09-25 12:15:01 +00:00
Eric Kohl fc001348ab [SERVICES]
- Silence debug messages.
- Fix typos.
- Add missing database locks.
- RControlService: Return ERROR_INVALID_PARAMETER on illegal control code.

svn path=/trunk/; revision=53850
2011-09-25 12:07:52 +00:00
Rafal Harabien c8e41d9f48 [SYSDM]
- Don't give UINT to printf if %I64u is used
- Minor improvements
See issue #6501 for more details.

svn path=/trunk/; revision=53849
2011-09-25 11:29:45 +00:00
Rafal Harabien c3d6d99666 [FREELDR]
- Improve tracing
- Fix memory corruption caused by marking pages outside of page lookup table (when table is allocated only free pages was counted but MmMarkPagesInLookupTable was used for all types of memory like firmware). Fixes bugcheck in ACPI HAL which happened for me

svn path=/trunk/; revision=53848
2011-09-25 11:07:27 +00:00
Timo Kreuzer fcb42db05d [NTOSKRNL]
- also disable "MTRR support detected but not yet taken advantage of"

svn path=/trunk/; revision=53847
2011-09-25 09:16:10 +00:00
Timo Kreuzer 6caabd812a [NTOSKRNL]
- Undo disabling of systemcalls, which was disabled in r53646 for testing purpose.
- Sillence "Support for SYSENTER detected." debug print, since its the normal case, only keep the disabled and not present cases.
- Silence "xxx support detected but not yet taken advantage of" debug prints. CPU features are already reported and there is no point in printing every single feature we do not support.
- Invert if/else in KiRestoreFastSyscallReturnState

svn path=/trunk/; revision=53846
2011-09-25 09:12:26 +00:00
Rafal Harabien b0aeafc91e - Commit forgotten file...
svn path=/trunk/; revision=53845
2011-09-24 20:01:04 +00:00
Rafal Harabien cdbf35509d [MKHIVE] - Get all INF files from command line instead of using hardcoded names
[CMAKE] - Use new mkhive syntax and fix livecd hives dependences
[RBUILD] - Use new mkhive syntax

svn path=/trunk/; revision=53844
2011-09-24 19:59:56 +00:00
Dmitry Gorbachev 951066d094 [BUGCODES]
Bug check code 0x5d is UNSUPPORTED_PROCESSOR.

[NTOSKRNL]
Use it.

svn path=/trunk/; revision=53843
2011-09-24 18:13:57 +00:00
Aleksey Bragin 6bed73a4e1 [BUGCODES]
- Add SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION definition.

svn path=/trunk/; revision=53842
2011-09-24 17:33:54 +00:00
Dmitry Gorbachev 7253e6bc9d [FREELDR]
Add FREELDR_MEMORY_DESCRIPTOR structure using TYPE_OF_MEMORY instead of 
MEMORY_TYPE. Use it in place of MEMORY_DESCRIPTOR. Undo r53837 changes.

svn path=/trunk/; revision=53841
2011-09-24 17:25:29 +00:00
Amine Khaldi 4ab9552831 [FREELDR/SETUPLDR]
* Add _dbg versions of freeldr_pe and setupldr_pe per Dmitry's request. They retain debug info, and they're compiled on-demand (not included in the normal build).

svn path=/trunk/; revision=53840
2011-09-24 16:08:37 +00:00
Eric Kohl 388f99e67e [SMSS]
Fix wrong behavior of the "native applications startup at boot time" feature in SMSS.

Modifications:
- Added missing buffer allocation checks.
- Check for presence of default path.
- Minor clean-ups.
- Fix bad indentation/coding style.

Original patch by Hermès BÉLUSCA.
See issue #6180 for more details.

svn path=/trunk/; revision=53839
2011-09-24 15:12:52 +00:00
Timo Kreuzer adaa2b8e63 [NTOSKRNL]
- Cleanup amd64 mm.h header
- Call MiScanMemoryDescriptors earlier, since it doesn't depend on anything except the loader block.
- MiComputeColorInformation() and the calculation of the pfn database size are portable, so move them out of MiInitMachineDependent

svn path=/trunk/; revision=53838
2011-09-24 14:22:13 +00:00
Dmitry Gorbachev 62b3a707c7 [FREELDR]
Compare with constants of right type.

svn path=/trunk/; revision=53837
2011-09-24 13:39:14 +00:00
Dmitry Gorbachev 8a0fec1a86 [User32]
Check return value of DIB_GetBitmapInfo.

svn path=/trunk/; revision=53836
2011-09-24 13:37:24 +00:00
Giannis Adamopoulos 0c34695bab [user32_apitest]
- Add one more small test for WM_SYSTIMER

svn path=/trunk/; revision=53835
2011-09-24 12:22:21 +00:00
Kamil Hornicek 1db290c144 another try to fix cmake build
svn path=/trunk/; revision=53834
2011-09-24 12:16:04 +00:00
Cameron Gutman 815184cde3 [ACPI]
- Reduce debug spam
- Report critical initialization failure

svn path=/trunk/; revision=53833
2011-09-24 12:05:43 +00:00
Giannis Adamopoulos aa39ad7260 [user32_apitest.exe]
- Fix gcc build

svn path=/trunk/; revision=53832
2011-09-24 12:05:14 +00:00
Cameron Gutman c21792df52 [HAL]
- Report table lookup failures
- Report supported ACPI version

svn path=/trunk/; revision=53831
2011-09-24 12:01:48 +00:00
Giannis Adamopoulos 31eb9d7849 [user32_apitest]
- Implement logging post messages or winevents
- For SetActiveWindow test, also test the parameters of WM_WINDOWPOSCHANGING and WM_WINDOWPOSCHANGED messages
- For TrackMouseEvent test, also test the WM_SYSTIMER that is possible to be logged now

svn path=/trunk/; revision=53830
2011-09-24 11:55:19 +00:00
Giannis Adamopoulos 0048dee2cc [undocuser.h]
- Add a definition for TrackMouseEvent timer

svn path=/trunk/; revision=53829
2011-09-24 11:51:45 +00:00
Kamil Hornicek 5583797759 fix the cmake build?
svn path=/trunk/; revision=53828
2011-09-24 11:47:17 +00:00
Timo Kreuzer d076d5b976 [NTOSKRNL/AMD64]
Cleanup amd64 specific code

svn path=/trunk/; revision=53827
2011-09-24 11:46:20 +00:00
Eric Kohl f7125a502c Add the Diskpart utility by Lee Schroeder (milawynsrealm).
The following modifications were made:
- Removed the help texts because they were copied from Windows Diskpart.
- Used a single string resource per help text.
- Used only Unicode strings and Unicode string functions.
- Replaced the giant if-statement in the command dispatcher in interpreter.c by a command-table and a little loop.
- Improved the command-line parser. Argument count and argument vector are passed to the command and help functions for easy evaluation.
- Moved the help function for commands into the command specific file.

TODO:
- Implement all commands as the utility is only an empty frame.
- Add help texts.
- Translate help texts.
See issue #6402 for more details.

svn path=/trunk/; revision=53826
2011-09-24 10:33:33 +00:00
Timo Kreuzer 0ce2f14276 [NTOSKRNL]
- Session space address layout is architecture specific, move its initialization into MiInitializeSesseionSpaceLayout() in architecture specific file
- Use dedicated constants for setting MmSystemRangeStart, MmUserProbeAddress and MmHighestUserAddress isnetad of making assumptions.

svn path=/trunk/; revision=53825
2011-09-24 08:52:26 +00:00
Rafal Harabien bf4b896e65 [WPP]
- Sync to Wine 1.3.29 to fix a warning

svn path=/trunk/; revision=53824
2011-09-24 07:58:49 +00:00
Pierre Schweitzer acee43d271 [KERNEL32]
Simplify overcomplicated function CreateHardlinkW(), and SEHify it.

svn path=/trunk/; revision=53823
2011-09-24 07:51:21 +00:00
Timo Kreuzer 2c440bd22d [NTOSKRNL]
Add MiScanMemoryDescriptors, that combines the work of MiPagesInLoaderBlock, the loop in MmInitializeMemoryLimits and the loop in MiInitMachineDependent.

svn path=/trunk/; revision=53822
2011-09-24 00:12:58 +00:00
Amine Khaldi b1df00f897 [SHELL32_WINETEST]
* Sync to Wine 1.3.29.

svn path=/trunk/; revision=53821
2011-09-23 23:14:50 +00:00
Amine Khaldi 3ed568c40d [PSDK]
* Bring-in some idl changes from Wine. These changes (and the related changes below) are to allow us to sync shell32 tests to Wine 1.3.29.
[UUID]
* CLSID_TaskbarList is no longer needed in here.
[ACTXPRXY]
* Sync with Wine 1.3.29.

svn path=/trunk/; revision=53820
2011-09-23 23:12:53 +00:00
Timo Kreuzer 7ab32f0f5c [NTOSKRNL]
Converting MmLargeStackSize from registry setting to byte value is portable code, move it out of MiInitMachineDependent

svn path=/trunk/; revision=53819
2011-09-23 22:24:11 +00:00
Timo Kreuzer 551ca94879 [FREELDR]
- Use TYPE_OF_MEMORY from the beginning instead of MEMORY_TYPE and later converting it.
- Disable tracing, accidentally comitted in previous revision

svn path=/trunk/; revision=53818
2011-09-23 20:09:54 +00:00
Eric Kohl 2fd4c9a560 [LSASRV]
Initialize required policy attributes when the LSA database is created. This fixes the hanging lsa winetest.

svn path=/trunk/; revision=53817
2011-09-23 18:24:33 +00:00
Timo Kreuzer 5f22a73516 [FREELDR]
Fix some bugs in the code that deals with memory descriptors:
ArcGetMemoryDescriptor was enumerating the bios generated entries first and then the static entries. The latter were conflicting with the former and took precedence when initializing the page lookup table. The problem was, that MmFindLocationForPageLookupTable would use the highest range of pages available. If that range would be conflicting with a following static descriptor, the static would have been ignored. It only worked because on x86 the highest bios descriptor has enough free pages, before it conflicts with a static entry (page 0xfff, marked as unusable), so that the page lookup table could be created.

MmGetAddressablePageCountIncludingHoles enumerated all memory descriptors to find MmLowestPhysicalPage, but it was only counting FreeMemory, thus skipping all other memory ranges. This only worked, due to the previous bug, so that the bios pages shown first took precedence over the following static descriptors. Without the former bug MmLowestPhysicalPage would be 0x100 which would tigger in the next bug:
MmAreMemoryPagesAvailable took the passed address range and looked up all pages in the lookup table to see whether all are free. Now the function didn't check, whether the passed address was below MmLowestPhysicalPage and in case it was, happily accessed the memory below the lookup table. This would result in hal being loaded at 0x40000 overwriting the loader itself.

This is all fixe by implementing a new way of creating the memory map. First there is a static memory map, which has enough free entries to add dynamic ranges. Then AddMemoryDescriptor will allow you to add a new range,
while the already existing ranges will take precedence and the new ranges will be properly split and inserted, so that the resulting map does not contain any overlapping regions and is sorted from low to high pages. The static memory descriptor exists in the architecture specific file.
The code that enumerates the bios information now uses this function to add the ranges on top of the static descriptor.
More cleanup work to follow.

svn path=/trunk/; revision=53816
2011-09-23 17:35:45 +00:00
Giannis Adamopoulos 184aeeeeef [user32_apitest]
- add back showing the index of the message when comparing massage logs

svn path=/trunk/; revision=53815
2011-09-23 16:04:17 +00:00
Giannis Adamopoulos b540c10e9f [user32_apitest]
- Fix build with gcc

svn path=/trunk/; revision=53814
2011-09-23 14:19:40 +00:00
Giannis Adamopoulos d55b76ab43 [user32_apitest]
- Simplify compare_cache and make it show more meaningful results

svn path=/trunk/; revision=53813
2011-09-23 14:09:30 +00:00
Giannis Adamopoulos a947b9c6fc [user32_apitest.rbuild]
- Move shared code used to log window messages in helper.c
- Implement logging hooks
- Fix comparing the logged messages to show the correct line of the test
- Add tests for hooks in TrackMouseEvent test

svn path=/trunk/; revision=53812
2011-09-23 12:05:40 +00:00
Giannis Adamopoulos 34f9dc947a [user32_apitest]
- Fix white spaces

svn path=/trunk/; revision=53811
2011-09-23 11:45:44 +00:00
Thomas Faber 886e0ff173 [KMTESTS/MM]
- Extend MmSection test to include passing different files and mapping a view

svn path=/trunk/; revision=53810
2011-09-23 11:43:02 +00:00
Thomas Faber 8c87bcbc24 [DDK/PSDK]
- Fix several typos. Patch by Elton Chung (elton328 at gmail dot com). Slight compatibility fix by me
- Add missing NTSYSAPI to some externs
- remove Se*DefaultDacl externs from ntifs, as they don't belong there, and are already correctly found in ndk/setypes.h

svn path=/trunk/; revision=53809
2011-09-23 11:24:15 +00:00