Commit graph

19508 commits

Author SHA1 Message Date
Alex Ionescu 12d35a7b84 - Use MmUserProbeAddress in the system call handler to verify the parametes we got from user-mode are valid and return STATUS_ACCESS_VIOLATION if the check fails.
- Handle failure after PsConvertToGuiThread and return STATUS_INVALID_SYSTEM_SERVICE and/or FALSE and/or -1 on failure.
- Made MCE/XMMI interrupts unexpected on-boot.
- Removed KiTrapUnknown and used KiTrap0F (15) instead, which is the generic unexpected handler.

svn path=/trunk/; revision=20942
2006-01-17 22:41:39 +00:00
Alex Ionescu 419e7bb9d5 * Implement 3 out of 4 486-compatible ExInterlocked functions which use spinlock instead of cmpxhcg8. Code not yet tested and this code path is not made hot (enabled) yet.
svn path=/trunk/; revision=20941
2006-01-17 22:34:20 +00:00
Ged Murphy 2bce2ab662 A bit of work towards populating the properties dialog. (untested)
svn path=/trunk/; revision=20940
2006-01-17 20:12:18 +00:00
Alex Ionescu 1baa697ddf - Delete deprecated file.
svn path=/trunk/; revision=20939
2006-01-17 17:29:23 +00:00
Alex Ionescu d8582ed67b - Use static IDT entries generated through a macro, instead of dynamically allocating them each boot. Note that we do not store them in an i386 compatible format, but much like NT, swap the bits so that our macro can more clearly define each entry.
svn path=/trunk/; revision=20938
2006-01-17 17:28:41 +00:00
Ged Murphy bc2e6ca915 program files should use a separate a resource from directories.
svn path=/trunk/; revision=20937
2006-01-17 16:39:50 +00:00
Alex Ionescu f2414f3c2c - Move some assembly functions around in better suited locations.
- Merge syscall.S and trap.S into trap.S, and nicely document the software interrupt table that we service, as well as special cases.

svn path=/trunk/; revision=20936
2006-01-17 06:36:35 +00:00
Alex Ionescu 93c504407b - Implement SYSCALL_PROLOG for the main handler and the three fast-system calls (ints 2b, 2c, 2d) which are not yet implemented.
- Document the macros.

svn path=/trunk/; revision=20935
2006-01-17 05:54:35 +00:00
Alex Ionescu 087083224f - Implement first version of trap exit macro. Currently missing documentation, and the parameters could probably be simplified.
svn path=/trunk/; revision=20934
2006-01-17 05:22:00 +00:00
Alex Ionescu 95968a8292 * Add more documented flags from ks386.inc to asm.h
* Isolate and clean-up the VMWare hack; the shared trap exit macro can now be implemented.

svn path=/trunk/; revision=20933
2006-01-17 05:05:35 +00:00
Thomas Bluemel 3a3a12d3be don't release the pipe list lock twice in case of a canceled read operation
svn path=/trunk/; revision=20932
2006-01-17 03:28:33 +00:00
Thomas Bluemel 2d01a7cf65 some fixes in NtReadFile and NtWrite file for (a)synchronous pipe handling and parameter checks
svn path=/trunk/; revision=20931
2006-01-17 03:25:55 +00:00
Alex Ionescu 5b6264cf13 * Add more PSDK defintions to asm.h
* Use these new definitions instead of constants in syscall.S
* Document the macros using doxygen-compatible format, and convert SET_TF_DEBUG_HEADER to as macro instead of CPP macro.
* Use SET_TF_DEBUG_HEADER in system call handlers instead of duplicating the code.

svn path=/trunk/; revision=20930
2006-01-17 03:00:21 +00:00
Alex Ionescu 3ad6f05446 * Use macro for APC-delivery.
* Mark function start/endings for the compiler.

