Commit graph

40970 commits

Author SHA1 Message Date
Aleksey Bragin 3d83b18cf3 - Don't prepend fastcall forward's target with @. Fixes binding issues in videoprt, thanks to Olaf Siejka for identifying the issue.
svn path=/trunk/; revision=45639
2010-02-20 22:53:11 +00:00
Sir Richard 23323a7250 [NTOS]: Make MM init read MmProductType to determine what SKU of ReactOS this is, instead of assuming Server. If you want to go back to the old behavior, you need to change "WinNT" to "ServerNT" in the hivesys under Product Type.
[NTOS]: Configure the MmSystemSize variable properly based on SKU and RAM. Previously, ReactOS told all drivers and applications you were running on a system with < 13MB RAM.
[NTOS]: Initialize thresholds for low and high memory (in pages), low and high paged pool memory, and low and high nonpaged pool memory. These are described in the source.
[NTOS]: Initialize events for each of those thresholds, and populate the \KernelObject\xxxCondition events that are documented in MSDN for driver and app developers.
[NTOS]: Define some internal thresholds to use later, representing the minimum number of free pages under we go berserk, and the minimum number of free pages that we consider "plenty".
[NTOS]: Rename MiRemoveFromList to MiUnlinkFreeOrZeroedPage (Windows name). Make the function handle MmAvailablePages decrement, instead of having the caller do it.
[NTOS]: Remove run-time initialization of the PFN lists, just initialize them statically (also fixes the fact we forgot to initialize their names).
[NTOS]: Move some more initialization code to ARM3 instead of mm.
[NTOS]: Read ProductType from registry into MmProductType instead of dummy value. Remove duplicate "Mirroring" variable read.

svn path=/trunk/; revision=45638
2010-02-20 21:48:36 +00:00
Eric Kohl 697374c8e1 [SERVICES]
Disable a number of debug messages in the service manager.

svn path=/trunk/; revision=45637
2010-02-20 20:52:14 +00:00
Eric Kohl c6d4485959 [ADVAPI32]
Silence a lot of non-critical service manager error messages (ERR->TRACE).

