Commit graph

43744 commits

Author SHA1 Message Date
Sir Richard 29764be430 [NTOS]: Implement ARM3 version of MmMapViewOfSection, only for ARM3 pagefile-backed sections, and without any special flag support. Tested and works great, with the new pagefault code correctly finding the Prototype PTE for the VAD.
[NTOS]: Make every VAD insert also create a MEMORY_AREA. Now the two address space views should be completely synchronized and we can try removing the hack that was done for PEB/TEB support (which will remove the 200 thread regression).
[NTOS]: Implement MiGetNextNode and MiFindEmptyAddressRangeInTree.

svn path=/trunk/; revision=48997
2010-10-05 14:36:09 +00:00
Aleksey Bragin faa70e3d70 [HEAP]
- Move on to using a real HEAP_LOCK structure for a heap lock.
- Implement kernel-mode counterparts of this lock too. Right now these don't introduce much of a difference, but they are going to be properly used by the new heap manager code.

svn path=/trunk/; revision=48994
2010-10-05 12:42:55 +00:00
Sir Richard 04a028b58e [NTOS]: Add the tiny little bit of code required to correctly handle user-mode faults on ARM3 mapped sections in certain limited scenarios.
svn path=/trunk/; revision=48993
2010-10-05 08:14:02 +00:00
Sir Richard 121276a884 [NTOS]: Delete deprecated handling of MEMORY_AREA_IO_MAPPING. Delete all MEMORY_AREA definitions except the ones for SEGMENT_VIEW and VIRTUAL_MEMORY. All other memory is now owned by ARM3!
[NTOS]: Delete WriteCopyView flag from MEMORY_AREA (unused, and was taking up 4 bytes due to alignment), and add a Vad pointer (takes up 4 bytes -- no actual size change).
[NTOS]: For VM and Section MEMORY_AREAs mapped in user-mode, build a "fake" VAD and insert it into the VAD Root of the Process. This means there is now a consistent view between ARM3 and RosMm in terms of user-mode address space layout, which will come in handy later.
[NTOS]: Destroy the MEMORY_AREA's VAD when the MEMORY_AREA itself is deleted. Watch out for the scenario explained in a previous check-in, where the VAD was caught by the MmCleanProcessAddressSpace vad-cleanup-loop.
[NTOS]: Implement MiInsertVad to restore the old functionality of MiInsertNode when the current parent and insertion result is not yet known. It obtains the information and calls MiInsertNode.

svn path=/trunk/; revision=48992
2010-10-05 05:07:13 +00:00
Sir Richard 4499f604f5 [NTOS]: Add a _64K macro definition so we can stop typing out 65536 all the time.
svn path=/trunk/; revision=48991
2010-10-05 05:01:15 +00:00
Sir Richard 46b0236d75 [NTOS]: Use the Spare flag in the VAD as a ReactOS/MemoryArea specific flag to signify that this VAD is associated with a MEMORY_AREA and should be unlinked at process exit, but not freed. This is because MemoryAreas themselves are cleaned up later, and in the future their associated VADs (not yet in Trunk) will also be parsed. In the process death scenario, those VADs will be freed, but not unlinked (since it would already have been unlinked).
svn path=/trunk/; revision=48990
2010-10-05 05:00:19 +00:00
Sir Richard b5e84d5641 [NTOS]: Nobody uses MEMORY_AREA_SYSTEM anymore, call these MEMORY_AREA_OWNED_BY_ARM3 for now. We'll have to sync this code with x86 later anyway.
svn path=/trunk/; revision=48989
2010-10-05 04:58:26 +00:00
Sir Richard 35beef2751 [NTOS]: Nobody actually writes TRUE for WriteCopyView in the MEMORY_AREA data structure, so this field is useless (always false). Remove all instances of its use.
svn path=/trunk/; revision=48988
2010-10-05 04:57:32 +00:00
Sir Richard fe408085b7 [NTOS]: We don't support SEC_BASED for ARM3 sectios either, ASSERT that.
svn path=/trunk/; revision=48987
2010-10-05 04:56:04 +00:00
Sir Richard d2d2aa1188 [NTOS]: Nobody reads/checks for MEMORY_AREA_CACHE_SEGMENT. Might as well just call this zero (no logical change).
svn path=/trunk/; revision=48986
2010-10-05 04:53:32 +00:00
Giannis Adamopoulos dc6b43fdc5 [win32k]
- Reduce duplicated code in co_UserCreateWindowEx, co_IntSetParent and co_WinPosSetWindowPos
- based on wine

