Commit graph

43385 commits

Author SHA1 Message Date
Kamil Hornicek 7d7d9eba48 [WIN32K]
Comply with the 32 bit alignment rule. Fixes hatch brushes.

svn path=/branches/reactos-yarotows/; revision=48396
2010-08-01 13:29:22 +00:00
Jérôme Gardou c2a010f5f1 [WIN32K]
- Revert unwanted change and get back to PAL_BGR for default DIB palette mode.
Now yarotows looks like an OS again.

svn path=/branches/reactos-yarotows/; revision=48390
2010-08-01 12:24:04 +00:00
Jérôme Gardou 787cb5551f [WIN32K]
- Finally get rid of ProbeAndConvertToBitmapV5Info
  - Rewrite renderBITMAPfromDIB, and a good bunch of DIB related functions accordingly.
  - Rewrite BITMAP_CopyBitmap into something simpler.
  - Use already existing DIB functions in IntGdiCreateDIBBrush
  - Use DIB sections in NtGdiStretchDIBitsInternal and NtGdiSetDIBits.
  - Use Bitmap hdc for NtGdiGetDIBitsInternal if there is one.

svn path=/branches/reactos-yarotows/; revision=48389
2010-08-01 12:17:35 +00:00
Jérôme Gardou 147e52c02c [WIN32K]
- Cast Colors to RGBQUAD in EngCreateBitmap, since that's what they are.
  - Copy selected palette of the DC when creating a DIBSection with DIB_PAL_COLORS.
  - Do not try to get Colors in NtGdiGetDIBitsInternal when bpp == 0, this doesn't make any sense.
  - Get rid of SURFACE::dsBitfields and SURFACE::biClrUsed.
  - Use RGB as default palette mod when creating the DIB Palette.

svn path=/branches/reactos-yarotows/; revision=48369
2010-07-30 02:15:46 +00:00
Jérôme Gardou b011aff53b [WIN32K]
- rewrite UserLoadImage so that it uses information from the BITMAPFILEHEADER and probes the right buffer.

svn path=/branches/reactos-yarotows/; revision=48364
2010-07-29 18:01:14 +00:00
Jérôme Gardou fa93ac8293 [WIN32K]
- Get rid of GetBMIFromBitmapV5Info

svn path=/branches/reactos-yarotows/; revision=48360
2010-07-29 16:21:02 +00:00
Jérôme Gardou 5cfcef35dc [WIN32K]
- Rewrite NtGdiGetDIBitsInternal, with WINE as a reference.
  - Get back DIB Section creation to classic BITMAPINFO.
This si the beginnig of the end for all this BITMAPV5INFO stuff.
It is horrible, BITMAPCOREINFO->BITMAPINFO is already made in user mode, and V4 and V5 features are not used so often.

svn path=/branches/reactos-yarotows/; revision=48359
2010-07-29 16:12:43 +00:00
Jérôme Gardou 21a56a9d82 sync with trunk (r48253)
svn path=/branches/reactos-yarotows/; revision=48255
2010-07-25 16:44:57 +00:00
Jérôme Gardou fbcac4b275 [WIN32K]
- More BITMAPINFO->BITMAPV5INFO
  - Do not use PAL_BITFIELDS when creating the DIB palette and we know that it's RGB
  - PSEH-ize NtGdiCreateDIBSection

svn path=/branches/reactos-yarotows/; revision=48248
2010-07-25 11:35:45 +00:00
Jérôme Gardou 7bb96de441 One leftover from sync
svn path=/branches/reactos-yarotows/; revision=48247
2010-07-25 11:19:21 +00:00
Jérôme Gardou 82822656c3 Sync with trunk (48237)
svn path=/branches/reactos-yarotows/; revision=48246
2010-07-25 11:17:52 +00:00
Sir Richard a28e798006 [NTOS]: Implement MmDeleteTeb, VADs are now deleted/freed on thread exit as well (but the underlying page is still leaked). Should fix the advapi32 security crash.
[NTOS]: Sometimes it seems we hit some bad VADs due to bugs? in the AVL tree implementation. I'm going on vacation for a month and can't look at this, so I've hacked the code to ignore such VADs for now, in the interest of fixing the winetest regression.

