Commit graph

29658 commits

Author SHA1 Message Date
Daniel Reimer 0d5a01f9a8 Seems like there got one string lost... fixed now. Thx to Kario for noticing.
svn path=/trunk/; revision=32409
2008-02-17 21:57:55 +00:00
Sylvain Petreolle 3a1cc7da3f french usetup translation update
see complete filenames when "Copying file :"

svn path=/trunk/; revision=32408
2008-02-17 19:56:37 +00:00
Filip Navara 24153f3ee9 Fix some typos.
svn path=/trunk/; revision=32407
2008-02-17 19:39:28 +00:00
Daniel Reimer 5ff1cb40f4 Bug 3070: Ukrainian translation update by Artem Reznikov - temarez@yandex.ru
Bug 3078: czech translation for solitaire by radekliska@gmail.com
Bug 3083: usetup update by Paolo Devoti - devotip@tiscali.it
Added the English Strings to all USETUP Resources and activated these. This makes translating easier.
Renamed German to Deutsch and Russian to Russkij, which seems like it does not work... (thx to Caemyr anyway)

svn path=/trunk/; revision=32406
2008-02-17 18:05:08 +00:00
Aleksey Bragin 750bf31ad3 - Fix a bug, when the page first was marked as free and put into free pages list to zero out, and then was marked as used for PFN database, but *not* removed from that list! Certainly it was zeroed out later, introducing a corruption within the free list and a pagefault.
- This revision completely removes hacks introduced in 32386.
See issue #3076 for more details.

svn path=/trunk/; revision=32405
2008-02-17 16:24:24 +00:00
Gregor Brunmar aa6f9c2d05 Fixed duplicate typedef in DirectX headers for real this time :)
svn path=/trunk/; revision=32404
2008-02-17 14:51:26 +00:00
Gregor Brunmar 751b0ea821 Fixed duplicate typedefs in DirectX headers
svn path=/trunk/; revision=32403
2008-02-17 14:40:23 +00:00
Gregor Brunmar aea05840ef Oops, removed OsThunkD3dDrawPrimitives2 from d3d8thk.h.
svn path=/trunk/; revision=32402
2008-02-17 13:42:02 +00:00
Gregor Brunmar df7c6698f8 * Updated d3d headers to make it possible to include both d3d and d3d9 at the same time.
* Updated d3dhal.h to support DirectX 9
* Fixed broken d3dnthal.h
* Fixed missing structures in d3d8thk.h