svn path=/trunk/; revision=48982
2010-10-04 21:44:58 +00:00
Sir Richard 7c8612ecb3 [NTOS]: Implement MiMapViewInSystemSpace, all it took was another 250 lines and we can now map ARM3 sections into memory. Accessing them causes a fault, which we correctly handle with the prototype PTE fault code.
[NTOS]: Added a bogus allocation flag that can be used with Nt/MmCreateSection and MmMapViewInSystemSpace to take the ARM3 path instead. Only for internal testing at the moment.
Now we need to look at how to allow mapping these into user-space as well...

svn path=/trunk/; revision=48981
2010-10-04 20:19:03 +00:00
Sir Richard b45cdc574c [NTOS]: Implement MmCreateArm3Section, which creates ARM3-backed sections, but only for pagefile-backed memory at the moment. It uses MiCreatePagingFileMap and creates the expected Segment, Subsection, ControlArea and Section objects described in Windows kernel internals literrature. It's surprisingly easy and only takes 200 lines of code.
svn path=/trunk/; revision=48980
2010-10-04 19:31:16 +00:00
Sir Richard 5518b60eac [NTOS]: Implement/fixup the code paths during page faults that are needed to succesfuly resolve a demand page associated with a pagefile backed ARM3 section (which uses Prototype PTEs). A lot of the code was already there but assumed we were using Prototype PTEs only for the shared user data page. By combining that code with the typical demand-zero fault code, we obtain the needed paths. For now, only tested with ARM3 sections that are page-filed backed (not image or data-file backed) mapped into system view space (MmMapViewOfSectionInSystemSpace), not user-mode addresses (which need VADs). The code to actually create/map these doesn't exist in trunk yet, the purpose of this checkin is to test the new fault changes to make sure they don't cause negative effects to already-working faults.
svn path=/trunk/; revision=48979
2010-10-04 18:51:07 +00:00
Sir Richard 9dc0c0d12a [NTOS]: Initialize system views by calling MiInitializeSystemSpaceMap. This sets up the lock, bitmap, and hash table.
svn path=/trunk/; revision=48978
2010-10-04 18:36:37 +00:00
Sir Richard 566335dd79 [NTOS]: Define MI_MAKE_PROTOTYPE_PTE macro to make a real prototype PTE from a PTE. Define counter-part MiProtoPteToPte to recover the true PTE from a given Prototype PTE.
[NTOS]: Define MI_PTE_LOOKUP_NEEDED instead of using 0xFFFF. The name was found in checked build assertion strings.
[NTOS]: Add MM_VIEW (used for System-mapped Section Views) and MM_SESSSION (used to define the system/session view mappings) structure definitions.

svn path=/trunk/; revision=48977
2010-10-04 18:34:41 +00:00
Sir Richard ee353ad690 [NTOS]: Go ahead and now fill out the OriginalPte field for PFNs initialized with MiInitializePfn(ForOtherProcess). They should only belong to ARM3 so they'll never have SwapEntry/RMAP associated with them. This functionality is important for future Prototype PTE support, among other things, as it lets us get the original PTE value written for a given PFN entry.
svn path=/trunk/; revision=48976
2010-10-04 18:22:50 +00:00
James Tabor 251be92abf [PSDK] - Add more track popup menu types.
svn path=/trunk/; revision=48975
2010-10-04 15:41:25 +00:00
James Tabor aea07215a8 [Win32k]
- Fixed ValidateTimerCallback, always returning true and just spinning in the loop.
- Add one more process information flag with a point type and capturing the hit test in desktop structure.

svn path=/trunk/; revision=48970
2010-10-03 19:18:19 +00:00
Cameron Gutman e14624d8ca [NDIS]
- Disable timer queuing code (hackfix for various network driver failures)
- Also needs to be merged into 0.3.12

svn path=/trunk/; revision=48968
2010-10-03 15:18:57 +00:00
Sir Richard b01fc3d9a7 [NTOS]: Move all the Nt*Section API interfaces into ARM3 and rewrite most of the code to perform the same parameter validation and input checks as Windows does. Support all protection masks. Use correct section object access mask. Use appropriate SEH where needed. Pass 0-initialized local instead of NULL when needed. Don't assume certain parameters are OPTIONAL when they are not. Don't return SEH failures at the end of the system call, the kernel usually returns the result of the system call proper. Call DbgkMapViewOfSection in scenarios where it would not have gotten called before. Protect against certain kinds of kernel-mode access from user-mode.
[NTOS]: Move unimplemented Mm*Section APIs into ARM3 as well.

svn path=/trunk/; revision=48959
2010-10-02 02:14:39 +00:00
Sir Richard 706c5f3899 [PSDK]: Add missing SEC_XXX definitions for Server 2003 (Vista ones still missing).
[KERNEL32]: NtCreateSection should not be called with merely SEC_FILE: this says nothing about what kind of operation should be done (a commit, a reserve, etc?). Use SEC_COMMIT instead to specify correct operation. This works in ReactOS as of now, but would've failed after the NtSection* API rewrite.
[KERNEL32]: CreateFileMappingW should also accept/allow SEC_LARGE_PAGES, even if we don't suppport it yet.

