Commit graph

22273 commits

Author SHA1 Message Date
Hervé Poussineau 25090facc3 Allow setup to detect extended partitions
svn path=/trunk/; revision=23896
2006-09-03 12:32:15 +00:00
Alex Ionescu d8155f97a7 - Remove LDT initialization, LDT shouldn't be initialized at bootup.
- Move LDT-only GDT routines to ldt.c
- Cleanup formatting of GDT-related exported function stubs in gdt.c and rename file to abios.c. Those routines deal specifically with the ABIOS GDT selectors and are for ABIOS support.
- Move the lone 2 routines in fpu.c to cpu.c.

svn path=/trunk/; revision=23895
2006-09-03 07:13:02 +00:00
Alex Ionescu 6b42f391e0 - Fix KTSS definition.
- Add GetSegment inlines (ie: GetSs, GetDs, etc)
- Fix up definition of KiBootGdt to use KGDTENTRY instead of USHORT. Also define KiGdtDescriptor using KDESCRIPTOR.
- Remove GDT initialization code completely. The GDT is already initialized on boot.
- Remove tss.c and add KiInitializeTss(2) to setup a TSS and proper IOPM/Interrupt Direction map settings for V86/VDM.
- Copy the TSS code over but prettyify it to use NT/NDK structures instead of ugly USHORT typecasts.

svn path=/trunk/; revision=23894
2006-09-03 06:51:03 +00:00
Magnus Olsen 00f50dd922 Fixed some more wine test for NtGdiGetDIBits
FIxed so we can now create BITMAPCOREHEADER bitmap (Bugs in NtGdiGetDIBits did stop create of it) 



svn path=/trunk/; revision=23892
2006-09-02 23:58:53 +00:00
Magnus Olsen 7aa07b393c 1. Copy DIB_GetBitmapInfo from wine cvs (date 2/9-2006)
2. Bugfix NtGdiGetDIBits the BITMAPCOREHEADER is not same as BITMAPINFOHEADER
   we now separate it in if(Bits==NULL) that will allow us pass two more wine tests
   follow winetest is working now 
   1. bitmap.c 227 Test failed: GetDIBits doesn't work with a BITMAPCOREHEADER 
   2. bitmap.c 233 GetDIBits doesn't work with a BITMAPCOREHEADER 
   both of them are fixed now 

svn path=/trunk/; revision=23891
2006-09-02 21:02:03 +00:00
Aleksey Bragin 7bfe48177c Separate Device Manager code (what was left from it in hub.c) from Hub code
svn path=/trunk/; revision=23890
2006-09-02 20:32:50 +00:00
Alex Ionescu 252a2d1598 - Part 2 of 2: Implement KiDispatchInterrupt in assembly since it's 1) Perf-critical 2) Requires us to switch the stack to the DPC stack, which is unsafe (and impossible, unless inlining) in C.
svn path=/trunk/; revision=23889
2006-09-02 19:53:24 +00:00
Alex Ionescu 0f9c7bdf03 - Part 1.5 of 2: Re-factor KiDispatchInterrupt to separate DPC delivery routine (so that it can stay in C, since KiDispatch should be done in ASM so we can switch stacks).
- Use interrupt enable/disable instead of raising to HIGH_LEVEL.
  - Better use and pairing of locks.
  - Fix a lot of race conditions in DPC dispatching, due to the fact almost all data we're touching is ultra-volatile and can change at any time depending on various locks being held/released + interrupt state.
  - Add stub code/support for tick-hased table-based timer implementation and deferred threads.

svn path=/trunk/; revision=23888
2006-09-02 19:12:31 +00:00
Alex Ionescu 7802140549 - Fix a bug in RtlFillMemory.
- Fix overlap check comments.

svn path=/trunk/; revision=23887
2006-09-02 16:36:48 +00:00
Alex Ionescu 38ca1d7d77 - Add missing volatile statements to KPROCESS, KTHREAD, KPRCB and KDPC_DATA.
- Fix KDPC definition in DDK. You can always count on the w32api to get even the simplest structures wrong.
- Fix memory overwrite bug in KiInitSpinlocks.
- Part 1 of 2: Cleanup and improve DPC implementation to add partial support for Threaded DPCs and remove SMP vs non-SMP ifdefs. (At the expense of, oh God, 5 wasted CPU cycles!).

