Timo Kreuzer:
* Change inline assembly constraint from "r" to "q". "r" means any kind of register, including *si and *di, these cannot be used for 8bit operations on x86, only x64 has sil, dil registers. But gcc is stupid and doesn't get that if we don't tell it explicitly, by using "q", which will only allow a, b, c, d registers. Fixes an assembler error messages that can occur under certain circumstances.
svn path=/trunk/; revision=52100
NOTE: Windows does not do this, opting instead to force manufacturers/use pull-up resistors/reconfigure the ARM Bus to map RAM at 0x00000000. For wider portability, I believe it makes more sense to simply do this "trick" in the boot loader.
svn path=/trunk/; revision=52098
- Create an empty TRANSPORT_ADDRESS for the local address when doing an implicit bind so TCP/IP can choose its own local port and address instead of trying to bind the remote address and port
- Fixes another critical networking bug
svn path=/trunk/; revision=52092
- Add a Next member to CONNECTION_ENDPOINT to allow multiple connections to be associated with a single address file while not overwriting pointers, dereferencing other people's connection objects, and causing horrific amounts of memory corruption
- Add several sanity checks to prevent this from happening again
- Don't try dereference address files and connection endpoints in the free functions; there should be none associated since r52083 (sanity checks ensure this)
- Don't hold an extra reference to the address file when creating a listener; this reference is implicit
- This should greatly increase reliability of activities that open lots of sockets such as web browsing and running servers on ROS
- This also fixes most issues of not releasing a server port when the listener is closed
svn path=/trunk/; revision=52086
- add definition for KeMemoryBarrierWithoutFence
- add x64 version of KeMemoryBarrier and some related defines
- Use KeMemoryBarrierWithoutFence in spinlocks as suggested by Alex
svn path=/trunk/; revision=52079
- Add explicit memory barriers to KxAcquireSpinLock, KxReleaseSpinLock inline functions and KeTryToAcquireQueuedSpinLock, KeTryToAcquireQueuedSpinLockRaiseToSynch in the UP case. This will prevent the compiler from reordering memory access instructions across the boundaries of these functions, even when being inlined.
- Use the inline functions in x64 spinlock functions, too
svn path=/trunk/; revision=52078
Hackfix to r52065:
- Comment out call to IopDecrementDeviceObjectRef in IopLoadFileSystemDriver, on Pierre's request. Needs more research. Should fix boot and testcd ASSERT in 2nd stage.
svn path=/trunk/; revision=52075
Fixes to r52065:
- Acquire resources within a critical region
- Simplified IoEnumerateRegisteredFiltersList and made its behaviour match the one described in MSDN: http://msdn.microsoft.com/en-us/library/ff548348%28v=vs.85%29.aspx
This was brought to you by Alex Ionescu.
svn path=/trunk/; revision=52073
- Fix a bug in device removal which resulted in an IRP_MN_CANCEL_REMOVE_DEVICE request not being sent if the initial IRP_MN_QUERY_REMOVE_DEVICE failed
svn path=/trunk/; revision=52066
- renamed Io volumes global to match Windows names (in case of debug)
- renamed IopDereferenceVpb() to IopDereferenceVpbAndFree(), IopReferenceVpbForVerify() to IopReferenceVerifyVpb(), IopInitializeVpbForMount() to IopMountInitializeVpb(), IopLoadFileSystem() to IopLoadFileSystemDriver()
- implemented IopDecrementDeviceObjectHandleCount(), IopInterlockedIncrementUlong(), IopInterlockedDecrementUlong(), IopNotifyAlreadyRegisteredFileSystems() and IoEnumerateRegisteredFiltersList()
- halfplemented IopDecrementDeviceObjectRef()
- implemented check for already registrered notification in IoRegisterFsRegistrationChange()
- implemented sending notifications for already registered drivers to registrant in IoRegisterFsRegistrationChange()
- implemented VPB freeing in IopDereferenceVpbAndFree()
- acquire Io volumes lists once and forever for system shutdown, instead of keeping acquiring and releasing
- reference device object in IopShutdownBaseFileSystems() before sending it the shutdown IRP. To ensure to keep it valid till the end
- added a FS driver registration operations counter
- use this counter to handle failed mounts
- fixed: release locks before calling driver for mounting and reacquire them after
- fixed check for boot partition failure (and associated bugcheck): check we are in boot phase 0 or 1
- simplified lock process by using only one lock (ie removed mutex). Also use only critical region where needed
- fixed: ensure that locks are properly released when quitting a function
- fixed wrong return in IopCreateVpb()
- minor fixes around
svn path=/trunk/; revision=52065
- Reset KdbNumberOfRowsPrinted and KdbNumberOfColsPrinted before reading new command in kernel debugger so if previous command printed nearly full page, new command won't show "Press q to abort" message before processing
svn path=/trunk/; revision=52064
"According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else."
Knowing it was the first step before actually doing it :-/
svn path=/trunk/; revision=52061
fix pch support, with proper dependancies.
Use cmake built-in functions instead of doing weird "magic" with tabs and spaces.
According to gcc doc, if header.h is precompiled, the output should be named "header.h.gch" and not anything else.
svn path=/trunk/; revision=52058