svn path=/trunk/; revision=48958
2010-10-02 01:12:53 +00:00
Matthias Kupfer 93a1ceb834 Yugoslavia no longer exists for some time, replaced by Serbia as successor of country code (phone)
svn path=/trunk/; revision=48955
2010-10-01 19:54:27 +00:00
Johannes Anderwald a53b8966ba [VIDEOPRT]
- Add sanity checks
- Implement VideoPortGetCommonBuffer, VideoPortLockPages


See issue #5629 for more details.

svn path=/trunk/; revision=48954
2010-10-01 17:43:03 +00:00
Jérôme Gardou 2374c7cb8d [XCOPY]
- Fix compilation with msvc
1. Someone should send this to wine (this is NOT lazyness)
2. Someone should tell mingw dev about http://msdn.microsoft.com/en-us/library/aa381050%28v=VS.85%29.aspx

svn path=/trunk/; revision=48948
2010-09-30 21:45:36 +00:00
Daniel Reimer 1a753c8708 Anti Oracle Movement has begun. Adding go-oo and LibreOffice to rapps.
svn path=/trunk/; revision=48943
2010-09-30 18:47:32 +00:00
Jérôme Gardou ffeeddd5ee [DOSKEY]
- Fix compilation with msvc by GetProcAddress'ing undocumented functions
  - TCHAR -> WCHAR in the process

svn path=/trunk/; revision=48942
2010-09-30 18:45:58 +00:00
Sir Richard efefc97901 [NTOS]: This is why you shouldn't let Antoine Dodson commit code.
svn path=/trunk/; revision=48941
2010-09-30 14:48:03 +00:00
Sir Richard febd117a3b [NTOS]: He's climbing in yo PFN database, he snatching yo pages up, tryin to page em so y'all need to hide your pool hide your cache, and hide your working set cuz they grabbin' all the pages out there. We gonna page you, we gonna page you, so you can run and fault on that, run and fault on that, home boy, homeboy, home homeboy.
Enable ARM3 Paged Pool and remove all related deprecated code. Install tested on several VMs, it might cause new regressions. Let's fix them before 0.3.13 instead of reverting.

svn path=/trunk/; revision=48940
2010-09-30 04:40:31 +00:00
Sir Richard 40ba0f9329 [NTOS]: Use SYSTEM_PD_SIZE instead of assuming that this is PAGE_SIZE, since this is not the case on (future) ARM and (current) AMD64 ports.
[NTOS]: Remove some magic numbers in the pool code, using PTE_COUNT, MiAddressToPde, when needed. Also, the expansion code uses PDEs, not PTEs, so differentiate this, because on some systems (ARM), there are different structures for both.
[NTOS]: Use MI_WRITE_INVALID_PTE.
ARM3 paged pool now works, the expansion bug has been fixed (and the code is more portable). Expect to see it gradually enabled soon.

svn path=/trunk/; revision=48939
2010-09-30 03:26:13 +00:00
Sir Richard 39ab07fe2a [NTOS]: MiSetConsumer no longer achieves anything. Remove it.
svn path=/trunk/; revision=48938
2010-09-30 03:21:02 +00:00
Sir Richard eaff9c1e8c [NTOS]: Add definition for size of a page directory, and size of all page directories required per process (some architectures have more than one page directory per process/address space).
svn path=/trunk/; revision=48937
2010-09-30 03:18:44 +00:00
Sir Richard 80d5d95d72 [NTOS]: Fix a bug in MiRemoveAnyPage: it was always checking the colored zero page list, instead of checking the colored free page list the second time around.
svn path=/trunk/; revision=48936
2010-09-30 03:17:14 +00:00
Pierre Schweitzer a14c76d2c8 [PSDK]
Fixed build