svn path=/trunk/; revision=48235
2010-07-24 16:28:51 +00:00
Sir Richard 2384532846 [NTOS]: Implement MmCleanProcessAddressSpace in ARM3, now the PEB/TEB VADs are removed when the process exits (although the pages are still leaking, for now), and the pool allocation for the VAD is also freed.
[NTOS]: Use ARM3 paged pool up until smss.exe starts. There's a last bug in the expansion code before we can get rid of the old paged pool.

svn path=/trunk/; revision=48234
2010-07-24 16:12:39 +00:00
Sir Richard 3ec9a11a16 [NTOS]: Reimplement MmCreateProcessAddressSpace in ARM3. Basically the same as before but using the ARM3 PFN list APIs, the ARM3 macros, etc. Once change is processes are now populating the MmProcessList, and the "MmGlobalKernelPageTable" isn't used anymore for new processes. Also the mappings come from SysPTE space, not hyperspace.
[NTOS]: More work will be needed in this area, but this gets rid of another ReactOS dinosaur.

svn path=/trunk/; revision=48233
2010-07-24 15:30:24 +00:00
Cameron Gutman ecd26cf41a [DHCPCSVC]
- Initialize length to prevent a possible buffer overflow
- Thanks to janderwald for finding my mistake

svn path=/trunk/; revision=48232
2010-07-24 15:04:24 +00:00
Sir Richard 7ea7b76e51 [NTOS]: Take over MmInitializeProcessAddressSpace, MmInitializeHandBuiltProcess, MmInitializeHandBuiltProcess2 into ARM3, and cleanup the code.
[NTOS]: Prepare to take over MmCreateProcessAddressSpace.

svn path=/trunk/; revision=48231
2010-07-24 15:01:05 +00:00
Amine Khaldi 3bb2ea0d09 [KMIXER]
- Remove memset and memcpy implementations from pin.c

svn path=/trunk/; revision=48230
2010-07-24 14:49:46 +00:00
Amine Khaldi e297cfa306 [NDIS]
- Move NDIS_HARDWARE_STATUS, GEN_GET_TIME_CAPS, GEN_GET_NETCARD_TIME, NDIS_MEDIA_STATE, NDIS_GUID, NDIS_PM_PACKET_PATTERN, NETWORK_ADDRESS, NETWORK_ADDRESS_LIST, TRANSPORT_HEADER_OFFSET and NDIS_CO_LINK_SPEED from ndis.h to ntddndis.h (where they should belong).
- typedef NDIS_STATUS for ntddndis.h
- Group some related definitions in ndis.h
- Some _ANONYMOUS_* -> __MINGW_EXTENSION conversions.
- Guard some definitions against NDIS_LEGACY_DRIVER.
- Add some missing definitions.
- NDIS_MINIPORT_BLOCK : PVOID  Signature; -> NDIS_OBJECT_HEADER Header;
- Add missing xfilter.h inclusion.
- Add some missing function declarations.
- Convert some function declarations into macros.
- Guard some definitions against NDIS_LEGACY_MINIPORT.

svn path=/trunk/; revision=48229
2010-07-24 13:47:41 +00:00
Amine Khaldi 39cec38832 [XDK]
- Missed this one (FORCEINLINE)
[DDK]
- Update DDK to reflect the XDK changes.

