Commit graph

43420 commits

Author SHA1 Message Date
Eric Kohl 1e34ad4d19 Translated new boot loader options and fixed a typo.
svn path=/trunk/; revision=48709
2010-09-06 10:24:50 +00:00
Eric Kohl fd61ebc8bb fdc.inf: Fix a typo in the class guid.
hdc.inf: Add missing manufacturer string.

svn path=/trunk/; revision=48708
2010-09-06 09:53:36 +00:00
Eric Kohl b9159984e7 NtAdjustPrivilegesToken: Probe and capture parameters before use.
See issue #5497 for more details.

svn path=/trunk/; revision=48707
2010-09-06 09:51:46 +00:00
Timo Kreuzer 3995cce1ba [USETUP]
The VBR (volume boot sector) contains a structure called BPB (bios parameter block) that describes the disk and the partition. The HiddenSectors member contains the number of the first sector of the partition. This is used by the VBR code to load the secondary sector containing additional boot code that is located at secor 14 relative to the partition start. Previously we were copying the BPB (plus additionally the OemName, which makes no sense) from the old VBR. Now Linux is a bit lame and doesn't put the correct value into the HiddenSectors field. Instead it sets it to the number of sectors per track which seems to be the default value. When now the linux partition manager decides to do a non standard partitioning, aligning the partition to 0x800, then the VBR fails to load it's 2nd sector. Fix this by correcting the value in the BPB with the value from the partition info.

See issue #2733 for more details.

svn path=/trunk/; revision=48706
2010-09-06 01:46:06 +00:00
Michael Martin 74d5088c7d [usb/usbhub]
- Start rewrite of usbhub driver using the old and dead usbhub driver in trunk.
- Implement QueryRootHub for sending USB request to miniport driver.
- Implement new IRP_MN_START_DEVICE.  
Get the roothubs PDO and FDO and forward the start device down to start the PDO.
Get USBDI and HUB interfaces. Set all ports as returned by DCI GetExtendedHubInformation to powered and reset.
- Temporary add some usb specific defines until header is fixed.
- Fix Formatting.



svn path=/trunk/; revision=48705
2010-09-05 19:00:37 +00:00
Michael Martin 639f26f1b5 [usb/usbehci]
- Fix flags settings for PortStatus and PortChange so that the correct flags are set when hub driver sets/requests them.
- Use FastMutex to protect access to async queue and frame list.
- For USB CONFIG DESC, Check the output buffer size before attempting to write all configuration descriptors.
- Fix a bug that caused bmRequestType to be incorret value when requesting configuration and string descriptors.
- Modify some debugging to make it easier to see debug messages from usbhub driver.

svn path=/trunk/; revision=48704
2010-09-05 18:43:17 +00:00
Cameron Gutman 38a87f0176 [USETUP]
- Add the option to write only the VBR so FreeLoader can easily be chain loaded by GRUB or another boot loader
- Dedicated to James Tabor :)

svn path=/trunk/; revision=48703
2010-09-05 17:09:18 +00:00
Timo Kreuzer 113c47805c Update the GAS compatible fathelp.S file to reflect the latest changes to the original file (freeldr PE conversion). This version is tested and works.
svn path=/trunk/; revision=48701
2010-09-05 16:03:08 +00:00
Cameron Gutman f276fcd056 [USETUP]
- Remove code that was corrupting disk data and causing setup to fail in rare cases
- Write the MBR in all cases (Windows setup behavior too)
- We can overwrite GRUB and LILO now but we still can't boot because we have trouble reading the partition table if it was made in Linux

svn path=/trunk/; revision=48700
2010-09-04 20:56:19 +00:00
Sir Richard edfb344c53 [NTOS]: Remove useless variables in kernel code that were set, but never actually used (dead code, tests, copy/pasters). If a variable was set but not used because of missing/#if'ed out code, a note was added instead.
[NTOS]: In the process, fix bugs in the Event dispatcher code that used Win32 EVENT_TYPE instead of NT KOBJECTS enumeration.
[NTOS]: Fix a bug in ObpInsertHandleCount, where the object access check was being done with the previous mode, instead of honoring the probe mode, which is defined by OBJ_FORCE_ACCESS_CHECK.
[NTOS]: Fix a bug in a section function which was always returning STATUS_SUCCESS, now it returns the result of the previous Status = function assignment. If this isn't desired, then don't check for the Status anymore.
[NTOS]: Note that MDL code does not support SkipBytes argument. If it is used, MDL could be invalid.
[NTOS]: Add checks for VerifierAllocation and set it when needed (WIP).
[NTOS]: Clarify what _WORKING_LINKER_ is, and the legal risks in continuing to use a linker that builds non-Microsoft drivers when used with headers whose EULA specify that they can only be used for Microsoft drivers.