svn path=/trunk/; revision=32401
2008-02-17 13:34:59 +00:00
Aleksey Bragin e86380de7f - Zero early-allocated pages for PFN DB itself, as suggested on the ros-dev mailing list, and hyperspace mapping seems to work, at least on x86. Fixes the "warm reboot-bug" in 2nd stage.
svn path=/trunk/; revision=32400
2008-02-17 13:08:28 +00:00
Colin Finck cc6beed26a - Only add a command for deleting the proxy makefile, when one was really generated.
Should fix all those "Error 1 (ignored)" warnings (if there aren't even more problems ;-)
- Include <algorithm> in modulehandler.cpp. Fixes compilation with MSVC.
- Add _CRT_SECURE_NO_WARNINGS to the MSVC project file to disable a bunch of MSVC warnings.

svn path=/trunk/; revision=32399
2008-02-16 23:45:23 +00:00
Colin Finck de244cca92 [FORMATTING]
- 2 spaces --> 4 spaces
- some other changes to make the code style consistent with most ROS code
- Change in the .rbuild file to treat warnings as errors (the lib currently doesn't spit out any warnings, so it shouldn't do in the future)

svn path=/trunk/; revision=32398
2008-02-16 23:07:40 +00:00
Colin Finck 9cd6c52bd6 Fix 64-bit build (again.. :-/)
svn path=/trunk/; revision=32397
2008-02-16 22:49:52 +00:00
Colin Finck 9f5d2684e0 /Wp64 and __w64 are deprecated beginning with Visual C++ 2008.
Remove the /Wp64 switch from the cabman project file (no idea why it was enabled anyway ;-) and the _W64 macros from the code.

svn path=/trunk/; revision=32395
2008-02-16 22:21:59 +00:00
Daniel Reimer c87abac6d8 Once more... make it possible to translate usetup COMPLETELY. (I hope this time I am right....)
svn path=/trunk/; revision=32392
2008-02-16 18:58:05 +00:00
James Tabor d04bc15143 - Patch by Stefan Ginsberg (stefan__100__ AT hotmail DOT com): Removed NtGdiStretchDIBits and NtGdiAddFontResource. Replaced with correct API.
svn path=/trunk/; revision=32391
2008-02-16 18:14:36 +00:00
Dmitry Chapyshev 8776390d01 - Add Arabic and Czech languages to list
svn path=/trunk/; revision=32390
2008-02-16 17:36:34 +00:00
Dmitry Chapyshev c066249bd7 - Add small checking
- Fix formating

svn path=/trunk/; revision=32389
2008-02-16 17:28:58 +00:00
Dmitry Chapyshev a8bcd72318 - Add libpng 1.2.24 (from libpng.org)
svn path=/trunk/; revision=32388
2008-02-16 16:23:33 +00:00
Dmitry Chapyshev 80065596da - Update Russian translation
svn path=/trunk/; revision=32387
2008-02-16 15:26:00 +00:00
Aleksey Bragin d9fead36b6 - Add a hacked and incorrect (due to absence of checking for BIOS-reserved memory areas) MiInitializePageList from 32371. This allows 1st stage to work, and 2nd stage to work from the first power up.
- Real, new, [bugless] MiInitializePageList is #if0-#endif'ed until a problem in it is identified and fixed.

svn path=/trunk/; revision=32386
2008-02-16 14:56:56 +00:00
Gregor Brunmar 6fc7a4d3a5 Implemented IDirect3D::GetDeviceCaps()
svn path=/trunk/; revision=32385
2008-02-16 11:17:46 +00:00
ReactOS Portable Systems Group 8a623c61d3 On systems with large enough memory (or lots of drivers already loaded), we actually need another PDE to hold the new PTEs to represent the PFN database, since we go past the initial PDEs that come from FreeLDR. On those systems, we would try allocating a new page to hold the PDE, and crash, since the PFN database isn't setup. We now have an MmAllocPageEarly routine which is called during Mm bootstrapping to resolve this issue.
svn path=/trunk/; revision=32383
2008-02-15 20:52:36 +00:00
Daniel Reimer 8f7384d246 Bug 3053: some slovak translations by Mário Kaèmár - kario@szm.sk
svn path=/trunk/; revision=32382
2008-02-15 19:36:22 +00:00
Daniel Reimer f82a51ce35 Bug 3053: some slovak translations by Mário Kaèmár - kario@szm.sk
svn path=/trunk/; revision=32381
2008-02-15 19:25:36 +00:00
Johannes Anderwald 1950c903e3 - taskmgr improvements by Carlo Bramix
See issue #3075 for more details.

svn path=/trunk/; revision=32380
2008-02-15 19:22:55 +00:00
ReactOS Portable Systems Group 34e64ee87b We now define KUSER_SHARED_DATA per architecture, since the address isn't portable. Now SharedUserData works on ARM.
Implemented KeAcquireInSTackQueuedSpinLock, KeAcquireInStackQueuedSpinLockRaiseToSYnc and KeReleaseInStackQueuedSpinLock based on x86 UP versions.
On ARM, the PCR is fully exposed, so some APIs are always-inlined direct-memory-access (unlike x86 which has the fs selector, and undocumented parts of the PCR). This means we can define several macros -- fixed the headers to allow this, by defining the previous stuff for x86 only.
Setup registry data in the ARM loader block.
The ARM port boots all the way through ExpInitializeExecutive until reaching MmInit1. The boot-registry is correctly loaded and parsed, as are NLS files!

svn path=/trunk/; revision=32379
2008-02-15 19:01:45 +00:00
Johannes Anderwald 9d172977d3 - declare variables as extern
- release desktop dc


See issue #3052 for more details.

svn path=/trunk/; revision=32378
2008-02-15 18:42:24 +00:00
Daniel Reimer 1e4d38ca34 Synched winhelp and wordpad to Wine 0.9.55.
To the translators that translated winhelp to Greek, Lithuan, Portugese and Ukrainian. Can you please send your translations to winehq? I will keep them anyway, but this way its easier to keep synched.

svn path=/trunk/; revision=32377
2008-02-15 15:04:14 +00:00
ReactOS Portable Systems Group e38c335520 We now setup NLS data in the loader block, as well as setup the minimal loader block extension fields to pass ExpIsLoaderValid validation.
svn path=/trunk/; revision=32376
2008-02-15 07:45:37 +00:00
ReactOS Portable Systems Group 4757f67815 Sync with X86 build -- don't call MmInit1 so early anymore.
svn path=/trunk/; revision=32375
2008-02-15 07:44:42 +00:00
ReactOS Portable Systems Group 581d7a7972 Remove Ke386Pae conditionals from page code -- PAE is never turned on ReactOS (and probably wouldn't work), so there's no point in wasting CPU cycles and making the code even more unredable by having the PAE code there.
The PAE implementation has been moved to pagepae.c, in case someone will ever want to revive.
Even in that case, it's recommended to build two kernels like everyone else does, instead of doing runtime conditionals for every single page operation.

svn path=/trunk/; revision=32374
2008-02-15 06:53:49 +00:00
ReactOS Portable Systems Group 793e31e8de Christ! Don't zero out the shared memory page during Virtual Memory initialization! The page is already well in-use by the time we were zeroing it out, and this is also the reason why all the attempts to move MmInit1 into MmInitSystem had previously failed -- the NtSystemRoot path would get written during initialization (But before MmInitSystem), and MmInit1 would then zero out the entire structure.
Not only does this allow us to do MmInit1 in MmInitSystem, where it should be, but it also fixes the fact that several KUSER_SHARED_DATA flags were being zeroed out.
As an added benefit, ARM/PPC ports now need to worry about Mm much later then before (well after the HAL has initialized and interrupts are enabled).


svn path=/trunk/; revision=32373
2008-02-15 06:49:59 +00:00
ReactOS Portable Systems Group 63cd339c0c Get rid of complete hack that MmInitializePageList was, and use the ARC Memory Descriptor Tree instead. No more magical assumptions about page numbers. No more BIOS Memory Map from FreeLDR. No more hard-coded/static addresses being pased from the bowels of FreeLDR to the kernel.
"Oh my God, I can't believe this is real."
We can now continue the ARM port since the ARM port uses real ARC memory descriptors and not the completely hacked up pages the kernel was previously crossing its fingers to get. As a side effect, this probably unblocks the final hurdle to get ReactOS booted by NTLDR.

svn path=/trunk/; revision=32372
2008-02-15 01:19:46 +00:00
ReactOS Portable Systems Group f19e397250 Fixed several off-by-one errors when playing with the PFN database array size. Among other things, certain valid pages would be considered invalid, and also the PFN database wouldn't be properly erased on startup (which would result in a crash after a warm reboot or restarting the emulator).
svn path=/trunk/; revision=32371
2008-02-15 01:04:22 +00:00
ReactOS Portable Systems Group d6cd3275f2 Remove accidentally enabled debugging function, and apply the FreeLDR 6MB hack when building the ARC Memory Descriptor List as well. This will reflect the memory in use (thus representing the ARC-based glorious hack) when parsing the memory descriptor list, something we'll soon have to do in MmInitializePageList.
svn path=/trunk/; revision=32370
2008-02-15 00:50:26 +00:00
ReactOS Portable Systems Group cb5d314ff3 Fixed some bugs we introduced by incorrectly double-accounting the PFN database. The database is *virtually* continous and follows the kernel address region, but not physically -- physically, it is at the very far end of memory.
Unfortunately, fixing this bug now caused any unused memory in the  FreeLDR-mapped region of 6MB to appear...well...unused. This would normally be a good thing, except ReactOS started crashing.
We fixed it by applying the Glorious Hack. See freelist.c:359.

svn path=/trunk/; revision=32369
2008-02-15 00:31:18 +00:00
ReactOS Portable Systems Group 131f74225c Review and fix the buildingg and mapping of boot-time kernel address space.
The selection of the non-paged pool base address was broken (ion's comment was correct, but his implementation was not) -- NP pool now follows the PFN, or end of FreeLDR mapping area.
There was no reason to put paged pool at a 4MB boundary away from NP pool -- it now follows it immediately.
Got rid of multiple values which were calculated 3, even 4 times in a row, or even values that were calculated but never used (such as kernel_len).
Got rid of the shuffling back and forth of kernel and virtual start/end addresses. A global now keeps track of this, and MmInit1 is now solely responsible for assigning addresses to each kernel region.
Added new debug routine to show the kernel regions mapped -- enabled by default for now to visually detect any problems (once ReactOS's drivers go over 6MB, there may be).

svn path=/trunk/; revision=32368
2008-02-14 23:39:31 +00:00
ReactOS Portable Systems Group 6b9215e607 The system never considered "ReservedPages" as any different from "SystemPages", other than to spend the accounting time to mark these pages differently. Removed the notion of a reserved pages and count them as system pages instead.
svn path=/trunk/; revision=32367
2008-02-14 22:34:50 +00:00
Daniel Reimer 3d1fd7beda reactivate kdbg.
svn path=/trunk/; revision=32366
2008-02-14 22:02:57 +00:00
ReactOS Portable Systems Group c47af2fcdf Don't allow code to access the PFN database directly -- instead, always go through MiGetPfnEntry to have a controlled path.
Add assertions to this function, to make sure PFN access is always valid (previous code would sometimes KEBUGCHECK(0) without a real explenation if such cases were encounted -- but developers randomly chose which functions would be protected).
Also, since PFNs are 0-based, do allow Pfn == MmPageArraySize if someone is reading the last PFN on the system.
Finally, protect some of the functions which were accessing the PFN entries outside the PFN list lock.

svn path=/trunk/; revision=32365
2008-02-14 21:19:30 +00:00
ReactOS Portable Systems Group 93c66fb50d One would expect that a function called "MmIsUsablePage" would return whether a not a page is usable. In other words, we are making sure that the page is free/available, so that we may make use of it. Apparently not so -- MmIsUsable page returned if a page was NOT usable, but was instead "already used". The caller's wish was to ensure he was correctly using a used page, not to check if he could start using a usable page. This would just be an annoying gramatical/logic error (but makes "sense" in the way it's used), if it weren't for the fact that MmIsUsablePage also returned TRUE for BIOS pages (which meant, "yes, you are correctly using/overwriting memory we spent time ensuring to mark as reserved/BIOS").
Renamed the function to MmIsPageInUse, and only return TRUE if the page is in use. Like the name says.

svn path=/trunk/; revision=32364
2008-02-14 20:30:31 +00:00
Aleksey Bragin bf3c65f8a3 - Load drivers database (AppPatch/drvmain.sdb), so Windows could use it if needed.
svn path=/trunk/; revision=32363
2008-02-14 20:27:59 +00:00
ReactOS Portable Systems Group 99b1ac6cb9 Fix a couple of off-by-one bugs we recently introduced -- PFNs are one of the only indexes which are actually 0-based, so you really want to loop from 0 to the last page, inclusive (unlike most loops where you would stop *before* the last element index).
svn path=/trunk/; revision=32362
2008-02-14 20:20:44 +00:00
ReactOS Portable Systems Group ee3729d613 Stop lying that the PCR, KUSER_SHARED_DATA, and PDEs are "BIOS" pages, they're USED pages.
Stop initializing fields to 0 if we've already cleared the entire array!
Stop setting arbitrary values for MapCount and ReferenceCount -- both the KPCR, KUSER_SHARED_DATA and PDE are mapped!
Stop saying Video ROM has a reference count, it's the same as BIOS memory, except the MiIsPfnRam function doesn't detect it and we have a hack for it.

svn path=/trunk/; revision=32361
2008-02-14 20:03:33 +00:00
ReactOS Portable Systems Group b4a63ba74a Prepare for getting rid of the Freelist hacks and use memory descriptors instead, by detecting the highest free memory descriptor, and allocating the page array PTEs from there (gets rid of the "LastPage" variable).
svn path=/trunk/; revision=32360
2008-02-14 19:24:02 +00:00
ReactOS Portable Systems Group 7ca0ac88f8 We were looping the memory descriptors in order to find the number of pages that are available to the system, that is to say, your RAM, minus pages that the BIOS said belong to it. This part is good. Next up, we were creating the page array for these pages, up to the highest entry, which we called, the number of pages on the system. This is the problem. Suppose we had 1000 pages somewhere in low memory that were used by the BIOS, we'd now call the total pages RAM - 1000 (correct). However, we'd also set the highest page array entry to RAM - 1000, which is wrong, because esssentially this eats up 10MB of memory, since the top 10MB (which are FREE, usable memory) are never entered into the database. So really, what we want to do is differentiate the TOTAL amount of usable RAM, versus the HIGHEST page that is usable (which is actually what should be the highest entry in the page array). This will reclaim the lost RAM ReactOS has been eating up all these days. But it gets better: eventually, someone noticed ReactOS was eating memory, and added 1MB more to the "total", making the highest entry "1mb higher". This ...kind of... fixes the problem above by giving you one more MB, but what if ReactOS was only eating up 150KB, as was more the case? Then ReactOS would believe that the other 850KB of memory are "Free physical memory", when actually, they're pages that don't even exist. Wow!
Fixed these bugs.

svn path=/trunk/; revision=32359
2008-02-14 18:33:38 +00:00
ReactOS Portable Systems Group 4f337a6db1 Why divide up the page array into chunks of 128 pages? Why have a nested loop to initialize system memory in chunks of 128 pages? Why zero the array entries in chunks of 128? The page array is now initialized by simply iterating every page on the system, and filling out its entry in the array.
Moved out the division calculations even one more step out of the loop -- now they're really calculated once, instead of 1000 times (an improvement over the 400000 times they were calculated previously).

svn path=/trunk/; revision=32358
2008-02-14 16:59:14 +00:00
ReactOS Portable Systems Group 0ef4d8dcdd Don't loop the page array list THREE times to set it up, ONCE is plenty enough!
Remove the incomprehensible PFN allocation being done for the pages holding the page list array. We now: 1) Find the highest usable RAM page 2) Allocate the PTEs to hold the array from that point on and lower.
Don't do expensive divisions for every single page on the system being looped! Precompute the values ONCE.
Don't set the reference count for the KPCR and KUSER_SHARED_DATA to 0, these are LIVE pages!
Removed the hack which pre-initializes the balancer -- this isn't needed anymore since the initial PTEs are allocated always from RAM now.
Add some comments about the assumptions being made in this code regarding all PCs having the same kind of memory maps.

svn path=/trunk/; revision=32357
2008-02-14 16:40:32 +00:00
ReactOS Portable Systems Group 81d636ae70 The Memory Manager design dictated that every page must be on a linked list, so that it can be removed from that list when dereferenced, and inserted on the free list. This wasn't optimal, because the UsedPageListHead was actually not used for anything else than working set and user-page LRU. Nevertheless, every single page on the system would be on a list (such as the non-pool memory list), even if those lists were ignored. Those lists are all gone now, replaced by the UsedPageListHead. Likewise, the BIOS page list has also been removed.
svn path=/trunk/; revision=32356
2008-02-14 15:36:12 +00:00