Commit graph

2980 commits

Author SHA1 Message Date
Stefan Ginsberg 0ebeef15a1 - Fix broken VideoPortSignalDmaComplete definition
- Cleanup and reformat dma.c and add missing functions (not yet exported)

svn path=/trunk/; revision=35009
2008-08-01 14:54:19 +00:00
Pierre Schweitzer 00b5f8b803 Removed wrong FIXME: CcInitializeCacheMap doesn't raise exceptions.
See issue #3315 for more details.

svn path=/trunk/; revision=34998
2008-08-01 12:08:01 +00:00
Art Yerkes 4b9274519b Patch by Cameron Gutman (aicommander (at) gmail (dot) com)
- Remove a hack related to cancellation
- Make sure not to pass on a bad IRP on failure (in tdi)
- Remember connect irp
* Note: commit notes are arty's in this case

svn path=/trunk/; revision=34943
2008-07-30 06:05:20 +00:00
Art Yerkes d006ec695e Patch by Cameron Gutman (aicommander (at) gmail (dot) com)
- Remove a hack from DispTdiSendDatagram
- Fix a couple of bugs that resulted in clearing the wrong request

svn path=/trunk/; revision=34938
2008-07-29 21:52:09 +00:00
Art Yerkes 298e26754b - Reverse my previous (in retrospect) hack
- Make MmProbeAndLockPages smart enough to work at DISPATCH_LEVEL
- At Alex' request, remove the stand alone spinlock for the page list, and
  use the queued spinlock in the prcb.

svn path=/trunk/; revision=34920
2008-07-28 22:05:56 +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
Art Yerkes 43bf5f1b02 More specific error messages. More correct according to winetests.
svn path=/trunk/; revision=34828
2008-07-27 08:12:12 +00:00
ReactOS Portable Systems Group 54f208ec84 - Silence debug prints.
svn path=/trunk/; revision=34819
2008-07-27 05:37:38 +00:00
Hervé Poussineau 4b1181962c Cleanup code
svn path=/trunk/; revision=34793
2008-07-25 20:28:59 +00:00
Hervé Poussineau 242b0d5be5 Replace DPRINT/DPRINT1 by dynamic traces
svn path=/trunk/; revision=34791
2008-07-25 20:24:46 +00:00
Hervé Poussineau eac2f712a7 Use a common .spec file instead of a .def file per architecture
svn path=/trunk/; revision=34755
2008-07-24 20:54:32 +00:00
Art Yerkes 5c108dbe7d Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Fix a few issues in the cancel routine
- Don't wait on an event we haven't set
- Don't mark the IRP pending when in DispPrepareIrpForCancel

svn path=/trunk/; revision=34682
2008-07-22 12:53:25 +00:00
ReactOS Portable Systems Group d69ea33500 - Don't re-map the MDL if it's already been built from non-paged pool.
- Hackforce the partition type for disk ramdisks to be FAT32 for now.


svn path=/trunk/; revision=34668
2008-07-22 09:32:02 +00:00
ReactOS Portable Systems Group 6c50287599 - Initialize BytesPerSector, SectorsPerTrack and NumberOfHeads to zero.
- Calculate number of cylinders too now.
- Save number of hidden sectors as well.
- Implement support for IOCTL_DISK_GET_PARTITION_INFO (RamdiskGetPartitionInfo).
- Implement support for IOCTL_DISK_GET_DRIVE_GEOMETRY (shared with IOCTL_CDROM_GET_GEOMETRY, IOCTL_STORAGE_GET_MEDIA_TYPES and IOCTL_DISK_GET_MEDIA_TYPES)
- DiskLength should be a LARGE_INTEGER.
- DiskOffset should be signed.


svn path=/trunk/; revision=34666
2008-07-22 08:52:18 +00:00
ReactOS Portable Systems Group c61f672499 - We have to unpack the BIOS block before actually reading it.
- Now we correctly read 512 bytes per sector instead of 0.
- We are almost there!