svn path=/trunk/; revision=48692
2010-09-04 08:17:17 +00:00
Cameron Gutman 93ae36ab99 [OSKITTCP]
- Check for a shutdown connection that we missed a few times
- Remove some junk and stop playing with flags behind oskit's back
- Fix an invalid parameter check
- Enable a check to ensure that accept doesn't get called for a socket that isn't listening
- Use the queue manipulation function instead of manually changing the queue
- Signal that we accepted/connected a socket
[IP]
- Set the network mask and destination address in TCPGetInterfaceData

svn path=/trunk/; revision=48686
2010-09-02 04:18:17 +00:00
Aleksey Bragin 33fffd0b38 [PSDK]
- Add BS_TYPEMASK definition.

svn path=/trunk/; revision=48678
2010-09-01 13:40:35 +00:00
Amine Khaldi ef43524fff [CRT]
- Fix __MINGW_MSC_PREREQ logic.

svn path=/trunk/; revision=48657
2010-08-30 13:48:40 +00:00
Michael Martin 9b7e628d96 Patch by Pierre Schweitzer.
[CDFS]
- Several fixes for directory information query.
- Fixed a null access memory under certain circumstances.
- Added support for media ejection.
[FASTFAT]
- Fixed calls to CcMapData(), CcPinRead().
- Fixed an endless loop in FCB management under certain circumstances.
[NTOSKRNL]
- Fixed wrong prototype for IopParseDevice().

svn path=/trunk/; revision=48654
2010-08-30 11:51:17 +00:00
Sir Richard c574f50663 [NTOS]: Add an extra layer of protection for freed nonpaged pool: write a 4-byte signature on freed blocks, and assert its valid on checked builds. Use a slightly less egocentric ASCII value than on Windows (name of the developer who wrote the first memory manager).
svn path=/trunk/; revision=48651
2010-08-29 19:32:25 +00:00
Sir Richard b85ab20f13 [NTOS]: Missed a bunch of codepaths, protected pool "should" work now.
svn path=/trunk/; revision=48650
2010-08-29 19:27:58 +00:00
Sir Richard cf28a01e5e [NTOS]: Add DRIVER_CAUGHT_MODIFYING_FREED_POOL bugcheck code.
[NTOS]: Add support for protected freed nonpaged pool. This is controlled through MmProtectFreedNonPagedPool, which is initialized based on a registry value (see cmdata.c). This is not "Special Pool", but a useful debugging feature Windows implements that we now have too, since I noticed a lot of mj's work was with freed pool access.
NB. It's 3AM and I have not tested this, it should be off in trunk by default, you'll need to try turning it on and testing it. Hope it helps.
--This line, and those low, will be ignored--

M    ntoskrnl/mm/ARM3/pagfault.c
M    ntoskrnl/mm/ARM3/pool.c
M    include/reactos/mc/bugcodes.mc

svn path=/trunk/; revision=48649
2010-08-29 19:13:08 +00:00
Cameron Gutman 1afef0ace6 [ACPI]
- Read and report ACPI_RESOURCE_TYPE_FIXED_MEMORY32

svn path=/trunk/; revision=48648
2010-08-29 18:40:33 +00:00
Michael Martin 52929981d9 [cdfs]
- Working with Pierre Schweitzer for yet another NonPaged Pool corruption fix. When copying VolumeLabel the VolumeLabelLength is in Unicode, so theres no need to mulitply it by size of WCHAR. 

svn path=/trunk/; revision=48646
2010-08-29 17:46:18 +00:00
Timo Kreuzer 69814e0c5b [NTOSKRNL]
Modified version of r48640: 
- update the NodeHint to the root node when deleting a node
- remove this code from MmCleanProcessAddressSpace