svn path=/trunk/; revision=23886
2006-09-02 16:19:00 +00:00
Aleksey Bragin ea0c0daec0 Add forgotten "xs-native.cpp" to the MSVC project of ROS Explorer
svn path=/trunk/; revision=23885
2006-09-02 11:27:36 +00:00
The Wine Synchronizer 99b4a1d7ee Autosyncing with Wine HEAD
svn path=/trunk/; revision=23883
2006-09-02 06:27:09 +00:00
The Wine Synchronizer 8dff62e1f8 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23882
2006-09-02 06:24:20 +00:00
Alex Ionescu aa69c69afb - Move machine-specific initializations to KeInit2.
- Initialize bugcheck messages much earlier, separate clock initialization from KeInit2.
- Completely move out and isolate ROS/FREELDR PE loading hacks to KiRosPrepareForSystemStartup so that KiSystemStartup is clean of them.

svn path=/trunk/; revision=23881
2006-09-02 05:10:16 +00:00
Alex Ionescu ea01969067 - More Initialization changes:
- Initialize bugcheck lists, timer DPC, profile list/locks, timer lists, the swap lists and syscall table as part of KiInitSystem (portable).
   - Add more initialization for the initial/idle process+thread (some code disabled due to dispatcher problems).
   - Add code to support future Timer implementation (based on tick-hashes)
   - Separate post-boostrap initialization code in KiInitializeKernel.
   - Add some support for future SMP paths.
   - Create a DPC stack.
- Changes based on WI4 and my automated parsing tool.

svn path=/trunk/; revision=23880
2006-09-02 04:40:09 +00:00
Alex Ionescu deed4ed0d6 - More kernel initialization changes and cleanups.
- Start support for an initial boot thread.

svn path=/trunk/; revision=23879
2006-09-02 02:59:44 +00:00
Thomas Bluemel dbf97f3b50 Fix creating the console system menu items
svn path=/trunk/; revision=23878
2006-09-01 23:18:23 +00:00
Hervé Poussineau c2d18fb0b6 Add softpub.h header
svn path=/trunk/; revision=23877
2006-09-01 23:06:32 +00:00
The Wine Synchronizer abb022f081 Autosyncing with Wine HEAD
svn path=/trunk/; revision=23876
2006-09-01 22:47:57 +00:00
Hervé Poussineau e1d577c47c Add a stub sensapi.dll. This is a step to fix bug 1751
svn path=/trunk/; revision=23875
2006-09-01 22:41:31 +00:00
Hervé Poussineau 43d85c0abc Add some error codes (taken from Wine)
svn path=/trunk/; revision=23874
2006-09-01 22:10:56 +00:00
Thomas Bluemel 00c354405e Don't call BeginPaint/EndPaint while processing a WM_DRAWITEM message
svn path=/trunk/; revision=23873
2006-09-01 21:53:31 +00:00
Thomas Bluemel c474673ac7 disable code that dereferences a random pointer
svn path=/trunk/; revision=23871
2006-09-01 18:56:06 +00:00
Thomas Bluemel 13e3041822 Don't leak a reference in NtReleaseSemaphore() in case KeReleaseSemaphore() raises and exception
svn path=/trunk/; revision=23870
2006-09-01 18:41:00 +00:00
Thomas Bluemel 4a586b2eb2 remove superfluous dereference
svn path=/trunk/; revision=23869
2006-09-01 18:20:44 +00:00
Ged Murphy 61059050bb - Use a more generic print service
- don't assign a service name at the start as it causes problems when query(ex) doesn't supply one.
- Simplify the service starting code.
- Add missing options to the print type
- rewrite the querying functionality to be cleaner, and use existing code.
- remove the braces I left, used for collapsing dbg info

svn path=/trunk/; revision=23868
2006-09-01 16:55:36 +00:00
Eric Kohl 9e843c89fc Fix indentation, no code changes.
svn path=/trunk/; revision=23867
2006-09-01 15:49:50 +00:00
Alex Ionescu a85e942346 - More initialization cleanup.
svn path=/trunk/; revision=23866
2006-09-01 13:13:08 +00:00
Hervé Poussineau 562f8391e8 Fix build when compilation units are enabled for usetup.c
svn path=/trunk/; revision=23865
2006-09-01 12:58:56 +00:00
Alex Ionescu 5244a29dad - Fix bugs in RtlCompareMemory, RtlCompareMemoryULong
svn path=/trunk/; revision=23864
2006-09-01 12:38:57 +00:00
Eric Kohl 6b8b0b56b2 Remove trailing whitespace
svn path=/trunk/; revision=23863
2006-09-01 11:16:32 +00:00
Hervé Poussineau f05d1bb617 Fix option selection in bootcd
Fix SetupOpenFileQueue, SetupCloseFileQueue and SetupCommitFileQueueW prototypes to match setupapi.dll ones