svn path=/trunk/; revision=20929
2006-01-17 01:22:21 +00:00
Ged Murphy f697d968ef make arrow available in 24x24
svn path=/trunk/; revision=20928
2006-01-17 00:13:11 +00:00
Christoph von Wittich 87df19f3e9 fixed a bug in IntSetMenuItemInfo
svn path=/trunk/; revision=20927
2006-01-16 23:26:41 +00:00
Ged Murphy fef4764e1f new recent docs icon
svn path=/trunk/; revision=20926
2006-01-16 23:26:26 +00:00
Christoph von Wittich 0e05e0efb3 fix text align when using HBMMENU_CALLBACK (patch by Brezenbak)
svn path=/trunk/; revision=20925
2006-01-16 23:20:11 +00:00
Martin Fuchs 116372101a display icons of size 24x24 per default in the start menu root
svn path=/trunk/; revision=20924
2006-01-16 23:00:38 +00:00
Alex Ionescu f5e9486425 - Fix a build issue.
- Added more DBG checks for trap exits:
  * Detect if exiting with incorrect IF state.
  * Detect if exiting with broken stack.
  * Detect if exiting with a broken trap frame (note: Disabled in Kei386EoiHelper beause this raises the assertion. The trap frame is valid, it's just that some old code is using DbgArgMark for other purposes. Will fix.)
  * Detect if exiting with invalid FS.
  * Detect if exiting with invalid Exception List.
  * Detect if exiting with incorrect exception list and/or incorrect previmous mode on the stack (to detect macro/calling type mismatch).
The trap exit code is now complete and shareable across all 3 trap exit types, except for one broken assertion left to fix.

svn path=/trunk/; revision=20923
2006-01-16 22:07:38 +00:00
Alex Ionescu b311311796 * Increase total system call count in KPCR for performance counter.
* Increase per-systemcall call count in the KiServiceTable if it was specified, for performance counters.
* Add sanity checks to system call handler to detect:
  - User-mode system calls at > PASSIVE
  - User-mode system call return at > PASSIVE
  - Return to user-mode with Kernel APCs disabled.
* These features are on DBG only.

svn path=/trunk/; revision=20922
2006-01-16 21:41:19 +00:00
Alex Ionescu a784e36891 - Write the first of 3 shared trap prolog macros. Does not fully support V86 entry and DR saving yet. Used by all KiTraps (except double-fault for now) and KiDebugService.
- Update asm.h with more stuff from ks386.inc.
- Use only documented constants in syscall.S through asm.h.

svn path=/trunk/; revision=20921
2006-01-16 21:14:32 +00:00
Gé van Geldorp 3e42157fa5 Fix build for binutils 2.15.90
svn path=/trunk/; revision=20920
2006-01-16 21:12:13 +00:00
Alex Ionescu 58964b9893 - Fix another V86 Mode exit bug which could cause non-volatiles to be incorrectly restored.
- Make traps use the shared EOI (End Of Interrupt) helper instead of their own custom trap exit code.

svn path=/trunk/; revision=20919
2006-01-16 19:59:32 +00:00
Alex Ionescu 4334f8a57f - Fix a bad bug in the system call handler and interrupt/trap exit code which was causing a jump to the incorrect epilogue if V86 mode was detected.
- Replaced most of the trap prolog code by the KiDebugService entry trap code from syscall.S. Eventually, after remaining bugs are fixed, the code will be shared across all traps and not duplicated anymore. (For documnetation's sake, changing the prolog has the following effects: DR registers are not saved anymore (they will be later), DS/ES are set to RPL3 DATA, not RPL0 DATA, GS is not touched (it shoudl be 0, not RPL0_DATA). PreviousMode is not touched at all, the Debug Trap Frame header is properly setup).

svn path=/trunk/; revision=20918
2006-01-16 19:32:55 +00:00
Alex Ionescu 707ff20f85 - Update asm.h with more definitions.
svn path=/trunk/; revision=20917
2006-01-16 17:17:49 +00:00
Alex Ionescu 2c7e1a713e - Merge breakpoint.S and tblfush.S into cpu.S
svn path=/trunk/; revision=20916
2006-01-16 17:17:16 +00:00
Alex Ionescu 3a99d30e3e Do set ESP0, but after we save the old value for the V86 hack.
svn path=/trunk/; revision=20915
2006-01-16 17:07:45 +00:00
Alex Ionescu 68d8925879 Disable correct usage of ESP0 since it seems the V86 code is still not ready to handle that. This should fix the V86 exceptions some people have been having.
svn path=/trunk/; revision=20914
2006-01-16 17:05:50 +00:00
Christoph von Wittich 7d5b2bb49d implemented HBMMENU_CALLBACK (now some of the Miranda icons are displayed)
svn path=/trunk/; revision=20913
2006-01-16 16:45:27 +00:00
Thomas Bluemel a66e25af32 fixed difference in signedness warnings and a uninitialized variable warning
svn path=/trunk/; revision=20912
2006-01-16 16:29:02 +00:00
Alex Ionescu da4ac0b789 - Fix some nasty context switch bugs:
* We did not update the KPCR's stacklimit/initialstack with the new thread's stacklimit/initialstack.
  * We always assumed V86 frame bias in KeInitializeThreadContext.
  * We did not properly update ESP0 during context switch, to make space for the NPX frame and V86 bias.
  * We did not update fs:18h to point to the new TEB.
  * We did not clear out GS when switching processes, nor update the TSS's cr3.
  * If a new LDT was being updated, we over-wrote EBP (which was supposed to point to the TSS) by the GDT pointer.
  * We used a push/pop esp0 hack which hid the fact we never updated esp0.

svn path=/trunk/; revision=20911
2006-01-16 02:21:22 +00:00
Gé van Geldorp 9c9b29ed6e New wininet vendor import
svn path=/trunk/; revision=20909
2006-01-15 22:25:16 +00:00
Gé van Geldorp 6a168b6bb3 Drop old wininet in preparation for new vendor import
svn path=/trunk/; revision=20908
2006-01-15 22:22:02 +00:00
Gé van Geldorp 4b714cc7f4 wintrust vendor import
svn path=/trunk/; revision=20905
2006-01-15 21:58:59 +00:00
Gé van Geldorp aa886b4606 Delete old (unused) wintrust version
svn path=/trunk/; revision=20904
2006-01-15 21:54:47 +00:00
Alex Ionescu ee329f30db - Don't bother with clearing the DRs in the CONTEXT, just clear DR7 in the trap frame after the conversion.
svn path=/trunk/; revision=20901
2006-01-15 20:26:53 +00:00
Magnus Olsen 1a6b709e32 Implement XMillimeter and YMillimeter calculation, it not 100% correct for I assume the monitor DPI is always 72DPI
svn path=/trunk/; revision=20900
2006-01-15 20:25:53 +00:00
Alex Ionescu e129f72183 - Use old-style NPX state when creating the thread context. Fixes regression in 1st-stage install.
svn path=/trunk/; revision=20899
2006-01-15 20:13:08 +00:00
Ged Murphy bfa1e86e2a help update
svn path=/trunk/; revision=20898
2006-01-15 19:06:18 +00:00
Hartmut Birr d95e04f38a - Allocated the initial stacks page aligned.
- Add a guard page for the initial stacks.
- Fixed the size of the initial stacks.

svn path=/trunk/; revision=20897
2006-01-15 18:28:40 +00:00
Hartmut Birr 328e260852 Fixed the stack for the first thread.
svn path=/trunk/; revision=20896
2006-01-15 18:21:43 +00:00
Ged Murphy 208e318f73 Change toolbars from 16 to 15 pixels high
svn path=/trunk/; revision=20895
2006-01-15 16:47:18 +00:00
Thomas Bluemel 48939cfdc4 implemented LsaDelete() (client only)
svn path=/trunk/; revision=20894
2006-01-15 14:34:58 +00:00
Thomas Bluemel 12fcc64d56 implemented LsarClose()
svn path=/trunk/; revision=20893
2006-01-15 14:18:43 +00:00
Martin Fuchs 7548ba36d1 Explorer: sort drives by path name; ignore hidden attribute of NTFS volumes
This resolves Bugzilla issue 1236

svn path=/trunk/; revision=20892
2006-01-15 13:44:14 +00:00
Thomas Bluemel 88a9cea5ae disable starting lsass.exe for now
svn path=/trunk/; revision=20891
2006-01-15 13:25:50 +00:00
Thomas Bluemel 5e85dccad2 - use RPC for communication with lsass
- start lsass.exe on startup

svn path=/trunk/; revision=20890
2006-01-15 13:19:57 +00:00
Martin Fuchs 1fbded087b change explorer sort order so that virtual folders are moved after physical folders
svn path=/trunk/; revision=20889
2006-01-15 12:30:17 +00:00
Hartmut Birr 0f462fdea6 Fix the smp build.
svn path=/trunk/; revision=20888
2006-01-15 10:17:35 +00:00