svn path=/trunk/; revision=48642
2010-08-29 08:35:54 +00:00
Michael Martin fbf071095a [ntoskrnl]
- Revert 48640, as it was incorrect.

svn path=/trunk/; revision=48641
2010-08-29 07:18:47 +00:00
Michael Martin 690399c881 [ntoskrnl]
- When a node is removed, check the NodeHint of the table to see if it matches the one being removed. If so update the NodeHint to the PreviousNode. FIxes VAD corruption messages.

svn path=/trunk/; revision=48640
2010-08-29 07:00:52 +00:00
Cameron Gutman 73e641d29b - Disable ACPI again
svn path=/trunk/; revision=48639
2010-08-29 03:51:21 +00:00
Cameron Gutman 2450e46a56 [NTOSKRNL]
- Fix a regression in ACPI function from r48581
- Enable ACPI for testing purposes (will be disabled next commit)

svn path=/trunk/; revision=48638
2010-08-29 03:48:59 +00:00
Cameron Gutman c8ff03d682 [TCPIP]
- Don't allocate pool if there is nothing in the route table
- Fixes bug 5493

svn path=/trunk/; revision=48637
2010-08-29 02:29:10 +00:00
Michael Martin a3370efc0a [win32k]
- Mouse messages can be sent before the desktop is initialized. Check for this and return false if its not. FIxes assert when moving mouse before desktop is up.

svn path=/trunk/; revision=48636
2010-08-28 23:55:27 +00:00
Michael Martin a5bab7504e [input/i8042prt]
- Fix a check when queuing the mouse packet. Check that the buffer size (MouseInBuffer) is not greater or equal to MouseDataQueueSize. Fixes a NonPagedPool corruption that occurs when the mouse is moved before the desktop window is up and running.

svn path=/trunk/; revision=48635
2010-08-28 23:23:43 +00:00
Michael Martin 87e8d75f00 [ntoskrnl/ps]
- When deleting a Process remove the Process from the MmProcessList. Fixes random NonPaged Pool corruptions.  Thanks aicom for assistance.

svn path=/trunk/; revision=48632
2010-08-28 00:26:02 +00:00
Michael Martin a9e0dc23a4 [ntoskrnl/ps]
- Acquire and Release RundownProtection on the Parent Pocess not the newly created Pcess when setting the SectionObject.

svn path=/trunk/; revision=48631
2010-08-27 22:18:10 +00:00
Timo Kreuzer 3a325683bc [WIN32K]
- Rework EngSetPointerShape, to first allocate the neccessary surfaces, before deleting the old ones. Also check in IntShowMousePointer if a saving surface is present. This way a failure to allocate a surface will not result in a crash, but keep the old mouse pointer.

See issue #5402 for more details.

svn path=/trunk/; revision=48630
2010-08-27 10:57:54 +00:00
Timo Kreuzer cb6ae2faab [USER32]
- Revert r47238 as requested by Giannis: "this commit breaks any program that wants to subclass mdi client windows"

svn path=/trunk/; revision=48629
2010-08-27 10:20:25 +00:00
Cameron Gutman b0a5ac396e [OSKITTCP]
- Only tell the caller how much we sent/received if it completed successfully
- Set SO_DONTROUTE on accepted sockets too
- Disable the core routing code
- Make our MSS calculation much better by sharing the existing code

svn path=/trunk/; revision=48628
2010-08-27 04:46:04 +00:00
Colin Finck 9f187ad465 Fix building on newer Linux systems (particularly Fedora 13)
Thanks to James, Sylvain and ErVito for testing!

See http://reactos.org/pipermail/ros-dev/2010-August/013338.html for more details

svn path=/trunk/; revision=48627
2010-08-26 18:33:46 +00:00
Timo Kreuzer e04ebf1980 [NTOSKRNL]
- Fix to PpSetCustomTargetEvent(), not to make caller wait forever in case it provided an event it waits for
- Patch by Pierre Schweitzer