svn path=/trunk/; revision=23862
2006-09-01 09:53:33 +00:00
Alex Ionescu 30f4d83978 - Add back defines accidentaly removed.
svn path=/trunk/; revision=23854
2006-09-01 03:19:25 +00:00
Alex Ionescu ad9fdb1ae3 - Fix bug in RtlZero, Fill, Move memory where the last 1-3 bytes weren't being copied.
svn path=/trunk/; revision=23853
2006-09-01 03:15:32 +00:00
Alex Ionescu 369f93b984 - Multiple changes to low-level Kernel initalization sequence to bring it a bit closer to Windows.
- Main difference is new CPU detection algorithms for ID, cache, etc, as well as using KF_ Kernel Feature bits instead of x86 CPU features (For portability).
- Also many many other cleanups and re-sequencing.

svn path=/trunk/; revision=23852
2006-09-01 03:05:30 +00:00
Ged Murphy 3c411c196d forgot to turn debugging off
svn path=/trunk/; revision=23850
2006-08-31 22:51:28 +00:00
Alex Ionescu 01081d279e - Some cleanups
- Add support for recovering from user-mode win32k callback fault.
- Also add support for debug register saving/reloading during user-mode callbacks and return.

svn path=/trunk/; revision=23849
2006-08-31 18:10:11 +00:00
Ged Murphy 158e4c116a first commit of an overhaul of sc.exe
- establish a connection to the SCM for each separate request, allowing the minimum privlidges required, instead of a generic (over privlidged) one.
- start to move service printing to separate functions and reduce code duplication
- make output 100% as per Windows
- fix some commands, e.g. 'interrogate'
- improve error checking
- improve code structure

svn path=/trunk/; revision=23848
2006-08-31 17:59:02 +00:00
Eric Kohl 8537a75fba Pass additional arguments to a service when it is started by a call to StartService.
svn path=/trunk/; revision=23846
2006-08-31 17:16:19 +00:00
Alex Ionescu 5a633f8fc9 - Remove some deprecated code and custom ROS exports/code.
svn path=/trunk/; revision=23845
2006-08-31 17:10:58 +00:00
Thomas Bluemel 87ab1c53a7 Add stubs for the condition variable functions
svn path=/trunk/; revision=23844
2006-08-31 16:56:49 +00:00
Aleksey Bragin 26b82125e5 Change a very ugly done DbgPrint() function to a good implementation. Now Freeldr shows all DPRINTs from e.g. cmlib correctly.
svn path=/trunk/; revision=23843
2006-08-31 16:08:17 +00:00
Aleksey Bragin 5cd8b68023 Sylvain Petreolle: Partly fix unicode build of cmd (a typo)
svn path=/trunk/; revision=23842
2006-08-31 14:14:42 +00:00
Hervé Poussineau 02d5b53e84 Add ATTACH_PARENT_PROCESS constant
svn path=/trunk/; revision=23841
2006-08-31 14:11:33 +00:00
Hervé Poussineau 1ebc320243 Remove some code duplication when calling PopupError
Add ConAttachConsole stub

svn path=/trunk/; revision=23840
2006-08-31 12:35:39 +00:00
Hervé Poussineau 8b597b0970 Fix build for Linux people, where gcc claims that it doesn't support I64 for printf. Thanks Usurp on IRC
svn path=/trunk/; revision=23839
2006-08-31 12:31:34 +00:00
Hervé Poussineau ed70ab7f26 Fix Linux build (filename case problem...) Thanks gregj on IRC
svn path=/trunk/; revision=23837
2006-08-31 11:09:05 +00:00
Hervé Poussineau cc2684d474 Cleanup in .inf file handling of usetup:
- Equivalent setupapi functions have the same protoype as in Win32 API
- Extra functions have the INF_* prefix

svn path=/trunk/; revision=23836
2006-08-31 09:13:03 +00:00
Hervé Poussineau f52bca045b Clean up console functions in usetup. We now have 2 categories:
- The same functions as in Win32 Console API, prefixed with Con
- The helpers (which call Con* functions) prefixed with CONSOLE_
Do according changes in other files

svn path=/trunk/; revision=23834
2006-08-31 06:14:25 +00:00
Alex Ionescu e870b20916 - Don't do fast system calls with the wrong DS/ES selectors.
- Properly load DS/ES on system startup and GDT load
- Use proper DS/ES during deprecated IRQ handling.
- Always use GS as 0 for all of the above.
- *FINALLY* fixes the oldest bug there ever was -> DS/ES corruption noticed in VMWare (And recently in QEMU+KERNELKQEMU, since it behaves internally like vmware). Hacks in trap code have FINALLY been removed!

svn path=/trunk/; revision=23833
2006-08-31 05:25:58 +00:00