Commit graph

43176 commits

Author SHA1 Message Date
Daniel Reimer 1048fa4974 Sync Winefile with Wine 1.2
svn path=/trunk/; revision=48209
2010-07-23 08:34:57 +00:00
Timo Kreuzer 88499392ee [PSEH]
Stub amd64 functions and remove leading underscores from symbols

svn path=/trunk/; revision=48207
2010-07-23 02:18:30 +00:00
Timo Kreuzer 66365c895c [PSEH]
Add (non working) 64bit code

svn path=/trunk/; revision=48206
2010-07-23 01:36:44 +00:00
Amine Khaldi 2aa6e09c17 [NDIS]
- Convert NDIS_ERROR_CODE from a typedef to a define.
- Add some missing NDIS_STATUS_* definitions.
- Some _ANONYMOUS_UNION/_ANONYMOUS_STRUCT/__GNU_EXTENSION -> __MINGW_EXTENSION conversions.
- Update NDIS_REQUEST_TYPE and NDIS_PER_PACKET_INFO.
- Guard several definitions against NDIS_LEGACY_DRIVER.
- Improve NDIS_REQUEST.
- Add missing CO_ADDRESS_FAMILY_INFINIBAND, Ndis{Set,Get}PacketCancelId, NDIS_PACKET_{FIRST,LAST}_NDIS_BUFFER and NDIS_PACKET_VALID_COUNTS.
- Group related definitions.
- Update several Ndis* function declarations.
- Add missing NdisInterlocked{Push,Pop}EntryList and NdisGetCurrentSystemTime macros.

svn path=/trunk/; revision=48205
2010-07-23 00:20:13 +00:00
Timo Kreuzer 7feaf99fb1 [NTOSKRNL]
- Add some missing constants for amd64
- Fix compilation of kd64
- Make MmAllocationFragment a SIZE_T

svn path=/trunk/; revision=48204
2010-07-22 23:22:57 +00:00
Daniel Reimer 60082fb243 Update FireFox, KDE, MirandaIM, Mono, Opera, RosBE64, SeaMonkey, ThunderBird, uTorrent, VLC in rapps.
svn path=/trunk/; revision=48203
2010-07-22 22:01:58 +00:00
Sir Richard 89acc3113a [NTOS]: Stop creating a memory area for the shared user data page.
[NTOS]: Also stop creating a memory area for the illegal user-mode parts of address space.
[NTOS]: Instead, mark the area between MM_HIGHEST_VAD_ADDRESS and MM_HIGHEST_USER_ADDRESS as being ARM3 as well: this way, ARM3 will get the illegal access (and fault), and it will also get the shared user data page access.
[NTOS]: With the previous commit, ARM3 knows how to handle the shared user data page access, and does so succesfully. End result: two more MAREA types have been removed, and the address space setup code is now much simpler.

svn path=/trunk/; revision=48202
2010-07-22 20:54:37 +00:00
Sir Richard da305551a9 Note: this patch only implements the code paths, they are not excercised yet.
[NTOS]: Implement handling a very special case of "prototype PTE", the one used to map the shared user data for user-mode applications.
[NTOS]: MiCheckVirtualAddress detects this (Windows behavior) and returns a prototype PTE that's marked MM_READONLY. This is our MmSharedUserDataPte from before. This gets sent to MiDispatchFault which calls MiResolveProtoPteFault to handle it. In turn, this calls MiCompleteProtoPteFault. All these code paths have heavy ASSERTions to only allow them to be hit for the shared user data page, however, in the far distant future when prototype PTEs are used for section objects, we'll at least have the right checks and code flow (many of these ASSERTions will then have to be removed).
[NTOS]: The end result is that we also now have STATUS_PAGE_FAULT_TRANSITION, not just STATUS_PAGE_FAULT_DEMAND_ZERO, and that prototype PTEs are somewhat understood and some assumptions have been removed.

svn path=/trunk/; revision=48201
2010-07-22 20:52:23 +00:00
Sir Richard dd68882cd0 [NTOS]: Stop handling PEB/TEB MAREAs since they're not used anymore.
svn path=/trunk/; revision=48200
2010-07-22 20:48:04 +00:00
Sir Richard 9e489a9b8e [NTOS]: Define the template prototype PTE.
svn path=/trunk/; revision=48199
2010-07-22 20:47:28 +00:00
Sir Richard 155c1e701b [NTOS]: Stop handling a bunch of MEMORY_AREA_TYPEs that aren't used anymore.
svn path=/trunk/; revision=48198
2010-07-22 20:46:49 +00:00
Sir Richard f907eeb4f9 [NTOS]: Antique leftover, initialize the shared user data page with MI_MAKE_HARDWARE_PTE_KERNEL
svn path=/trunk/; revision=48197
2010-07-22 20:46:19 +00:00
Cameron Gutman cee7a2a71e [DHCPCSVC]
- Add a hack so we wait for TCP/IP to get ready and bind to adapters instead of failing immediately after the first probe
- Live CD and 2nd stage setup now have fully functional networking :)

