Commit graph

39839 commits

Author SHA1 Message Date
Stefan Ginsberg 141ef5cfc3 - Add missing synchronization for access to PsLoadedModuleList. Inserting and removing entries to the list was protected by a spinlock, but some places didn't acquire the lock before looping the list when searching for module information. For efficiency, use an executive resource for other access than inserting/removing entries so we can have shared locking in some common cases (spinlock stays so access can be synchronized with DPCs).
- Make SystemUnloadGdiDriverInformation take the opaque SectionPointer (which is really the Loader Entry) from the SYSTEM_GDI_DRIVER_INFORMATION structure returned in SystemLoadGdiDriverInformation so it doesn't need to loop the loaded module list to find it.
- Fix EngLoad/UnloadImage to do this. Also make EngLoadImage return the pointer to the internal structure as the "handle" so EngUnloadImage doesn't need to loop the driver list to find it. The code is still extremely broken and needs a rewrite.
- Remove some externs from related variables in the code -- we use something called "headers".

svn path=/trunk/; revision=44119
2009-11-12 19:41:39 +00:00
Aleksey Bragin 14442c0a34 [advapi32]
Alexander Yastrebov <menone7@gmail.com>
- Return proper lengths of required buffer sizes in characters (including the termination NULL character) in LookupAccountSid. Fixes 4 "advapi32_winetest security" failures.
See issue #4904 for more details.

svn path=/trunk/; revision=44117
2009-11-12 13:55:51 +00:00
Aleksey Bragin ba319b373f [Unused ReactOS setup]
- Move duplicate code from LoadSetupData to a separate function
- Fix a bug on line 1054 of the original file: SetupData.LangCount should be SetupData.KbLayoutCount (copy-paste mistake). This would have probably gone unnoticed if SetupData.LangCount > SetupData.KbLayoutCount due to other end of section checking.
- Based on a patch from bug 4933.

svn path=/trunk/; revision=44116
2009-11-12 12:35:01 +00:00
Stefan Ginsberg c02b96254e - Add inital support for PCI and ISA interrupts.
- Use different register allocation to be more efficient on certain systems.
- Add tables and initial code for Lazy IRQL support.

svn path=/trunk/; revision=44115
2009-11-11 22:29:16 +00:00
Johannes Anderwald 8e510a0ea2 - Fix building of cmidriver
- Required a few hacks, which were documented as //HACK

svn path=/trunk/; revision=44113
2009-11-11 20:43:58 +00:00
Aleksey Bragin effa38586c [rosapps]
- Avoid old crt names usage, by Caemyr/kjk_hyperion.

svn path=/trunk/; revision=44107
2009-11-11 18:19:42 +00:00
Sylvain Petreolle 94d60cdacc forgot that one
svn path=/trunk/; revision=44105
2009-11-11 13:02:13 +00:00
Sylvain Petreolle aafb387b32 [12:14] <Usurp> kjk_hyperion: i dont understand where msvcrt is linked twice in crt_regtest ?
[12:14] <kjk_hyperion> Usurp: that's right, you don't understand


svn path=/trunk/; revision=44104
2009-11-11 12:51:03 +00:00
KJK::Hyperion 8667b162b1 modified regtests/crt/crt_regtest.rbuild
Don't link msvcrt twice, bad things happen

modified   tests/dirdlg/dirdlg.rbuild
modified   winetests/msvcrt/msvcrt.rbuild
   More oldnames hacks

modified   tests/tcpsvr/tcpsvr.c
   Don't use close on sockets, use closesocket

svn path=/trunk/; revision=44103
2009-11-11 11:12:55 +00:00
KJK::Hyperion 42f5d69bb4 More _CRTIMP love for non-ANSI symbols
svn path=/trunk/; revision=44102
2009-11-11 11:11:58 +00:00
Johannes Anderwald 844a591298 - Fix problem with ASSERT & ASSERTMSG when compiled with g++
svn path=/trunk/; revision=44101
2009-11-11 10:53:52 +00:00
Johannes Anderwald 7d088d0725 [KS]
- Implement KsEnableEvent, KsEnableEventWithAllocator, KsDiscardEvent
[PORTCLS]
- Fix signalling the event
- DirectSound clients can now use IDirectSoundNotify interface to be notified of a position change

svn path=/trunk/; revision=44100
2009-11-11 09:04:42 +00:00
Christoph von Wittich 008929cd36 return TRUE in ReadFile if there is nothing to read
svn path=/trunk/; revision=44099
2009-11-11 08:29:08 +00:00
Christoph von Wittich 4574bb5be8 sync shell32 winetest to wine 1.1.32
svn path=/trunk/; revision=44098
2009-11-11 07:36:49 +00:00
KJK::Hyperion 7f4bf6c490 modified Makefile
Give poor pefixup its own echo line

