Commit Graph

42088 Commits

Author SHA1 Message Date
Timo Kreuzer
f677303425 - add missing 64 bit intrinsic Interlocked functions
- readd Interlocked definitions to winddk.h that someone stole

svn path=/branches/ros-amd64-bringup/; revision=34916
2008-07-28 21:39:55 +00:00
Johannes Anderwald
67821bff32 - display volume label for disk drives. If there is no label, load default label
svn path=/trunk/; revision=34915
2008-07-28 19:47:19 +00:00
Aleksey Bragin
9655f89744 - Don't strictly check NTDDI_VERSION to WINXP or WS03, since in case of e.g. NTDDI_WS03SP1 the define would work incorrectly (skipping a structure member).
svn path=/trunk/; revision=34914
2008-07-28 18:38:11 +00:00
Johannes Anderwald
81e31939b1 - reenable drive properties dialog
svn path=/trunk/; revision=34913
2008-07-28 18:23:42 +00:00
Art Yerkes
e98217024c Should fix the release build (sorry).
svn path=/trunk/; revision=34912
2008-07-28 18:21:35 +00:00
Jeffrey Morlan
83f07a8e37 - GuiConsoleInitScrollbar: Hide vertical scrollbar when not needed; use SB_VERT (not SB_HORZ) to set its information when it is; set sInfo.nPage according to window size in characters; calculate window pixel size, taking scrollbar width/height into account.
- GuiConsoleHandleNcCreate: Remove window sizing (now done in GuiConsoleInitScrollbar)
- GuiApplyUserSettings: Swap transposed min/max in cursor size calculation; don't assume that the physical top of the buffer is the same as the logical top; fix broken code where HAVE_WMEMSET isn't defined (wrong loop counts, Offset wasn't incremented); fix typo in calculating height difference. If either buffer or window size has changed, call GuiConsoleInitScrollbar.

svn path=/trunk/; revision=34911
2008-07-28 16:48:04 +00:00
Timo Kreuzer
2ff232d781 sync with trunk head (34904)
svn path=/branches/ros-amd64-bringup/; revision=34910
2008-07-28 15:52:00 +00:00
Timo Kreuzer
a5d18f835c some more win32k 64 bit fixes
svn path=/branches/ros-amd64-bringup/; revision=34909
2008-07-28 15:30:31 +00:00
Timo Kreuzer
2c0f5fbba4 some 64 bit fixes in win32k
svn path=/branches/ros-amd64-bringup/; revision=34908
2008-07-28 15:19:17 +00:00
Timo Kreuzer
fdd31121db - #if out vista api for now
- fix advapi and kernel32 spec files. They need more review though.
- fix NtUserGetThreadState
This fixes x86 build.

svn path=/branches/ros-amd64-bringup/; revision=34907
2008-07-28 15:14:30 +00:00
Samuel Serapion
a0c7e902ab Warning and error fixes.
svn path=/branches/ros-amd64-bringup/; revision=34906
2008-07-28 14:50:17 +00:00
Samuel Serapion
c89e519b74 Fix x86 ntoskrnl build.
Fix TreeView_EnsureVisible macro.

svn path=/branches/ros-amd64-bringup/; revision=34905
2008-07-28 14:48:07 +00:00
Art Yerkes
7c5414460f This is a patch i've been keeping for a while. Yes, it's not "as nt does it",
but it solves a practical problem, and isn't particularly invasive (the main
change is the call to KdpEnableSafeMem ... everything else could be macroed
out if desired).  

This provides armour for kdbg and gdb that avoid faulting on bad addresses by
implementing a simple poor-man's mmu and letting the debuggers use it.

svn path=/trunk/; revision=34904
2008-07-28 14:47:17 +00:00
Timo Kreuzer
1de2bbcd36 fix interlocked stuff in winddk, maybe not 100%, but better now
svn path=/branches/ros-amd64-bringup/; revision=34903
2008-07-28 14:46:08 +00:00
Dmitry Chapyshev
94f599dec2 - Add console version Appwiz. It is not finished, but fully works
svn path=/trunk/; revision=34902
2008-07-28 14:40:32 +00:00
Aleksey Bragin
b971b4d659 Dmitry Gorbachev
- PDT of CSRSS has no entry for TCB of the thread, fix this problem.
See issue #3591 for more details.