svn path=/trunk/; revision=45636
2010-02-20 16:33:28 +00:00
Sir Richard 60f00192eb [NTOS]: Remove SwapEntry parameter from MmAllocPage since it was always zero.
[NTOS]: Store SwapEntry as WsIndex. We can do this now since Flink is only used when the page is in a list (meaning it's not active, ie. free or zero), and non-active pages don't have a swap entry.

svn path=/trunk/; revision=45635
2010-02-20 14:47:23 +00:00
Sir Richard 6118ff6a3c [NTOS]: Manage the PFN lists using the correct Flink/Blink semantics of the MMPFN structure, instead of typecasting a LIST_ENTRY on top of Flink and PteAddress. This allows PteAddress to be used now, and minimizes the number of differences between MMPFN and the ReactOS PHYSICAL_PAGE.
[NTOS]: Zero pages starting at the head of the free list, insert them at the back.
[NTOS]: Add MiInsertPageInFreeList to build the colored lists (not yet used) in the ARM3 PFN database.
[NTOS]: Rename the ReactOS PFN lists for free/zero to their real names as used in Windows.

svn path=/trunk/; revision=45634
2010-02-20 14:40:21 +00:00
Eric Kohl ad0ec3b76b [SERVICES] When autostart services are up, signal an event.
[SYSSETUP] Wait until all autostart services are up. Bug #4194.

Patches by Dmitry Gorbachev.
See issue #4142 for more details.

svn path=/trunk/; revision=45633
2010-02-20 13:04:56 +00:00
Eric Kohl 8ab0f28658 Make EventLog and Spooler services report their status to the SCM.
svn path=/trunk/; revision=45632
2010-02-20 12:59:53 +00:00
Daniel Reimer 90ce7d8b37 XML Compliance Patch for the RBUILD Files. By Samuel Serapion
svn path=/trunk/; revision=45631
2010-02-20 12:41:24 +00:00
Sir Richard 3bdd2efbc3 [NTOS]: Disable support for global pages since it does not seem to work right on real hardware. Additionally, the code had been previously enabling global pages before the variable determining the support for such pages was even enabled, causing non-global pages to be used initially, followed later by global pages once the variable had been setup. To fix this mess, remove all global page support for now. Fixes booting on certain real hardware (or fixes other random memory corruptions).
Thanks to Caemyr.

svn path=/trunk/; revision=45627
2010-02-19 22:43:34 +00:00
Eric Kohl 69a020df26 [SERVICES] Set default status to SERVICE_START_PENDING when starting a service.
[SYSSETUP] Wait until PlugPlay service is up. Bug #4142.
[UMPNPMGR] Update the service control manager's status information.

Patches by Dmitry Gorbachev.

svn path=/trunk/; revision=45626
2010-02-19 20:03:11 +00:00
Sir Richard 84f7b6a683 [NTOS]: Fix premature setting of the page location of a newly allocated MDL page. Because the zeroing of non-zeroed pages is done after the initial page allocation loop (and by checking which list the page was on), setting the page location as ActiveAndValid made the zero loop believe the page was unzeroed (even though it could've come from the zeroed list), causing a superflous second zero operation.
svn path=/trunk/; revision=45625
2010-02-19 18:29:29 +00:00
Sir Richard 8f421a2ad0 [NTOS]: Fix a logic error which could cause pages on the free list which failed to be zeroed out due to running out of hyperspace mappings to appear as being on the zero page list even though they were inserted back on the free page list.
svn path=/trunk/; revision=45624
2010-02-19 18:25:29 +00:00
Sir Richard 0eb260e7ea [NTOS]: Fix an off-by-! error which caused MDL page allocation to use used pages instead of free pages.
svn path=/trunk/; revision=45623
2010-02-19 18:23:07 +00:00
Sir Richard 6bde649d94 [NTOS]: It seems the code to release a page was not properly removing a page from the working set bitmap/list in one scenario, so I added the call here too.
svn path=/trunk/; revision=45622
2010-02-19 17:55:22 +00:00
Sir Richard d68a820d81 [NTOS]: Fix an off-by-one-error which incorrectly causes GUI promotion to fail if the first GUI call is "0", since the limit on the GUI descriptor table will also be "0". We should check if the limit is equal to or lower, not just if it's lower.
Thanks to Physicus and Fireball for reporting and working this out. Should fix the "ArwinSS" problem.

svn path=/trunk/; revision=45621
2010-02-19 17:54:16 +00:00
Sir Richard de9a1c0bd4 [NTOS]: Fix off-by-one error in MDL locking which caused the last PFN not to be referenced if it was part of a locked MDL, because it was assumed to be "higher than the last PFN". This further caused the entire MDL to be incorrectly treated as an I/O space mapping. Later, when unlocked, the last PFN's reference count would drop to 0, and the virtual memory range that had been locked would now be using a freed page, that would get re-used later. Noticed this bug because my WC changes allocation strategies to increase the chance of pages at the end to be used, ans the last PFN was being used a lot due to this.
svn path=/trunk/; revision=45620
2010-02-19 17:45:10 +00:00
Cameron Gutman b05284ba36 [NTOSKRNL]
- Update boot logo copyright year
 - Patch by Gabriel Ilardi

svn path=/trunk/; revision=45619
2010-02-19 10:30:01 +00:00
Cameron Gutman 8679825696 [NTOSKRNL]
- Put back the boot logo from the old bootvid
 - Rewrite the old broken progress bar code and enable the progress bar
 - The progress bar works now :)
 - NOTE: Someone should fix the copyright year on the boot logo

svn path=/trunk/; revision=45618
2010-02-19 03:16:04 +00:00
Sir Richard 320d8bf5c9 [NTOS]: Stop storing the consumer in the PFN, as this value is never actually checked. Clears up yet another misuse of the "real" PFN structure.
svn path=/trunk/; revision=45617
2010-02-19 01:58:48 +00:00
Sir Richard 37aa114310 [NTOS]: Instead of having an LRU linked list of working set pages, we instead have a bitmap.
Advantage: Pages are only in a linked list when they are NOT active (free/zeroed, for now). This makes the LIST_ENTRY fields usable when a page is active, so we can store data in there. This will make it easier to sync our PFN format with Windows.
    Advantage: It's a lot faster to set/clear bits than to do list operations (both still O1 though). Scanning for the bit is a bit slower than parsing a list, on the other hand, so it's a toss.
    Disadvantage: We lose LRU, which in theory makes us cannibalize working sets randomly instead of by-usage. However, considering the speed of ReactOS paging, and the effects of canabalizing the WS in the first place, I doubt this is really a problem.
The main point of this is advantage #1 -- making used pages not be on any lists. This will allow us to almost 100% sync the PFN layouts, which will lead to the eventual negation of any temporary disavantages.

svn path=/trunk/; revision=45616
2010-02-19 00:46:35 +00:00
Dmitry Gorbachev 1337cbf945 [NTOSKRNL] KiConvertToGuiThread() "accesses memory in an unpredictable fashion".
svn path=/trunk/; revision=45615
2010-02-18 23:25:12 +00:00
Dmitry Gorbachev 3d50158647 [BOOTVID] Initialize VgaAddress.HighPart
svn path=/trunk/; revision=45614
2010-02-18 23:25:05 +00:00
Eric Kohl 1d99f1321b [DEVMGR]
Display some more device properties.

svn path=/trunk/; revision=45613
2010-02-18 20:18:24 +00:00
Sir Richard 19e144b8b3 [NTOS]: Fix build, my bad (missing file).
svn path=/trunk/; revision=45612
2010-02-18 17:13:37 +00:00
Sir Richard de3d0b9d0c Patch by Daniel Zimmermann <netzimme@aim.com>:
[DDK]: Add PCI_ADDRESS_MEMORY_SPACE.
[HAL]: Use it in HalpAssignPCISlotResources.

svn path=/trunk/; revision=45611
2010-02-18 17:00:09 +00:00
Sir Richard be43595873 [NTOS]: Build the actual ARM3 PFN database.
svn path=/trunk/; revision=45610
2010-02-18 16:56:54 +00:00
Sir Richard da398fe2c4 [NTOS]: Remove unused code.
svn path=/trunk/; revision=45609
2010-02-18 16:50:55 +00:00
Johannes Anderwald 774ed64bf2 [KSPROXY]
- Stub interfaces for CBasicAudio, CKsClockForwarder, CVPConfig, CVPVBIConfig, CKsDataTypeHandler, CKsInterfaceHandler, CKsProxy, CKsQualityForwarder
- Implement KsSynchronousDeviceControl, KsOpenDefaultDevice, KsGetMultiplePinFactoryItems, KsGetMediaTypeCount, DllGetClassObject

svn path=/trunk/; revision=45608
2010-02-18 15:24:29 +00:00
Johannes Anderwald aeb669a3de [PSDK]
- KSM_PIN is defined in bdasup.h not bdatypes.h
- Add IReferenceClockTimerControl, IAMDeviceRemoval. IDistributorNotify, IAMClockAdjust, IAMStreamControl, IDeferredCommand interface
- Add AM_STREAM_INFO_FLAGS, AM_STREAM_INFO struct
- Modify VMRGUID struct so that gnu compilers can digest it too
- Remove useless KSINTERFACESETID_Standard define from ks.h
- Define LOCALE_INVARIANT macro


svn path=/trunk/; revision=45607
2010-02-18 15:04:54 +00:00
Cameron Gutman 3874d4ff4e - Fix incorrect sector size detection which caused seeking to fail when booting from a floppy
- FreeLoader can load from a floppy disk now

svn path=/trunk/; revision=45602
2010-02-16 20:32:58 +00:00
Timo Kreuzer 690fd6eb6d [NTOS] Allocate the trap frame on the stack by decreasing esp before modifying any members.
While doing it after is a tiny optimization (no need to wait for esp to be ready) and would work with all real traps (which clear cli), it doesn't work with Zw calls that directly call KiSystemService with interrupts enabled. This caused random trap frame corruption when an interrupt fired after members of the trap frame have been set but before esp was adjusted. Should hopefully fix most random failures on real hardware and qemu.

svn path=/trunk/; revision=45598
2010-02-15 20:16:15 +00:00
Timo Kreuzer a7994c98a5 [NTOS] Push vector as error code on the stack in KiUnexpectedInterrupt* instead of putting it into eax, because we must not clobber it. Spotted by jcatena.
svn path=/trunk/; revision=45590
2010-02-13 02:01:33 +00:00
Johannes Anderwald 1ce3458da7 [PSDK]
- Work on ksproxy.h, WIP

svn path=/trunk/; revision=45586
2010-02-12 13:46:53 +00:00
Johannes Anderwald ff9fdc8259 [PORTCLS]
- Reset play position when an audio stream is stopped
-- Fixes playback in looped mode (DirectSound) when a buffer is played&stopped more than once

svn path=/trunk/; revision=45585
2010-02-12 10:12:46 +00:00
Johannes Anderwald 5974fe1781 [DSOUND_NEW]
- Setup a default format for the primary sound buffer
- Store last used write position and use it when checking current position
- Check if the buffer has already started to play
- Fill audio buffer with silence bytes when initializing the secondary sound buffer
-- Partialy makes graphedit work when building a simple render graph(FileAsync->WaveParser->AudioRenderer). 

svn path=/trunk/; revision=45584
2010-02-12 09:54:56 +00:00
Christoph von Wittich 082d9c9fe7 [MSDMO]
sync msdmo with wine 1.1.38

svn path=/trunk/; revision=45583
2010-02-12 09:20:35 +00:00
Johannes Anderwald dd15553124 [MMIXER, WDMAUD_KERNEL]
- Implement retrieving device path

svn path=/trunk/; revision=45582
2010-02-12 06:18:31 +00:00
Johannes Anderwald 97db4c1d16 - Revert 44564
svn path=/trunk/; revision=45580
2010-02-11 21:19:35 +00:00
Johannes Anderwald a19cbab2fc [WDMAUD_KERNEL]
- Replace mixer / wave support code by mmixer library
[MMIXER]
- Compare device name from 2 character onwards as there are difference in paths in user mode / kernel mode
- Invoke create pin callback if the caller provides it
[WDMAUD.DRV]
- Apply changes from mmixer library

-- Tested in Vbox with Winamp / ReactOS mplay32

svn path=/trunk/; revision=45579
2010-02-11 21:04:57 +00:00
Eric Kohl bfa7d233cd [DEVMGR]
Display Matching Device ID.

svn path=/trunk/; revision=45578
2010-02-11 20:23:48 +00:00
Sir Richard 7872be6071 [NTOS]: Remove many hacks in freelist.c regarding the differences between PHYSICAL_PAGE and MMPFN. ReferenceCount field is now accessed directly. LockCount is gone. Type is gone: if a page is used, it has a consumer and is in the ActiveAndValid state, if it's free, it's on the free or zero page list. Get rid of Zero, if a page is zeroed, it is on the zero page list.
[NTOS]: These changes will allow a smoother migration to MMPFN later on.

svn path=/trunk/; revision=45577
2010-02-11 18:44:28 +00:00
Sir Richard 27494e478b [NTOS]: Get rid of page locking mechanism for MDL since I can't see a reason this would make sense, since these pages won't be scheduled for page out anyway, and that is the only code that looked at this value.
svn path=/trunk/; revision=45576
2010-02-11 18:41:45 +00:00
Sir Richard 2cd1a22f66 [NTOS]: Remove bogus assertion.
svn path=/trunk/; revision=45575
2010-02-11 18:33:52 +00:00
Sir Richard a2fa6b804c [NTOS]: Fix broken MI_PFNENTRY_TO_PFN macro.
svn path=/trunk/; revision=45574
2010-02-11 18:31:54 +00:00
Timo Kreuzer 43108b2dd0 [HAL]
Restore fs in HalpTrap06. Should fix crash on 1st stage with VBox.

svn path=/trunk/; revision=45573
2010-02-11 17:36:57 +00:00
Sir Richard 6adba76502 [NTOS]: Fix a stupid bug: x86 has 1024 PDEs, and ARM has 4096 PDEs, not the other way around.
[NTOS]: Map the ARM3 PFN database as well, now.
[NTOS]: Start initializing the ARM3 PFN database entries, right now for pages that have been mapped directly through PTE/PDE manipulation.

svn path=/trunk/; revision=45569
2010-02-11 09:15:50 +00:00
Cameron Gutman aa9a3648eb - Fix floppy controller detection
- Simplify waiting in Get_Byte and Send_Byte
 - See issue #4391 for details

svn path=/trunk/; revision=45568
2010-02-11 02:22:34 +00:00
Sir Richard c7f7e3bac7 [NTOS]: Move more functions from the i386 ARM3 directory to the portable/shared directory, since they apply to all architectures.
[NTOS]: Refactor the mapping of the PTEs for the PFN database into MiMapPfnDatabase and move the code to portable directory.
[NTOS]: Move and refactor some other definitions, and make some numbers more portable by defining arch-specific subvalues.
[NTOS]: Make the PFN database actually 2 PFN Databases: MmPfnDatabase[0] which is the ReactOS mapping of PHYSICAL_PAGE structures, and MmPfnDatabase[1] which will be the ARM3 mapping of MMPFN structures. The latter is as-of-yet unused, but memory for it is now being reserved.

svn path=/trunk/; revision=45566
2010-02-11 00:01:32 +00:00
Timo Kreuzer dd6b443e89 [REACTOS] Add asm.h containing macros to make assembly code both GAS and ML compatible at the same time.
[NTOS/HAL] Move trap entry points from C into a GAS/ML compatile assembly file (might need fine tuning for ML). The entries are generated by a shared assembly macro TRAP_ENTRY. Removed KiTrapStub, KiIsV8086TrapSafe, KiIsUserTrapSafe, KiSetSaneSegments, removed segment handling from KiEnter*Trap.
[NTOS] Make KiFastCallEntryHandler and KiSystemServiceHandler FASTCALL and pass the systemcall number in TrapFrame->Eax
[HAL] Use _setjmp/longjmp instead of saving a trapframe in HalpBiosCall

svn path=/trunk/; revision=45565
2010-02-10 23:24:59 +00:00