svn path=/trunk/; revision=48935
2010-09-29 22:54:00 +00:00
Aleksey Bragin 24e16c3ff8 [REGE[REGEDIT]
- Katayama Hirofumi: Don't leak open handles to keys.
- Katayama Hirofumi: Misc code changes/ cleanup.
See issue #5547 for more details.

svn path=/trunk/; revision=48934
2010-09-29 21:52:16 +00:00
Aleksey Bragin 26adfda6bd [REGEDIT]
- Katayama Hirofumi: Unicodify regedit, add support for import/export of v5 reg files. Based on Wine regedit.

svn path=/trunk/; revision=48933
2010-09-29 21:43:39 +00:00
Pierre Schweitzer 219137196e [KMTEST]
Added a small testcase for FsRtlIsNameInExpression(). It's quite relevant for daily and simple use of the function. It shouldn't fail on ReactOS given our current implementation.

svn path=/trunk/; revision=48932
2010-09-29 21:42:11 +00:00
Aleksey Bragin 5ea7ca5562 PSDK
- Edison Henrique Andreassy <ehasis@hotmail.com>: Add FILEMUIINFO definition.
See issue #5640 for more details.

svn path=/trunk/; revision=48931
2010-09-29 21:32:56 +00:00
James Tabor 0922c986a4 [Win32k]
- Return the correct complexity, pass all user32 wine test_winregion tests.

svn path=/trunk/; revision=48930
2010-09-29 05:23:15 +00:00
James Tabor 658175b3a0 [Win32k]
- Fix future wine sync user32 win test for get process default layout with null parameter.

svn path=/trunk/; revision=48929
2010-09-29 02:29:33 +00:00
Cameron Gutman be6788e54b [ACPI]
- Fix ACPI warnings
- Based on a patch by Love Nystrom

svn path=/trunk/; revision=48928
2010-09-29 02:16:18 +00:00
Sir Richard 14f8621042 [NTOS]: Add MiRemoveZeroPageSafe helper function, when a zero page is required, but the inline zeroing of MiRemoveZeroPage is not. This function will only try grabbing a zero page if one exists, otherwise a free page will be grabbed and zeroed with custom code of the caller's choosing.
[NTOS]: Add concept of process color and system color. Compute correct color to use whenever requesting a page.
[NTOS]: Uncondtionally enable the color code when inserting/removing pages.
For now, when requesting a page, colors are still ignored, and the global PFN lists are scanned instead. If there are no regressions, we are one patch away from that.

svn path=/trunk/; revision=48927
2010-09-29 01:10:28 +00:00
Sir Richard 71e8fc824b [NTOS]: Fix straggling bugs in color table algorithms.
[NTOS]: Enable color tables! Right now pages are merely entering and exiting the tables, the tables themselves are never used for allocations. This will change with further commits.

svn path=/trunk/; revision=48926
2010-09-29 00:13:09 +00:00
Sir Richard f41dde713f [NTOS]: Write missing color code in certain PFN functions, and fix existing code where needed. Add some debugging. For now, turned off until testing succeeds.
[NTOS]: Redocument which MMPFN fields are violated by ReactOS-internal values. This has gotten much better than before.

svn path=/trunk/; revision=48925
2010-09-28 22:41:46 +00:00
Amine Khaldi 119639a212 [FONTS]
- Update RedHat Liberation Fonts to 1.06
- Update Tahoma Fonts To Wine HEAD
- Update DejaVu Fonts Documentation To 2.31
See issue #5632,5633,5634 for more details.

svn path=/trunk/; revision=48924
2010-09-28 17:19:52 +00:00
Amine Khaldi 1e65804aea [USETUP]
- Update Estonian translation by anthrax11.

See issue #5625 for more details.

svn path=/trunk/; revision=48923
2010-09-28 17:12:46 +00:00
Sir Richard 05d3392da9 [NTOS]: Switch to using an ARM3, much more correct MmZeroPageThread. Stub support for discarding sections and listening to the Power Manager Idle Timer.
[NTOS]: Use a synchronization (auto-reset) instead of notification event for the zero page thread, this way we don't have to reset it manually and query its state. Instead, a boolean MmZeroingPageThreadActive is checked instead.
[NTOS]: Once we switch to colored lists, major improvements can be done for speed.

svn path=/trunk/; revision=48922
2010-09-28 16:47:25 +00:00
Sir Richard 6ef328578c [NTOS]: The RMAP entry only has a valid process if the address is in user-space, otherwise process is NULL. Only attempt to acquire the process rundown lock if a process actually exists. Fixes crashes caused by 48905.
svn path=/trunk/; revision=48921
2010-09-28 16:44:18 +00:00
Sir Richard 5b9cd7fcae [NTOS]: Zeroed pages should go at the front, not the back of the zero list. Going to the back is a special boot-only case on MP, which isn't supported. Implement zero-only version of MiInsertPageInList, remove MiInsertZeroPageAtBack.
[NTOS]: Remove many other deprecated functions. Physical memory consistency should now be higher than in the past.

svn path=/trunk/; revision=48919
2010-09-28 14:38:30 +00:00
Sir Richard 354ad6b9eb [NTOS]: One last fix to the zero page thread before we move to ARM3: use MiRemoveAnyPage instead of dangerous MiRemoveHeadList. The code works on the assumption (validated by Windows through a bug check) that MiRemoveAnyPage always returns the first free page, and we also manually grab the first free page, and compare this is true. Nice way to detect PFN database corruption.
[NTOS]: Fix MiInsertZeroAtBack to increment the MmAvailablePage count, since MiRemoveAnyPage decrements it (MiRemoveHeadList did not).

svn path=/trunk/; revision=48918
2010-09-28 14:29:37 +00:00