svn path=/trunk/; revision=34901
2008-07-28 14:32:50 +00:00
Timo Kreuzer
0f59187920 move the inlined InterlockedAnd/Or from rtl to winbase.h and rename it to InterlockedAnd/Or_Inline
svn path=/branches/ros-amd64-bringup/; revision=34900
2008-07-28 14:05:45 +00:00
Art Yerkes
258329b01b Fix (among other things) failure to boot when a CD is not inserted, caused by
the new (correct) ASSERT in mutex acquisition in MmProbeAndLockPages, which
was erroneously being called from IoBuildAsynchronousFsdRequest at
DISPATCH_LEVEL.  

The only correct course of action when calling IoBuildAsynchronousFsdRequest
at DISPATCH_LEVEL is to MmBuildMdlForNonPagedPool since the buffer must be 
nonpaged (if the IRP completes synchronously, we'll still be at DISPATCH_LEVEL)
This is the case when direct io is done at DISPATCH_LEVEL using
IoBuildAsynchronousFsdRequest.

svn path=/trunk/; revision=34899
2008-07-28 12:38:47 +00:00
Aleksey Bragin
966a7b788f - Silence crt's "wtf".
svn path=/trunk/; revision=34897
2008-07-28 11:30:08 +00:00
Ged Murphy
36dab01cab - Don't check outside of the array bounds
- Spotted by Marcelo Slomp <mslomp at linuxmail dot org>
See issue #3593 for more details.

svn path=/trunk/; revision=34892
2008-07-28 08:45:38 +00:00
Colin Finck
795b09cde7 Replace '#ifdef __linux__' by '#ifndef WIN32', etc. to fix compilation on Mac OS X (hint by Alex on ros-dev)
svn path=/trunk/; revision=34891
2008-07-28 08:32:04 +00:00
ReactOS Portable Systems Group
a9f6591d2c - Don't use .spec file on ARM, it doesn't work.
- For the first time, the entire ARM build of ReactOS builds (for the components we've defined)!
- Now the user-mode fun begins.


svn path=/trunk/; revision=34890
2008-07-28 03:07:50 +00:00
ReactOS Portable Systems Group
e34e342d45 - Fix build of NTOS and FreeLDR on ARM.
svn path=/trunk/; revision=34889
2008-07-28 03:07:03 +00:00
Timo Kreuzer
b423bf7a95 Now after loading all the drivers we come to where we setup the page directory. This is good, but I'm too tired to look into this now....
svn path=/branches/ros-amd64-bringup/; revision=34888
2008-07-28 02:18:46 +00:00
ReactOS Portable Systems Group
4eb79d6d88 - Fix FreeLDR for ARM build after some header changes that happen in NTOS.
svn path=/trunk/; revision=34887
2008-07-28 02:18:43 +00:00
ReactOS Portable Systems Group
a249132448 - Define the "generic" versions of the ARM-specific HAL routines.
- Now the generic HAL builds without linker errors.


svn path=/trunk/; revision=34886
2008-07-28 02:15:40 +00:00
ReactOS Portable Systems Group
1b0bec70c1 - Fix the NTOS ARM build after the recent Mm changes.
svn path=/trunk/; revision=34885
2008-07-28 02:13:56 +00:00
ReactOS Portable Systems Group
80f7916a79 - We finally figured out how to build the CRT! It seems on ARM, we have to add __MSVCRT__ to all build targets.
- Thanks to the people who worked on the PPC port for making this obvious in the rbuild file :)


svn path=/trunk/; revision=34884
2008-07-28 02:13:39 +00:00
Timo Kreuzer
007a3b2a39 moar drivers
svn path=/branches/ros-amd64-bringup/; revision=34883
2008-07-28 01:51:56 +00:00
Timo Kreuzer
db30576dfb another Interlocked fix, still it's not all perfect
svn path=/branches/ros-amd64-bringup/; revision=34882
2008-07-28 01:50:22 +00:00
ReactOS Portable Systems Group
a5a0461289 Now that MADDRESS_SPACE became nearly an empty structure pointing only at the root, it can completely go away. Now VadRoot really is a MM_AVL_TABLE structure.
The BalancedRoot.u1.Parent now points to what used to be MemoryAreaRoot. This isn't really the most proper fix out there -- the problem is that React starts with an no root, while Windows
starts with an empty balanced root. So for now we keep doing it the React way, which means we have about 10 ugly typecast hacks. On the other hand, we got rid of more than 100 of them.


svn path=/trunk/; revision=34881
2008-07-28 01:49:23 +00:00
Timo Kreuzer
e1d52bced3 add another export we need in ntoskrnl
svn path=/branches/ros-amd64-bringup/; revision=34880
2008-07-28 01:26:56 +00:00
ReactOS Portable Systems Group
7c1492c712 The address space creation lock is a guarded mutex, not a pushlock, in NT 5.2. While it is commendable to attempt using Vista optimizations (it is a push lock on Vista) in order to speed up
the kernel, it is entirely stupid to do so by completing ignoring the ramifications of this change, and furthermore, to pollute the kernel with typecasts, as well as to introduce non-standard
behavior. Ironically it is ion himself who made this change.

svn path=/trunk/; revision=34879
2008-07-28 01:11:19 +00:00
ReactOS Portable Systems Group
34954b16a4 There is no point in saving the address of the address space lock in the address space structure anymore, since this lock is always the address creation lock of the owner process,
and there's always an owner process now.

svn path=/trunk/; revision=34878
2008-07-28 00:56:39 +00:00
Timo Kreuzer
57ad095777 - add another missing export to ntoskrnl_amd64.def
- fix LARGE_INTEGER to pointer cast
- add more drivers to build

svn path=/branches/ros-amd64-bringup/; revision=34877
2008-07-28 00:47:28 +00:00
ReactOS Portable Systems Group
71f2416876 Looks like this address space nonsense made even less sense than originally understood. The kernel address space was something created very early-on, and associated with a global variable
that actually contained the address space itself (so it wasn't part of any process). Its locks however, were associated to the "current process", which, when this function is called, is the
idle process (which later is cloned into the initial system process). Shortly thereafter, the address space of the "current process" (still, at this point, the idle process) was initialized
with the function reserved for real processes (MmInitializeProcessAddressSpace), which among other things, performed a couple of user-mode mappings (which are irrelevant and should not be
part of the system process address space). This created a weird schism: the kernel address space was actually a global variable associated with no process at all, while the kernel process
had its own address space as well (which was not the kernel address space). It's a miracle this didn't screw anything up especially since whether or not the address space has an owner
determined the lowest address (which means that if the kernel process allocated a memory with its *own* address space, the code would think it was a user-mode process).
This patch gets rid of the kernel address space as a static structure, and instead makes it a pointer into the idle/system process' address space. It also gets rid of MmInitializeKernelAddresSpace
and instead makes use of the existing MmInitializeHandBuiltProcess, cleaning up the user-mode allocations previously made. Even though all address spaces now have an owner and are part of a
process, MmGetAddressSpaceOwner will still return NULL for now, to remain backwards compatible with legacy code.


svn path=/trunk/; revision=34876
2008-07-28 00:43:57 +00:00
Timo Kreuzer
37d520af6e - add missing export RtlExtended integerMultiply to ntoskrnl
- build class2, atapi and scsiport drivers

svn path=/branches/ros-amd64-bringup/; revision=34875
2008-07-28 00:34:07 +00:00
Timo Kreuzer
5f3d2cfa50 class2: fix ULONG to pointer cast
svn path=/branches/ros-amd64-bringup/; revision=34874
2008-07-28 00:32:21 +00:00
ReactOS Portable Systems Group
487609a995 The puzzle of the design decisions behind the React address space structure continues to be troubling (perhaps there was no design?). Every time a process address space is initialized,
the owner process is stored (which we now use to figure out the lowest address). Recall that NULL means kernel, anything else means per-process. This is great, except that after some
painfull header groking, one understands that the PMADDRESS_SPACE structure is actually *not* a separate structure, but embedded within PEPROCESS itself. It is a React-specific structure
(hence the attempts to get rid of it), that seems to have been "overloaded" on top of the VadRoot structure that Windows uses for user-mode memory allocations. To clarify, this structure
is actually embedded inside the process that owns it, except for the kernel address space, which is a global variable. So there's absolutely *no* point in saving a reference to the owner
process, since we'll always be embedded inside it (except for kernel address space).
This patch creates the MmGetAddressSpaceOwner macro which either returns NULL for kernel address space, or uses the CONTAINING_RECORD macro to return the owner (embedded) process. 


svn path=/trunk/; revision=34873
2008-07-27 23:53:04 +00:00
ReactOS Portable Systems Group
908aede2ef - Remove MiGetUserPageDirectoryCount from the ARM Mm since this function is now useless after our cleanups.
svn path=/trunk/; revision=34872
2008-07-27 23:48:19 +00:00
Timo Kreuzer
1e029cfce4 - fix bzip2 include to make ip compile
- comment out some stuff in SEH asm code to make it compile, it's useless code anyway
- add some hack exports to ntoskrnl
- use private ntoskrnl rbuild File

svn path=/branches/ros-amd64-bringup/; revision=34871
2008-07-27 23:32:41 +00:00
Timo Kreuzer
feeb330648 tcpip:
- fix some pointer to ULONG casts

svn path=/branches/ros-amd64-bringup/; revision=34870
2008-07-27 23:26:26 +00:00
ReactOS Portable Systems Group
62278bab4a More over-engineering: there really isn't any reason to keep track of the "LowestAddress" of the process' addres space. At first sight, this looked like a dynamic value that would define the
lowest address at which the process has allocated memory, but this isn't the case -- the variable actually defines the lowest valid address a process can allocate memory at. This is pretty
much a static value, that was compute by MmInitializeProcessAddressSpace, to either MM_LOWEST_USER_ADDRESS or MmSystemRangeStart, based on whether or not the address space has an owner process
(meaning it is a user-mode address space) or not (meaning it is a kernel mode address space).
This patch removes that value and all the complex code around checking it, and replaces it with a much simpler design: if there is an owner process, use MM_LOWEST_USER_ADDRESS during gap
calculations, otherwise, use MmSystemRangeStart. This is both faster, and wastes less space by not tracking static data.


svn path=/trunk/; revision=34869
2008-07-27 23:03:20 +00:00
Timo Kreuzer
0fe845850a fix definition for NdisCopyLookaheadData on AMD64
svn path=/branches/ros-amd64-bringup/; revision=34868
2008-07-27 22:58:20 +00:00
Johannes Anderwald
bbf489032b - implement changing drive volume name
- display default volume label "local disk" if there is no title
- verify that provided clsid is valid
- display drive property dialog
- note: changing volume label currently leads to a crash

svn path=/trunk/; revision=34867
2008-07-27 22:58:19 +00:00
Timo Kreuzer
8c8c4622d1 give ndis it's own def file for amd64, yes that breaks arm build... :-@
svn path=/branches/ros-amd64-bringup/; revision=34866
2008-07-27 22:43:41 +00:00
ReactOS Portable Systems Group
8daee04c2a It seems unclear as to what the point of the Page Reference Count Table in the React Addres Space structure really was. It seems an over-engineered approach that actually causes more problems
then it attempts to solve. The idea is to be able to unmap PDEs when they are not required anymore (a noble idea), which saves you 4KB of non-paged pool whenever a process frees a chunk
of 4MB memory (oversimplification). The problem is that to keep track of this, an extremly expensive series of branches, comparisons, masks and shifts is applied every single time that
a page is mapped or unmapped. It also adds 8KB of non-paged pool to keep track of the references, which in some cases can be more wasteful than keeping the page tables around.
Finally, if the process quickly allocates and de-allocates memory in the same PDE range, we will effectively map and unmap the PDE continously, fragmenting hyperspace and slowing down perf.
This patch removes this functionality from the system and re-uses the code that was already present in Mmi386ReleaseMmInfo (with some optimizations and changes) to do this unmapping when the
process exists. This should make things faster, with a very small amount of increased memory footprint (we're talking about less than 100kb of non paged pool, in worse-case scenarios). 


svn path=/trunk/; revision=34865
2008-07-27 22:39:54 +00:00
Timo Kreuzer
30ee8afdc4 fix some ULONG to pointer casts
svn path=/branches/ros-amd64-bringup/; revision=34864
2008-07-27 22:20:01 +00:00
Timo Kreuzer
013fff101d put back rbuild files in a proper state, so x86 can be compiled again (as soon as someone fixed Interlocked stuff)
svn path=/branches/ros-amd64-bringup/; revision=34863
2008-07-27 22:07:36 +00:00
Timo Kreuzer
a3869c4bce yet another advapi32 fix
svn path=/branches/ros-amd64-bringup/; revision=34862
2008-07-27 22:05:13 +00:00