svn path=/trunk/; revision=48195
2010-07-22 19:37:33 +00:00
Sir Richard 128fd3ca92 [NTOS]: Allocate the PEB at a pseudo-random address just like Windows XP SP2 and later, to prevent certain kinds of exploits.
[NTOS]: Allocate PEB and TEB using VADs! The user-mode fault handler seems to work fine, and I could find no regressions. This is the beginning of the end for MAREAs for VM allocations (they will remain for sections).

svn path=/trunk/; revision=48194
2010-07-22 19:08:45 +00:00
Cameron Gutman 92d6d7210c [NDIS]
- Refresh the protocol bindings after a new miniport is added
- Adapters added after boot work now
- One step closer to Live CD networking

svn path=/trunk/; revision=48193
2010-07-22 19:01:49 +00:00
Sir Richard 135986ec2e [NTOS]: To Timo, with Love (make System PTEs work on x64).
svn path=/trunk/; revision=48192
2010-07-22 18:55:36 +00:00
Sir Richard 7fa909a601 [NTOS]: Add support for handling a very specific type of user-fault on ARM3 memory: memory belonging to a VAD allocation made for a PEB/TEB (read-write) that hasn't yet been allocated.
[NTOS]: Define the demand-zero PDE template.

svn path=/trunk/; revision=48190
2010-07-22 18:37:27 +00:00
Cameron Gutman 9a28440154 [NETCFGX]
- Start the TCP/IP driver after we install a network adapter
- This fixes the major bug that blocks Live CD networking but we still have some DHCP issues (DHCP starts and fails before the NIC and TCP/IP has been installed) and some other adapter detection issues that I need to look into but this is a good first step

svn path=/trunk/; revision=48188
2010-07-22 18:29:35 +00:00
Sir Richard 23c3e742d9 [NTOS]: Fix a very stupid bug which made any machine with less than 52GB of RAM appear as a "Small memory machine" (instead of 13MB).
[NTOS]: Initialize MmTotalCommitLimit, MmTotalCommitLimitMaximum for consistency.
[NTOS]: Initialize and honor MmAllocationFragment value from registry, or from defaults.
[NTOS]: Initialize the system cache working set pushlock.
[NTOS]: Implement Mi(Un)Lock(Process)WorkingSet inlines to handle the various scenarios. Replace broken/hacky code that was in the system loader, fault handler, and VM deletion paths with the correct macros. No locking is done yet as ReactOS' MAREA implementation overloads the Vm field in EPROCESS, but the correct APC blockings and state transitions are done.
[NTOS]: Add another helper from symbols, MI_IS_PAGE_TABLE_OR_HYPER_ADDRESS, and use it instead of the math-by-hand.
[NTOS]: Add MM_IS_ANY_LOCK_HELD and MI_WS_OWNER to help out the new working let locking inlines (names taken from symbols).
[NTOS]: Add _1GB helper for large-memory checks. Also define _1KB as "1024u". The "u" makes GCC not complain when sizes reach >= 2GB, because GCC will interpret the integer literals as "signed", even if the final calculated value is in an unsigned variable.

svn path=/trunk/; revision=48187
2010-07-22 18:26:04 +00:00
Timo Kreuzer 4ae7219e5c [NDK]
Include the correct mmtypes.h for amd64

svn path=/trunk/; revision=48186
2010-07-22 15:18:55 +00:00
Timo Kreuzer 6c1aa302b3 [NTDLL]
- Add amd64 stubs for LdrInitializeThunk and KiUserApcDispatcher

svn path=/trunk/; revision=48185
2010-07-22 14:49:42 +00:00
Timo Kreuzer 5544c14ffb [NTDLL]
- Comment out RtlWalkFrameChain for amd64

svn path=/trunk/; revision=48184
2010-07-22 14:44:27 +00:00
Timo Kreuzer 3c4ff1e189 [MSVCRT]
- export _ftol only on i386
- fix _setjmp (2nd argument) and redirect setjmp

svn path=/trunk/; revision=48183
2010-07-22 10:23:52 +00:00
Timo Kreuzer ecc9ac8278 [TLIST]
link to getopt library

svn path=/trunk/; revision=48182
2010-07-22 09:20:35 +00:00
Timo Kreuzer ca9e196050 [MINGW]
- Remove getopt from mingw lib and put it into it's own static library
- change crt="dll" to crt="static" for the mingw startup libs, to avoid things like importing from itself.