svn path=/trunk/; revision=34665
2008-07-22 07:12:05 +00:00
ReactOS Portable Systems Group 1f497aae89 - Jesus, Fix yet another math bug in RamdiskMapPages (we were lucky not to hit it, that's all).
- Implement RamdiskUnmapPages.
- Need to implement MmRawDeleteVirtualMapping to make this last step work.


svn path=/trunk/; revision=34663
2008-07-22 06:54:25 +00:00
ReactOS Portable Systems Group 7fdb4518b7 - Epic Fail? Fix another math bug...it actually works now!
- Fix another wrong debug print.


svn path=/trunk/; revision=34662
2008-07-22 06:46:09 +00:00
ReactOS Portable Systems Group 22a37283cc - Double fail: Fix a math bug, calculate the actual offset in the mapping and return it, and don't forget to return the total length read too.
svn path=/trunk/; revision=34661
2008-07-22 06:40:00 +00:00
ReactOS Portable Systems Group 04dfc992a1 - Fail: was using the wrong structure (the boot sector is a BOOT_SECTOR which contains the BIOS Parameter Block, not a BPB directly).
- Fix wrong debug print too.

svn path=/trunk/; revision=34660
2008-07-22 06:31:31 +00:00
ReactOS Portable Systems Group d543929a55 - Save base page where loader mapped the ramdisk.
- Try to implement RamdiskMapPages for boot disks as it seems we're calling them now...
- The math works and the I/O mapping too, but I'm not sure we're reading correct data, so still left this unimplemented for now.


svn path=/trunk/; revision=34659
2008-07-22 06:21:11 +00:00
ReactOS Portable Systems Group 2b398fba13 - Um, yeah, the "DiskType" is CLEARLY not an NT FILE_DEVICE_ constant... this makes no sense at all.
- Defined some proper constants (somewhat based on guesses, but should be mostly correct) for the DiskType.
- Now the code actually makes sense, instead of talking about CD-ROM File Systems and CD-ROMs everywhere (and Controllers and...floppies?!)


svn path=/trunk/; revision=34657
2008-07-22 05:49:52 +00:00
ReactOS Portable Systems Group c6a3ef9f7e - Build vfatfs instead of CDFS.
- Load vfatfs instead of CDFS.
- Implement code in the ramdisk driver to handle both ISO and FAT ramdisks. Don't know what the big deal with support ISO ramdisks was supposed to be, when our ramdisk is FAT, and dealing with FAT is a lot easier than CDFS (no TOC emulation and other rubbish that was added).


svn path=/trunk/; revision=34655
2008-07-22 05:31:24 +00:00
ReactOS Portable Systems Group c4a2e2e22b - Implement RamdiskReadWrite.
- Implement RamdiskReadWriteReal.
- We now have a working copy loop for both read and write operations.
- Need to implement RamdiskMapPages and RamdiskUnmapPages -- then we'll nearly be done!


svn path=/trunk/; revision=34625
2008-07-21 06:35:39 +00:00
Art Yerkes 861184aa18 Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Forgot to remove UnlockRequest in last patch

svn path=/trunk/; revision=34624
2008-07-21 05:44:10 +00:00
ReactOS Portable Systems Group 63c51607f5 - Get rid of 3 days of work due to complaints from our legal guy.
svn path=/trunk/; revision=34622
2008-07-21 01:15:07 +00:00
ReactOS Portable Systems Group f28f30eafa - Implement IOCTL_CDROM_GET_LAST_SESSION and IOCTL_CDROM_READ_TOC.
- The formet is a hack to support ReactOS' cdfs.


svn path=/trunk/; revision=34621
2008-07-21 01:12:17 +00:00
Timo Kreuzer 35b23ed1d4 rbuild files use tab indentation
svn path=/trunk/; revision=34620
2008-07-20 23:21:16 +00:00
ReactOS Portable Systems Group c1937b5160 - Now it compiles.
- Add wdk_wnet_to_ros.diff to easily merge changes with any possible future WDK updates.

svn path=/trunk/; revision=34616
2008-07-20 19:56:09 +00:00
ReactOS Portable Systems Group 77a8db07f3 - Add new CDFS driver.
- Does not compile.


svn path=/trunk/; revision=34615
2008-07-20 19:52:30 +00:00
ReactOS Portable Systems Group 87f76ea54b - Our resident GCC expert just informed me of an undocumented "enable Microsoft Compiler Extensions" flag that makes things like unnnamed members work.
- Apply the switch and remove our workaround hack.


svn path=/trunk/; revision=34614
2008-07-20 19:39:55 +00:00
ReactOS Portable Systems Group 840143e28a - Fix the way NlsOemLeadByteInfo is exported.
- Fix definition of PFAST_IO_UNLOCK_ALL_BY_KEY.
- Add IO_REPARSE and IO_REMOUNT definitions.
- Add IOCTL_CDROM_DISK_TYPE definition.
- Add FlagOn, BooleanFlagOn, SetFlag and ClearFlag definitions.
- Add FILE_READ_ONLY_VOLUME, FILE_SEQUENTIAL_WRITE_ONCE, FILE_SUPPORTS_TRANSACTIONS definitions.
- Add FSRTL_FLAG_ADVANCED_HEADER definition.
- Add FSRTL_FLAG2_PURGE_WHEN_MAPPED and FSRTL_FLAG2_IS_PAGING_FILE definitions.
- Add FILE_ID_FULL_DIR_INFORMATION and FILE_ID_BOTH_DIR_INFORMATION structures.
- Add FSRTL_FCB_HEADER_V0 and FSRTL_FCB_HEADER_V1 definitions.
- Add FSRTL_COMPARISION_RESULT enumeration.
- Add backwards compatibility support for non-AVL tree routines.
- Add RtlInsertElementGenericTableAvl, RtlDeleteElementGenericTableAvl, RtlLookupElementGenericTableAvl, RtlEnumerateGenericTableWithoutSplayingAvl prototypes.
- Add FsRtlSetupAdvancedHeader macro.
- Add FsRtlIsFatDbcsLegal prototype.
- Add FsRtlTeardownPerStreamContexts prototype.
- Add RtlFreeOemString, RtlOemStringToCountedUnicodeString, RtlUnicodeStringToCountedOemString, RtlOemToUnicodeN prototypes.
- Fix GenericTable prototypes in rtlfuncs.h
- It seems the ntoskrnl_i386.def exports file is totally incorrect with respect to mingw -- most FsRtl functions are not properly exported. We fixed the ones we need, someone needs to go fix this entire file.
- Add memcmp to the NTOS exports -- we're not entirely sure how you were even expecting 3rd party drivers to load in React?
- Fix FastFat's "VfatFastIoUnlockAllByKey" prototype to match the fixed up PFAST_IO_UNLOCK_ALL_BY_KEY definition.
- Clean-build-tested on i386.


svn path=/trunk/; revision=34611
2008-07-20 19:19:02 +00:00
ReactOS Portable Systems Group b1e617cc6f - Write out all the IOCTLs the RAM Disk emulation core needs to handle.
- Looks like the React CDFS driver behaves very differently from the NT CDFS driver.


svn path=/trunk/; revision=34608
2008-07-20 16:13:19 +00:00
ReactOS Portable Systems Group 7158e5bfa9 - Fix the parameters we were sending to IoCreateDevice for our drive FDO.
- Now the kernel attempts to mount us through CDFS!
- Start stubbing the work we'll need to do in RamdiskDeviceControl -- this is where the emulation magic will happen.

svn path=/trunk/; revision=34604
2008-07-20 06:32:23 +00:00
ReactOS Portable Systems Group 14ea158446 - Finish implementing RamdiskCreateDiskDevice -- we should now have a working ramdisk drive that should receive read/write requests.
svn path=/trunk/; revision=34602
2008-07-20 04:39:01 +00:00
Art Yerkes 5ba974a93f Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Fixes some issues with releasing locks
- Verify that we have an MDL before trying to unlock it

svn path=/trunk/; revision=34600
2008-07-20 04:33:53 +00:00
ReactOS Portable Systems Group df5fe4469c - Fixup some more structure and prototype details to make more sense.
- Start building the drive FDO extension by capturing most of the input data and our strings.

svn path=/trunk/; revision=34597
2008-07-19 22:42:18 +00:00
ReactOS Portable Systems Group 1176b541f6 - Create the RAM Disk Drive Device Object.
- Create the name for it, based on the GUID sent by the kernel.
- Create the DOS Device Symbolic Link if requested and if possible.
- Create the DOS Drive Letter if requested.
- (drivers/storage/class/ramdisk/ramdisk.c:440) Creating symbolic link: \DosDevices\C: to \Device\Ramdisk{d9b257fc-684e-4dcb-79ab-f6a2cf0350b7}
- Need to continue implementing..


svn path=/trunk/; revision=34596
2008-07-19 22:21:38 +00:00
ReactOS Portable Systems Group 8ee4e020f8 - Implement the main RamdiskWorkerThread work loop.
- Now we have to implement RamdiskCreateDiskDevice for real.

svn path=/trunk/; revision=34594
2008-07-19 21:19:41 +00:00
ReactOS Portable Systems Group 5bcb1c6a0e - Usually a good idea to fill out the device relation count instead of leaving it uninitailized to 2 billion.
- Fixes all the ramdisk problems -- need to implement RamdiskWorkerThread now.

svn path=/trunk/; revision=34592
2008-07-19 20:57:31 +00:00
ReactOS Portable Systems Group fd5bd1942d - Seperate the Ramdisk device extension into the Bus Device Extension and the Drive Device Extension.
- Rename the device types to Bus vs Drive, not FDO vs PDO (they're both FDOs).
- Use a common extension (the first 0x60 bytes or so) between Bus and Drive devices.
- Implement first pass of RamdiskCreateDiskDevice -- doesn't create anything, just validates the parameters.
- Implement our delayed work queue for handling requests asynchronously -- SendIrpToThread. Doesn't do anything for now.
- Implement RamdiskQueryDeviceRelations... not sure if we're doing the right thing. According to PnP, we get a warning that we are "misbehaving".
- Driver seems to crash right now, needs fixes.
- Some reformatting to make more lines fit inside 80 characters so it looks nice in joe.


svn path=/trunk/; revision=34589
2008-07-19 18:44:31 +00:00
Art Yerkes 747d575347 Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Reenable spinlocks in MiniIndicateData
- Don't raise IRQL when calling MiniDoRequest

svn path=/trunk/; revision=34574
2008-07-18 11:19:29 +00:00
Art Yerkes ecdd55845d Patch by Cameron Gutman (aicommander <at> gmail <dot> com)
- Don't mess with cancelled IRPs
- Don't attempt to cancel an already cancelled IRP
- Unmap MDL when then IRP gets completed

svn path=/trunk/; revision=34567
2008-07-17 19:42:26 +00:00
Stefan Ginsberg c7ed95cb55 - Patch by Cameron Gutman aicommander <at> gmail <dot> com
- Don't release the device spinlock twice if KeSynchronizeExecution returns false
See issue #3520 for more details.

svn path=/trunk/; revision=34564
2008-07-17 14:43:36 +00:00
Aleksey Bragin 2557cd7a1e Dmitry Gorbachev
- Fix a problem in VgaIsPresent: Content of the Address Register goes to the Data Register, and vice versa. It also writes content of the Map Select Register (which is number 4) into the Bit Mask Register (number 8).
See issue #2125 for more details.

svn path=/trunk/; revision=34549
2008-07-16 16:02:32 +00:00
ReactOS Portable Systems Group e069d3cba6 - Implement KdPortPutByteEx and KdPortInitializeEx in KDCOM. Only supports Versatile for now, we can make this more portable later.
svn path=/trunk/; revision=34472
2008-07-13 22:16:48 +00:00
ReactOS Portable Systems Group 08965866eb - Separate KDCOM into i386 and ARM versions.
- Stub out ARM version.
- Eventually the arm_kprintf hack will go away and true serial debugging output will be done through kdcom just like on x86.
- Fix formatting of bootvid.rbuild.


svn path=/trunk/; revision=34456
2008-07-13 08:47:07 +00:00
ReactOS Portable Systems Group b60783d6c5 - Implement RamdiskCreateRamdisk which validates parameters before calling RamdiskCreateDiskDevice (stub).
- Implement RamdiskDeviceControl which only supports FSCTL_CREATE_RAM_DISK for now (the kernel's attempt to create the RAM disk).
- Need to implement RamdiskCreateDiskDevice.


svn path=/trunk/; revision=34453
2008-07-13 07:37:36 +00:00
ReactOS Portable Systems Group b01a6a6b8e - Implement IRP_MN_QUERY_DEVICE_TEXT/BUS_INFORMATION/CAPABILITIES for FDOs (just forward to the attached device).
- Implement IRP_MN_QUERY_RESOURCES/RESOURCE_REQUIREMENTS for FDOs and PDOs (immediately complete the IRP and exit).
- We now get to RamdiskDeviceControl -- the kernel is attempting to create the ramdisk.


svn path=/trunk/; revision=34452
2008-07-13 07:33:31 +00:00
ReactOS Portable Systems Group 4a0167c18b - Remove incorrect check in RamdiskPnp -- we should only early-quit if the device is removed, not uninitialized, otherwise we'll never get initialized.
- Add support for IRP_MN_SURPRISE_REMOVAL.
- Handle IRP_MN_QUERY_ID for FDO (it is the first IRP we receive).
- Handle IRP completion for FDOs and forward if necessary.


svn path=/trunk/; revision=34451
2008-07-13 07:16:24 +00:00
ReactOS Portable Systems Group ac0787ec04 - Add device state information.
- Start implementing RamdiskPnp -- enough to fail requests until our device state is appropriate.
- Implement RamdiskOpenClose.


svn path=/trunk/; revision=34450
2008-07-13 07:02:48 +00:00