svn path=/trunk/; revision=48626
2010-08-26 15:25:33 +00:00
Timo Kreuzer 6ddec3f063 Fix build
svn path=/trunk/; revision=48625
2010-08-26 02:48:03 +00:00
Cameron Gutman 0553d5160c [OSKITTCP]
- Prevent multiple wakeups for the same event which caused nasty problems for the SEL_FIN event because we dereferenced our connection context 3 times which not only caused the connection endpoint to be freed while holding its spin lock but made the reference count negative
[TCPIP]
- Disassociate the address file from the connection endpoint before dereferencing/closing it to avoid a double dereference of the address file (not as harmful in this case as in the connection endpoint case)
[IP]
- Dereference the connection endpoint again if it was associated with an address file as the connection endpoint to fix a reference leak

svn path=/trunk/; revision=48624
2010-08-26 02:29:38 +00:00
Timo Kreuzer 1b2ab4ce31 [NTDLL_APITEST]
- Add a test for RtlInitializeBitMap.

svn path=/trunk/; revision=48623
2010-08-26 02:29:19 +00:00
Timo Kreuzer da3e12b450 delete old Zwcontinue test
svn path=/trunk/; revision=48622
2010-08-25 10:15:34 +00:00
Timo Kreuzer 14d5a266b3 [ROSTESTS]
- Add wine style ntdll_apitest and move test for ZwContinue there

svn path=/trunk/; revision=48621
2010-08-25 10:15:01 +00:00
Timo Kreuzer 57434c8ebf Add missing files
svn path=/trunk/; revision=48620
2010-08-25 08:50:10 +00:00
Timo Kreuzer ecc6804976 [APITESTS]
Convert dciman32api, user32api and wa2_32 into wine style tests

svn path=/trunk/; revision=48619
2010-08-25 08:48:55 +00:00
Timo Kreuzer 967f731f6a [FASTFAT]
- "Fix for a stupid mistake"
- patch by Pierre Schweitzer

svn path=/trunk/; revision=48618
2010-08-25 08:29:52 +00:00
Timo Kreuzer e3a2103631 Convert gdi32api into wine style test
svn path=/trunk/; revision=48617
2010-08-24 13:54:10 +00:00
Timo Kreuzer bc064d7ed4 Fix copy paste error in file header
svn path=/trunk/; revision=48616
2010-08-24 05:27:39 +00:00
Timo Kreuzer fdd4f2b50b [REGTESTS]
Add bugs_regtest. This can be used to create testcases / regression tests for already fixed bugs. I added a first test for bug 3481

svn path=/trunk/; revision=48615
2010-08-24 05:20:16 +00:00
Timo Kreuzer 337a1faad6 [WINGDI.H]
Add missing GetCharWidthI, GetTextExtentExPointI, GetTextExtentPointI

svn path=/trunk/; revision=48614
2010-08-24 05:19:31 +00:00
Cameron Gutman 0ea1a11d0d - Revert the change from REG_SZ to REG_MULTI_SZ because it turns out that Windows does it this same way (research fail?)
svn path=/trunk/; revision=48611
2010-08-23 21:11:01 +00:00
Timo Kreuzer 2ddee30677 [NTOSKRNL]
- Rewrite MiFindEmptyAddressRangeDownTree. The old implementation's "most awesome loop" duplicated both the initialization and the interation steps. It was also overcomplicated. The new implementation additionally returns the parent for the following table insertion, so this doesnt need to be done in an extra search. The return value is changed from NTSTATUS to TABLE_SEARCH_RESULT
- Modify MiInsertNode to accept a parent and TABLE_SEARCH_RESULT instead of searching for a free location.
- Modify MiCreatePebOrTeb to make use of the new features
- Handle failed allocation of the PEB/TEB
- Fixes a failed assertion that Olaf got
- I tested this code quite some time and no problems were found

svn path=/trunk/; revision=48606
2010-08-23 03:00:03 +00:00
Timo Kreuzer b8e0dc9948 [WIN32K]
Seperate DC_vSetLayout from NtGdiSetLayout and save the old value before setting the new one.

svn path=/trunk/; revision=48605
2010-08-23 01:41:56 +00:00
Timo Kreuzer 7aa6c115ea [WIN32K]
Move the allocation of the vis region of the DC to a later position, so that all mandatory fields are initialized before we try to delete the DC in failure case. Fixes yet another possible crash.

svn path=/trunk/; revision=48604
2010-08-23 01:39:28 +00:00