svn path=/trunk/; revision=48181
2010-07-22 09:20:03 +00:00
Sir Richard ba1b8c6dad [NTOS]: Fix "fail". Dedicated to Timo.
svn path=/trunk/; revision=48180
2010-07-22 05:22:26 +00:00
Timo Kreuzer 3ea611401e [NTOSKRL]
Add missing MI_LOWEST_VAD_ADDRESS for amd64

svn path=/trunk/; revision=48179
2010-07-22 04:19:27 +00:00
Timo Kreuzer 541d2436cd [NDK]
Fix MMADDRESS_NODE and MM_AVL_TABLE

svn path=/trunk/; revision=48178
2010-07-22 04:08:57 +00:00
Timo Kreuzer 5dd4d18e01 [FREELDR]
- In the fat bootsector, don't clobber ax, it contains the number of first cluster of freeldr.sys and is used by the fathelper code.
- Fix jump code in the fathelper code, like in the other bootsectors.
- Now booting from fat partitions (looks like that's what sysreg does) works again. It's safe under the condition that the cluster size is at least 4352 bytes, which is true for harddisks of sizes bigger than 272MB. Booting from smaller fat disks, like floppy breaks when freeldr.sys gets fragmented, which should rarely happen.

svn path=/trunk/; revision=48177
2010-07-22 03:29:25 +00:00
Sir Richard c30930d3ec [NTOS]: MiRosTakeOverPebTebRanges now creates a small ~1MB ARM3 memory range on top of the ReactOS per-process VA. This does a couple of things: First of all, it changes the default PEB address to another static address. Still not dynamic like it will be soon, but at least it changes it a bit so we can test if anything breaks due to that. It also likewise changes the addresses of the TEBs (Shifted down by 1MB, basically). Finally, it blocks off that part of address space, which nobody should be using now, to see if anyone does indeed touch it.
[NTOS]: Knowing if this change causes issues will help later in determining regressions due to TEB/PEBs mapped as VADs by ARM3, and regressions simply due to the change in VA layout.
[NTOS]: When implemented, the VAD mapping for PEB/TEB will only use that ~1MB, which yes, will limit ReactOS processes to each have only 256 threads. That is obviously a temporary limitation, one I doubt we'll even hit, but I'm putting it out here so you know.

svn path=/trunk/; revision=48176
2010-07-22 03:22:43 +00:00
Sir Richard d403f0ffd4 [NTOS]: Learn to build User PTEs as well, with MI_MAKE_HARDWARE_PTE_USER.
[NTOS]: MI_MAKE_HARDWARE_PTE becomes MI_MAKE_HARDWARE_PTE_KERNEL, since it assumed this. MI_MAKE_HARDWARE_PTE is now a "generic" you can use when you don't know what the PTE should be. It uses MiDetermineUserGlobalMask to set the right bits.
[NTOS]: Add two more helpers: MI_IS_PAGE_TABLE_ADDRESS and MI_IS_SYSTEM_PAGE_TABLE_ADDDRESS. One is in the symbols, the other I made up to make things clearer.
[NTOS]: MiResolveDemandZeroFault now knnows how to resolve user-demand-zero-faults.
[NTOS]: Implement MiZeroPfn to do the actual zeroing during user-demand-zero-faults (also later for VAD faults).

svn path=/trunk/; revision=48175
2010-07-22 02:20:27 +00:00
Sir Richard 7c3bc09fa1 [NTOS]: Add missing definitions, should fix build.
svn path=/trunk/; revision=48174
2010-07-22 02:10:43 +00:00
Sir Richard 40e4bc04b5 This patch introduces a highly-shareable version of AVL trees both for RTL usage and for ARM3's MM_AVL_TABLE/MMADDRESS_NODE structures used by VADs on Windows (and soon, ReactOS):
[RTL]: Uncouple generic table from AVL table implementation into its own avltable.c
[RTL]: Get rid of "Austin" and fix prototypes of AVL table functions.
[RTL]: Re-implement AVL table functions, sharing as much code as possible with the SPLAY tree implementation which is pretty decent. Lookup, insert, enumeration are implemented, but not delete.
[RTL]: Make large part of the RTL AVL package into its own "support" file that can work both with MMADDRESS_NODE and RTL_BALANCED_LINKS structures. The former is used by ARM3 for VADs.
[NTOS]: Implement basic VAD AVL tree routines (Insert, LookupEmpty, GetPrevious, CheckForConflict, Locate). This is enough to insert VADs, find a free address range, and locate a VAD by address. No delete yet
Thanks to Timo Kreuzer for some clever definitions, Knuth for his genius, several online C implementations for ideas, the HPI kernel blog for insight on how Windows does it, and others.

svn path=/trunk/; revision=48173
2010-07-22 01:41:45 +00:00
Sir Richard 23e18538f1 [NDK]: Add all the definitions regarding VADs.
svn path=/trunk/; revision=48172
2010-07-22 01:41:20 +00:00
Sir Richard 1ceb6d5850 [NDK]: Add missing RTL AVL Tree definitions, when used by user-mode applications.
svn path=/trunk/; revision=48171
2010-07-22 01:09:43 +00:00
Amine Khaldi 94896e3157 [PSDK]
- Forgot to commit this.

svn path=/trunk/; revision=48170
2010-07-21 23:47:33 +00:00
Amine Khaldi 281e92894d [DDK/NDIS]
- Group some related definitions.
- Remove some duplicated NDIS_MINIPORT_MAJOR_VERSION/NDIS_MINIPORT_MINOR_VERSION combinations.
- Add some missing NDIS_LEGACY_DRIVER guards.
- _ANONYMOUS_UNION -> __MINGW_EXTENSION
- Update NDIS_PROCESSOR_TYPE and NDIS_INTERFACE_TYPE.
- Guard NDIS_GENERIC_OBJECT with NDIS_SUPPORT_NDIS6.
- Add missing NDIS_WAN_GET_STATS, NdisAllocateGenericObject, NdisFreeGenericObject, fPACKET_WRAPPER_RESERVED and NDIS_FLAGS_* definitions.
- PNDIS_PACKET_POOL : HANDLE -> NDIS_HANDLE.
- Improve MEDIA_SPECIFIC_INFORMATION
- Some minor formatting.

svn path=/trunk/; revision=48169
2010-07-21 23:32:51 +00:00
Timo Kreuzer b03d6b06cd [RBUILD]
Generate an RSP rule for the bootloader, this fixes "input line too long" error reported by tower.

svn path=/trunk/; revision=48168
2010-07-21 23:17:12 +00:00
Jérôme Gardou efc09eb443 update README.WINE
svn path=/trunk/; revision=48167
2010-07-21 21:28:31 +00:00
Amine Khaldi ec46e3cec9 [DDK/NDIS]
- Add missing ntstatus.h inclusion.
- Group some related definitions.
- Add several missing ones.

svn path=/trunk/; revision=48165
2010-07-21 19:12:14 +00:00
Sir Richard f9444f0c52 [NTOS]: Handle faults on user-mode addresses, from user-mode processes, if they are owned by ARM3, so they can be forwarded to the VAD fault handler.
svn path=/trunk/; revision=48164
2010-07-21 18:09:31 +00:00
Sir Richard e6cdd4d0fd [NTOS]: If the memory area is owned by ARM3, and it's being freed, don't touch the pages, just unlink it and free the memory. This is useful for MAREAs being used by ARM3 to protect pieces of address space from the Ros Mm Allocator, but when we don't want it to start playing with our pages. When we do free those MAREAs, keep it away!
svn path=/trunk/; revision=48163
2010-07-21 17:58:09 +00:00
Amine Khaldi ce8b9f4fcb [CRT]
- Improve NULL definition.

svn path=/trunk/; revision=48162
2010-07-21 17:26:00 +00:00
Timo Kreuzer f0daba18dd [CRT]
- Add a number of amd64 specific math functions
- add generic c versions of cos and sin
- Remove leading underscores from amd64 symbols

svn path=/trunk/; revision=48161
2010-07-21 16:03:44 +00:00
Timo Kreuzer 6c98c1057f [GDIPLUS]
On amd64 builds link gdiplus to crt

svn path=/trunk/; revision=48160
2010-07-21 15:55:51 +00:00
Gabriel Ilardi 11a32bcc42 [DESK]
- Implement theme quick preview. Patch by Katayama Hirofumi.

See issue #5525 for more details.

svn path=/trunk/; revision=48159
2010-07-21 12:20:18 +00:00
Timo Kreuzer 8d8f884623 [MINGW]
Remove broken _fmode declaration

svn path=/trunk/; revision=48158
2010-07-21 03:22:27 +00:00
Timo Kreuzer 147a7b6fc9 [stdlib.h]
- Improve definition of __mb_cur_max and related
- properly handle _M_CEE_PURE

svn path=/trunk/; revision=48157
2010-07-21 02:55:59 +00:00
Timo Kreuzer 398f20dacd [NTDLL]
Add _setjmp, _setjmpex and longjmp exports on amd64

svn path=/trunk/; revision=48156
2010-07-21 02:53:24 +00:00
Timo Kreuzer 240c411b7d [RSYM64]
Silence annoying error messages

svn path=/trunk/; revision=48155
2010-07-21 02:52:37 +00:00