- Modify the logic in MmArmAccessFault, so that faults on kernel mode addresses including page table addresses are handled in the first part and user mode addresses (VADs) in the second part. This works, because for the special case of page table addresses, the user mode and kernel mode part of the code end up doing the same thing and this simplifies the code.
- In the user mode part call MiCheckVirtualAddress early and bail out if no VAD is found, since we do not care about any other cases any more.
svn path=/trunk/; revision=55459
- Cleanup Win32kProcessCallback and Win32kThreadCallback
- Even though it works, trying to post a message in Win32kProcessCallback after the THREADINFO is destroyed can only cause trouble, so move it in Win32kThreadCallback
- There is no need to try opening a desktop and windowstation before winlogon initializes
- Handle errors properly when we fail to get a default window station and desktop for the new process
- Enable win32k syscall hook callbacks
- Rewrite SetThreadDesktop to update THREADINFO properly and handle errors properly
- Do not initialize the THREADINFO in GetW32ThreadInfo as it is now done properly (actually leave a small hack that updates pci->dwTIFlags)
- Add UserDbgAssertThreadInfo that asserts the integrity of THREADINFO, CLIENTINFO and CLIENTTHREADINFO. This is called by GetW32ThreadInfo and the syscall hook callbacks
svn path=/trunk/; revision=55458
- Implement MiSynchronizeSystemPde, which does what its name suggests, synchronize a system PDE and is an improved replacement (with a more proper name) for MiCheckPdeForPagedPool
- Move some code to avoid an additional check
- Call MiResolveDemandZeroFault directy instead of creating a demand zero PDE and then calling MiDispatchFault, which after a lot of checks will finally do the same
svn path=/trunk/; revision=55456
- modify MiResolveDemandZeroFault to take the page protection as a parameter instead of the PTE. This will be used soon.
- Move increment of counters into the region where the pfn lock is held to avoid race conditions and make heavy locked operations unneccessary
- Add some ASSERTs
svn path=/trunk/; revision=55454
[SMSS]: Neuter away most of the code and only keep SMSS around for managing the API port.
Next step is to make the SMSS2 API port go into use.
svn path=/trunk/; revision=55453
- Add more structures to ntdddisk.h
- Fix more compile errors in disk_new
- disk_new builds but fails to link as classpnp import lib is broken
svn path=/branches/usb-bringup-trunk/; revision=55451
- Implement ResetController and call it before setting up the controller
- Don't disable 64-bit addressing until the BIOS gives up control of the controller
- Comment out manually clearing the SMI interrupt and the BIOS owned flag by request of janderwald
- EHCI no longer hangs for me on real hardware during controller initialization
svn path=/branches/usb-bringup-trunk/; revision=55450
[NTDLL]: Fix (although I'm not sure quite why) LdrpCheckForLoadedDll which was crashing now that I've fixed PAGE_EXECUTE sections with only FILE_EXECUTE handles. Ironically, this meant that LdrpCheckForLoadedDll never worked until my previous fix some revisions ago, it always returned FALSE.
This should fix KVM/QEMU crashes...
svn path=/trunk/; revision=55448
In PeFmtCreateSection don't use the ImageBase field of the ImageOptionalHeader directly, since it's different between PE32 and PE64. Use the ImageSectionObject->ImageBase field instead, which already contains the correct value.
svn path=/trunk/; revision=55446
- Add MM_HAL_VA_END and use it in MiAddHalIoMappings instead of making assumptions about the page tables
- Add MM_SHARED_USER_DATA_VA for x86
- use MM_SHARED_USER_DATA_VA in Mm to avoid ambiguities
- fix or comment out USER_SHARED_DATA in asm headers, as it should be the kernel mode address here
- set Teb->ExceptionList to NULL on amd64, it is used as a link to the Wow64 TEB, if any
svn path=/trunk/; revision=55445
- When rosautotest is launched, show how much time has past since the machine has started
- Also show how much time each individual test need to complete
- The purpose of this feature isn't to benchmark the os but to let us spot regressions regarding test time
svn path=/trunk/; revision=55441
- Check if the report uses a report id
- Fix arrows in USB 2 PS/2 conversion table (Needs more fixing)
svn path=/branches/usb-bringup-trunk/; revision=55440
- load gpsi->dtCaretBlink and g_PaintDesktopVersion in sysparams.c
- Rename IntGdiGetLanguageID to UserGetLanguageID
- Remove some unused functions and definitions
svn path=/trunk/; revision=55439
- Modify MiRosTakeOverPebTebRanges to only create a memory area for the shared user page and rename it to MiRosTakeOverSharedUserPage. Previously it was creating a memory area for the whole region from USER_SHARED_DATA up to MM_HIGHEST_USER_ADDRESS, which is the majority of the x64 user mode address space and doesn't even contain the PEB/TEB. Those are allocated below the shared user page and get their memory areas created in MiInsertNode.
- Add amd64 versions of MmGetPageTableForProcess, MmUnmapPageTable, MmGetPageFileMapping
svn path=/trunk/; revision=55438
- Rewrite SeCaptureSecurityDescriptor. The old code was mess and totally broken for 64 bit.
- Many fixes to security descriptor code that was making wrong assumptions about the SECURITY_DESCRIPTOR structures
svn path=/trunk/; revision=55437
- Check if attaching to device stack failed. In that case fail the request
[HIDUSB]
- Always set SupriseRemovalOk
[USBCCGP] [HIDCLASS] [USBHUB] [USBSTOR]
- Check if the pdo is still in the pdo list. Only call IoDeleteDevice in that case
svn path=/branches/usb-bringup-trunk/; revision=55429
- Bulgarian translation update of several modules (bug no. 6840), by CCTANEB, minor fixes by me;
- Polish translation update of sysdm by me;
svn path=/trunk/; revision=55424
- Fix a bug in CmpSetSystemValues, where an uninitialized handle would be closed in the failure path.
- Add a hack on top of the MI_GET_ROS_DATA(x) hack so that we can squeeze a pointer into a 32 bit field.
Make MmInitializeProcessAddressSpace amd64 ready and use a portable way to determine the page table base pfn in MiInitializeWorkingSetList
- Make MmProbeAndLockPages ready for 3 and 4 level page tables
add MiIsPteOnP*eBoundary macros - use these in MmProbeAndLockPages
- Raise IRQL to SYNCH_LEVEL not DISPATCH_LEVEL in KiAcquireDispatcherLock
- Add MiNonPagedSystemSize for all architectures
- Fix amd64 definition of KERNEL_HANDLE_FLAG
- Fix definition of PrototypePte
- Fix KiGetLinkedTrapFrame()
- Make MmProtectTpPteMask 64 bit wide
- Fix definition of MI_PTE_LOOKUP_NEEDED for amd64
- Impllement KiSendEOI() to be able to send an EOI from C code.
- Fix some MSVC/amd64 warnings
svn path=/trunk/; revision=55423
- Don't map the low 1 MB into kernel space, it's pointless and leads to inconsistencies between reported memory type and what is found in the page tables. On x86 it works, because it uses an overcomplicated pfn initialization wih redundent checks. Anyway this memory, containing freeldr and real mode code, was simply wasted.
- Silence some debug prints
- Fix warnings
svn path=/trunk/; revision=55421
- Define USBDI_VERSION to 0x500 instead 0x600 because we support none of the Vista APIs so USBD will report the correct version
svn path=/branches/usb-bringup-trunk/; revision=55420
- Add and fix missing exports
- Add UNIMPLEMENTED to unimplemented functions
- Fix completely broken USBD_GetPdoRegistryParameter (which wasn't even exported because somebody made a typo and couldn't figure it out)
- My Linksys USB300M driver now loads but it runs into some unimplemented code paths in usbehci
svn path=/branches/usb-bringup-trunk/; revision=55416
- Fix RtlLengthSecurityDescriptor
- Implement amd64 version of Implement RtlInitializeContext
- Add unwind info to amd64 debug asm functions
- Fix 64 bit HEAP_COMMON_ENTRY structure The resulting version doesn't exactly match the original windows one, but its compatible, as every field, except the dummy fields - which are omitted - is at its correct position.
svn path=/trunk/; revision=55415
- Implement amd64 version of LdrInitializeThunk and KiUserApcDispatcher
- Export ExpInterlockedPopEntrySList* on amd64, too
- Fix some 64 bit issues
svn path=/trunk/; revision=55414
- fix ASSERTs in amd64 inline functions
- fix definition of KWAIT_BLOCK
These fixes are not critical, so I don't update wdm.h to avoid additional recompilation
svn path=/trunk/; revision=55413
- Change LogfInitializeNew and LogfInitializeExisting to return an NTSTATUS code instead of a BOOL value.
- LogfInitializeExisting no longer calls LogfInitializeNew when reading a log file fails but returns a proper status code instead.
svn path=/trunk/; revision=55406
- Fix stack alignment in KiSwitchToBootStack
- Handle ExceptionFrame == NULL in KeContextToTrapFrame and KeTrapFrameToContext
- Implement KiSwapContextInternal
- Fix KiSwapContext and KiThreadStartup
- Implement dispatching of user mode exceptions including in-paging of module data used by the kernel-debugger
- Implement KeInitializeInterrupt, KeConnectInterrupt, KeSynchronizeExecution
- Don't zero more than the actual PCR size in KiInitializePcr
- Add asm function KiInitializeSegments to initialize the segment selectors to proper values
- Initialize system call entrypoints in KiInitializeCpu
- Implement KiDpcInterruptHandler, KiIdleLoop, KiInitializeUserApc, KiSwapProcess, KiSystemCallHandler, KiInitializeContextThread, KiSwapContextResume
- Implement asm functions KiRetireDpcList, KiInterruptDispatch, KiSystemCallEntry64, KiZwSystemService
svn path=/trunk/; revision=55405