modified   ReactOS-amd64.rbuild
modified   ReactOS-arm.rbuild
modified   ReactOS-i386.rbuild
   Set global linker flags globally
   Goodbye NTOSKRNL_SHARED

modified   tools/rbuild/backend/codeblocks/codeblocks.cpp
modified   tools/rbuild/backend/msvc/vcprojmaker.cpp
   Build fixes. I really want to delete these dead backends

modified   tools/rbuild/backend/mingw/linkers/ld.mak
   Makefile rule for the linker. Also generates the .lib and .exp for DLLs, and obsoletes a whole lot of shitty rbuild code

modified   tools/rbuild/backend/mingw/mingw.cpp
modified   tools/rbuild/backend/mingw/mingw.h
   Specify module type-specific linker flags... in the specification of flags for module types, instead of wherever
   Fix generation of project-global linker and NASM flags
   Give better names to the variables that contain names of BE-provided libraries
   Don't put quotes around the names of BE-provided libraries, GNU make doesn't support quoting in any way, shape or form and quotes around filenames actually break shit on Windows (see <http://reactos-blog.blogspot.com/2009/11/gnu-make-fails-on-windows-with-multiple.html>). Just install the BE in a path without spaces in it
   Typo: LFLAGS is the flags for lex, flags for linker come from LDFLAGS

modified   tools/rbuild/backend/mingw/modulehandler.cpp
modified   tools/rbuild/backend/mingw/modulehandler.h
modified   tools/rbuild/module.cpp
modified   tools/rbuild/rbuild.h
   Moved generation of linker and import library generation rules out of rbuild and into sub-makefiles. A lot of code deleted, nothing of value was lost
   More LFLAGS -> LDFLAGS
   Goodbye mangledsymbols and underscoresymbols attributes, they don't do shit other than complicating my life
   If we have to add an underscore in front of the entry point name for some architectures, how about we do it in a single place?

modified   tools/rbuild/backend/mingw/rules.mak
   Minor cosmetic change

svn path=/trunk/; revision=44091
2009-11-11 03:41:14 +00:00
KJK::Hyperion 18d9f647bc modified lib/3rdparty/mingw/mingw.rbuild
oldnames is not an import library and dlltool --add-underscore is not an appropriate way to build it. Delete it for now

modified   base/applications/network/ftp/ftp.rbuild
modified   base/applications/winhlp32/winhlp32.rbuild
modified   base/services/dhcp/dhcp.rbuild
modified   dll/win32/crypt32/crypt32.rbuild
modified   dll/win32/mshtml/mshtml.rbuild
modified   dll/win32/setupapi/setupapi.rbuild
modified   dll/win32/wininet/wininet.rbuild
modified   lib/3rdparty/libxml2/libxml2.rbuild
   Workarounds for the removal of oldnames

modified   dll/directx/d3d8/d3d8.rbuild
   Use a file that actually exists

modified   dll/win32/crtdll/crtdll.rbuild
modified   dll/win32/msvcrt/msvcrt.rbuild
   "mangledsymbols" never did anything: remove it

modified   dll/win32/msvcrt/msvcrt.def
modified   lib/sdk/crt/crt.rbuild
   We don't actually implement j0/j1/jn/y0/y1/yn: _j0 calls __imp__j0, which is an alias for __imp___j0, which redirects back to _j0 in a perfect loop. Remove them for the time being

modified   lib/3rdparty/bzip2/bzip2.rbuild
   This was actually called unbzip2.dll. Who knew

svn path=/trunk/; revision=44090
2009-11-11 03:21:16 +00:00
KJK::Hyperion 49ce5d1d63 Non-ANSI names need _CRTIMP too
svn path=/trunk/; revision=44089
2009-11-11 03:09:42 +00:00
Stefan Ginsberg 0c19771290 - Missed in previous commit: Fix VideoPortEnable/DisableInterrupt -- they should only fail if the driver didn't provide an ISR (documented).
svn path=/trunk/; revision=44086
2009-11-10 23:01:42 +00:00
Stefan Ginsberg 662ba31e98 - Fix HalDisableSystemInterrupt -- it doesn't return anything.
- Fix VideoPortEnable/DisableInterrupt -- they should only fail if the driver didn't provide an ISR (documented).

svn path=/trunk/; revision=44085
2009-11-10 23:00:51 +00:00
Dmitry Gorbachev a6c89f30fa Fix Japanese bug #4776.
svn path=/trunk/; revision=44084
2009-11-10 22:52:41 +00:00
Christoph von Wittich a72dd3434c sync shlwapi to wine 1.1.32
svn path=/trunk/; revision=44083
2009-11-10 21:36:55 +00:00
Christoph von Wittich 2afeb94e20 sync SHGetFileInfo and CommandLineToArgvW to wine 1.1.32
svn path=/trunk/; revision=44082
2009-11-10 21:31:37 +00:00
Christoph von Wittich e8c61b4a52 partial shell32 sync to wine 1.1.32
svn path=/trunk/; revision=44081
2009-11-10 21:29:56 +00:00
Christoph von Wittich 8f8f2a36c0 fix ILCreateControlPanel and ILCreatePrinters
svn path=/trunk/; revision=44080
2009-11-10 20:35:07 +00:00
Christoph von Wittich 1526c2358d sync shell32/shelllink to wine 1.1.32
svn path=/trunk/; revision=44079
2009-11-10 20:09:00 +00:00
Stefan Ginsberg 31baf39ed3 - Correct author of freeze.c (code was copied from cpu.c).
svn path=/trunk/; revision=44078
2009-11-10 16:42:31 +00:00
Stefan Ginsberg ee750905e9 - Fix missing initialization of KdComPortInUse, containing the base address of the port used by kdcom. The serial driver checks this variable to determine if it can use the port or if it should stay (the fuck) off. KdCom no longer hangs after serial driver initialization in second stage.
svn path=/trunk/; revision=44077
2009-11-10 14:23:44 +00:00
Johannes Anderwald 9a2bba4740 [KS]
- Implement KsGenerateEvent 

svn path=/trunk/; revision=44076
2009-11-10 10:50:57 +00:00
Johannes Anderwald c3eaa577c4 - Remove ASSERT && add param checks
svn path=/trunk/; revision=44075
2009-11-10 10:04:33 +00:00
Johannes Anderwald dcb1336203 [PORTCLS]
- Implement handling of enabling / disabling events
- Implement firing of events when certain position is reached
- Code not yet used as ks needs more work

svn path=/trunk/; revision=44074
2009-11-10 10:01:25 +00:00
Timo Kreuzer d129a33bad fix a preprocessor bug
svn path=/trunk/; revision=44068
2009-11-10 01:47:09 +00:00
Stefan Ginsberg b4835e6bad - Add KCALLOUT_FRAME to define the kernel callback stack layout during user mode callbacks. Define the NextCallback and FramePointer members of the debugger data block more portably with this.
- AMD64's is a copy of x86's to match asm.h's the assembly offsets. ARM's is a stub containing two necessary members to have some offsets for the debugger data block.
- Add ARM stub for KiCallUserMode as this is referenced from the debugger data block.

svn path=/trunk/; revision=44063
2009-11-09 23:19:03 +00:00
Stefan Ginsberg ccd3b00fd2 - Fix unsigned/signed compare, spotted by Christoph
svn path=/trunk/; revision=44062
2009-11-09 23:07:04 +00:00
Stefan Ginsberg a9f0dd5a8d - Implement the generic bus handler support and initialization.
- Add missing hack flags for ACPI hacks.
- Add the hack flags to the registry.

svn path=/trunk/; revision=44061
2009-11-09 22:59:49 +00:00
KJK::Hyperion 652e881f54 ... on the other hand, O_BINARY is a Win32 thing
svn path=/trunk/; revision=44060
2009-11-09 22:56:06 +00:00
KJK::Hyperion f93a056987 modified base/shell/explorer/notifyhook/notifyhook.def
modified   dll/3rdparty/mesa32/src/drivers/windows/icd/mesa.def
modified   dll/nls/idndl/idndl.def
modified   dll/nls/normaliz/normaliz.def
modified   drivers/video/font/ftfd/freetype.def
   Soon, the rbuild "dllname" attribute will have no effect for .def files (only .spec/.pspec): prepare the sources for it by specifying the DLL name in the .def files themselves with the LIBRARY directory

svn path=/trunk/; revision=44059
2009-11-09 22:49:18 +00:00
KJK::Hyperion 34cce6f897 modified tools/pefixup.c
MinGW provides a good enough POSIX-like environment to do away with a couple platform checks/hacks
   Print error messages on stderr instead of stdout
   Don't print anything when pefixup does nothing - "no news is good news"

svn path=/trunk/; revision=44058
2009-11-09 22:42:17 +00:00
Stefan Ginsberg 6fcf0fd7b8 - Set and check for the correct PTE write bits on x86 SMP. The MP kernel is now functional again.
svn path=/trunk/; revision=44057
2009-11-09 22:05:36 +00:00
Stefan Ginsberg 1a3c56692d - Fix build with neither KDBG or _WINKD_ defined -- ReactOS KD wrapper uses the safe memory routines too, so only skip kdmemsup.c if compiling for _WINKD_.
svn path=/trunk/; revision=44054
2009-11-09 21:38:26 +00:00
Johannes Anderwald 43a6379cc0 - Fix bug introduced 18942 revisions ago
svn path=/trunk/; revision=44050
2009-11-09 17:43:12 +00:00
Dmitry Gorbachev db62b33f92 Simple optimization in RApps. Patch by Love Nystrom. Bug #4952.
svn path=/trunk/; revision=44049
2009-11-09 15:34:18 +00:00
Stefan Ginsberg afd1ab1b6d - HAL uses HARDWARE_PTE, not MMPTE_HARDWARE, so remove broken SMP fix
svn path=/trunk/; revision=44033
2009-11-08 22:17:05 +00:00
Stefan Ginsberg aaad231bf1 - Fix work around for the cmpxchg8b lock errata work around -- don't set write protection if the kernel hasn't set it yet. Move the code out to HalpBiosDisplayReset so we can keep track of this. Also set the correct bit on SMP systems.
svn path=/trunk/; revision=44032
2009-11-08 21:42:28 +00:00
Stefan Ginsberg a3012cacae - Add freeze.c to the build too
svn path=/trunk/; revision=44031
2009-11-08 21:22:24 +00:00
Stefan Ginsberg 4e140f4d79 - Move processor freeze support out from x86 cpu.c to new generic freeze.c as these routines are quite generic.
svn path=/trunk/; revision=44030
2009-11-08 21:10:23 +00:00
Stefan Ginsberg 9475cf4cbc - Make WinLdr's loading screen display the boot method (NT) instead of operating system name (Windows).
svn path=/trunk/; revision=44027
2009-11-08 11:52:23 +00:00
Stefan Ginsberg 335f8ac467 - Fix _WINKD_ build breakage from 44023 -- missed to commit the .rbuild change for the renamed kdsup.c files
svn path=/trunk/; revision=44026
2009-11-08 11:41:35 +00:00
Stefan Ginsberg ef21516cc4 - Disable the MiCacheImageSymbols call in MmLoadSystemImage for KD too as this hack is required for rossym rather than KDBG. Fixes detection of non-boot driver images by WinDbg.
- Add another hack to freeldr.c to make sure that HAL is the second entry in the Load Order list -- detect if it isn't and insert it as the second entry manually if it isn't.
- KdbInitialize can now assume that the 2nd entry in the Load Order list is HAL, just like ExpLoadBootSymbols and KD does, so get the Loader Entry directly instead of searching for it.
- Move KiBootTss and KiBootGdt to freeldr.c as this is where they belong -- they are not required for NTLDR/WINLDR boot style and are only used directly in freeldr.c.
- Get rid of the AcpiTableDetected variable from freeldr.c. Instead, set the AcpiTable entry to something and make PoInitSystem check for that instead to preserve the old behavior.
- Implement KdpGetFirstParameter and KdpGetSecondParameter for ARM too -- just retrieve R3/R4 here. Also rename those macros to clarify what parameters we are retrieving.
- Add MmIsSessionAddress stub and use it from KD handle session space properly in the Memory Query API, and ASSERT that we are not trying to do a copy to/from session space in MmDbgCopyMemory as we don't handle it properly. Put this in mmdbg.c for now as we don't implement session space, and it is only called from KD right now.
- Rename the 3 kdsup.c files to kdx86.c, kdx64.c and kdarm.c to differ them from each other.
- Implement KdpAllowDisable -- just check if any processor breakpoints are set on any processor in the system and disallow the disable if so. The routine is now architecture dependant, so move it to the appropriate files.
- Get rid of the MmFreeLdr* variables too. These have been deprecated for some time now.
- The ModuleObject and ImageBaseAddress parameters of MmLoadSystemImage are not optional so don't treat them as such, and don't zero initialize them as callers shouldn't rely on this.
- Set LDRP_ENTRY_NATIVE instead of LDRP_COMPAT_DATABASE_PROCESSED to mark the image as a native image. Also fix the value of LDRP_ENTRY_NATIVE.
- Fix definition of LDR_DATA_TABLE_ENTRY -- the Checksum member should be in the union too.
- Remove some unnecessary externs for stuff we now define globally in the kernel headers.
- Rename some variables in KD to better match the logic.
- Move some x86 only stuff from global ke.h and ke_x.h to the x86 dependent ke.h. Remove DR_ACTIVE_MASK as it has been deprecated/unused for a while now.

svn path=/trunk/; revision=44023
2009-11-08 01:13:49 +00:00
Stefan Ginsberg 65ebf6adac - Add HAL PCI tables required for future work.
svn path=/trunk/; revision=44022
2009-11-08 00:22:29 +00:00
Cameron Gutman 024d413ccb - Stop using the TCPLock to protect all entries into the IP lib
- Instead use TCPLock only to protect entries into oskittcp

svn path=/trunk/; revision=44021
2009-11-07 20:41:57 +00:00