svn path=/trunk/; revision=48228
2010-07-24 10:51:22 +00:00
Amine Khaldi e1e0ed63e2 [[MINGW-W64]
- Tighten up reactos.diff now that we have all those diffs (except one) committed upstream.

svn path=/trunk/; revision=48227
2010-07-24 10:10:15 +00:00
Amine Khaldi 0e192aab81 [MINGW-W64]
- Sync gs_support.c now that our patches are committed upstream.

svn path=/trunk/; revision=48226
2010-07-24 09:59:34 +00:00
Amine Khaldi e7cebee706 [CRT]
- Add __MINGW_ATTRIB_UNUSED macro.

svn path=/trunk/; revision=48225
2010-07-24 09:52:46 +00:00
Amine Khaldi 74f12eeaf7 [XDK]
- Make sure FORCEINLINE comes as first in declarations.
[DDK]
- Update DDK to reflect the XDK changes.

svn path=/trunk/; revision=48224
2010-07-24 09:20:56 +00:00
Sir Richard be9e04b5cb [NTOS]: Implement an AVL node deletion algorithm (RtlpDeleteAvlTreeNode). Use it in MiRemoveNode, now implemeneted, and RtlDeleteElementGenericTableAvl, also now implemented. It hopefully works.
svn path=/trunk/; revision=48223
2010-07-24 04:00:22 +00:00
Timo Kreuzer bfc2638590 [NTOSKRNL]
Bring over all current amd64 specific code from the amd64 branch

svn path=/trunk/; revision=48222
2010-07-24 01:12:13 +00:00
Cameron Gutman 869cdbce37 - Fix epic naming fail (DhcpEnabled -> EnableDHCP
[DHCPCSVC]: Verify that the length is correct
[TCPIP]: Make sure DHCP is enabled before reading IP information

svn path=/trunk/; revision=48221
2010-07-24 00:25:59 +00:00
Timo Kreuzer 66b4c2ff3e [NTOSKRNL]
Add missing declarations

svn path=/trunk/; revision=48220
2010-07-23 23:50:26 +00:00
Timo Kreuzer 19540dcad5 [NTOSKRNL]
- Add KiGetLinkedTrapFrame for amd64
- Add MiAddressToPti
- Fix MmCreateProcessAddressSpace, MmInitializeHandBuiltProcess prototype (ULONG -> ULONG_PTR)
- #if out some C_ASSERTs for other architectures than x86
- #define InitializeSListHead to RtlInitializeSListHead on amd64
- Don't implement MiSyncARM3WithROS on amd64
- Implement RtlPcToFileHeader, RtlpGetStackLimits

svn path=/trunk/; revision=48219
2010-07-23 23:30:00 +00:00
Timo Kreuzer c168961990 [NDK]
Update amd64/asm.h to MSVC compatible format

svn path=/trunk/; revision=48218
2010-07-23 23:23:51 +00:00
Timo Kreuzer 56f8b1717a [NTOSKRNL]
Don't use freeldrhack on amd64

svn path=/trunk/; revision=48217
2010-07-23 22:40:13 +00:00
Cameron Gutman 59081046c2 - Remove some debug info that I forgot about
svn path=/trunk/; revision=48216
2010-07-23 22:33:09 +00:00
Cameron Gutman 63dfd0ccaa [NETCFGX]
- Create the DhcpEnabled value in the registry
[TCPIP]
- Apply the static IP address configuration data
[DHCPCSVC]
- Remove the static IP address code

svn path=/trunk/; revision=48215
2010-07-23 22:30:27 +00:00
Cameron Gutman 00e8981795 [DHCPCSVC]
- Generate a link-local IP address if DHCP fails
- Don't destroy the IP addresses in the registry

svn path=/trunk/; revision=48213
2010-07-23 21:57:08 +00:00
Cameron Gutman 3d5cb94c4a [NDIS]
- Verify that each adapter has been initialized before passing it to the protocol's BindAdapter function
- Also verify that each adapter has not already been bound to the protocol
- Miniport drivers can now function without a reboot (needed to use 3rd-party NIC drivers on the live CD)

svn path=/trunk/; revision=48212
2010-07-23 16:34:35 +00:00
Amine Khaldi e814e6afe8 [NDIS]
- Guard several definitions against NDIS_SUPPORT_60_COMPATIBLE_API.
- __GNU_EXTENSION -> __MINGW_EXTENSION conversions.
- Group some related definitions.
- Update NDIS_RW_LOCK.
- Improve NDIS_TIMER_FUNCTION.
- Add several missing Ndis* function declarations.
- Guard several definitions against NDIS_LEGACY_DRIVER and NDIS_LEGACY_MINIPORT.
- Convert some function declarations into macros.

svn path=/trunk/; revision=48211
2010-07-23 15:51:54 +00:00
Daniel Reimer 87b3292e96 Sync reg, xcopy, winhlp32, wordpad with Wine 1.2
svn path=/trunk/; revision=48210
2010-07-23 08:36:51 +00:00
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