Commit graph

22751 commits

Author SHA1 Message Date
Andrew Munger
b5dbaf9282 Merge the one line fix from 24273 v. 24276.
svn path=/branches/ros-branch-0_3_1/; revision=24349
2006-10-01 19:29:03 +00:00
Alex Ionescu
71e329a125 - Do MmInit1 much earlier in the boot phase (right at the beginning of ExpInitalizeExecutive). This gives us access to things like SharedUserData, which NT has since NTLDR. Will try moving it up even higher.
- Also move some ROS-specific/Freeldr hacks on top of the file so they'll be easier to remove later when needed.
- Fix a bug in ExInitPoolLookasidePointers which was making us overwrite low-memory.
- Initialize NLS tables during Phase 0, so that the associated APIs can work earlier.
- Bugcheck if HAL Phase 0 initialization failed, and force interrupts enabled after the HAL is ready.

svn path=/trunk/; revision=24348
2006-10-01 19:27:10 +00:00
Alex Ionescu
9f40202dfc - Add setupblk.h from TinyKRNL with all the definitions for NT's SETUPLDR structures (SETUP_LOADER_BLOCK and hardware configuration stuff). Update KiRosFrldrLpbToNtLpb to setup the Flags field of this block to "Text-Mode Setup Active" when we know that we're in ROS text mode.
- Update ExpInitializeExecutive to check for a valid setup block and detect text-mode and network installation modes. Use ExpInTextModeSetup instead of SetupMode variable, to make detection compatible with NTLDR.

svn path=/trunk/; revision=24347
2006-10-01 18:27:59 +00:00
Alex Ionescu
cbfbbdb7f1 - Implement ExpIsLoaderValid to validate the LOADER_PARAMETER_BLOCK's extension for the right size and version (we currently support 5.2 and over).
- Add code in KiRosFrldrLpbToNtLpb to setup a LOADER_PARAMETER_EXTENSION and set the right version and size.
- Initialize the per-CPU PRCB Paged/NPaged lookaslide pool lists.
- Add code to support application CPUs booting in ExpInitializeExecutive, and pass the loaderblock as a parameter.

svn path=/trunk/; revision=24346
2006-10-01 18:01:38 +00:00
Alex Ionescu
0adfdd1ace - Implement static compile-time assertions and use them for structure field checks. Thanks to Thomas and KJK.
svn path=/trunk/; revision=24345
2006-10-01 15:52:10 +00:00
Alex Ionescu
4f1804b0c0 - Use __readfsdword instead of de-referencing the Boot PCR, which is not queried for Application CPUs. (And put the Goto back where it was). Thanks to Thomas Weidenmueller for noticing.
svn path=/trunk/; revision=24344
2006-10-01 15:22:42 +00:00
KJK::Hyperion
41ecee90f7 Fixed:
- _InterlockedCompareExchange64 (more efficient handling of 64-bit operands)
 - __writecr0, __writecr3, __writecr4 (for real this time)

svn path=/trunk/; revision=24343
2006-10-01 14:49:07 +00:00
Thomas Bluemel
70da417c02 Fix usage of a uninitialized variable, unnecessary goto not replaced by a if(...) statement
svn path=/trunk/; revision=24342
2006-10-01 14:02:08 +00:00
Thomas Bluemel
d7978d0054 fix __writecr0, __writecr3 and __writecr4
svn path=/trunk/; revision=24341
2006-10-01 12:33:24 +00:00
Thomas Bluemel
408d13caaa Fix function name (fixes a redefinition error)
svn path=/trunk/; revision=24340
2006-10-01 12:19:36 +00:00
Hervé Poussineau
5895844509 Add ufatx.dll, to be able to create FATX (Xbox file system) partitions
svn path=/trunk/; revision=24339
2006-10-01 10:11:46 +00:00
Hervé Poussineau
72a9a3af12 Rewrite SetupDiGetClassImageListExW and SetupDiGetClassImageIndex which were completly wrong
Add stub for SetupDiDestroyClassImageList
Now, you can see some icons in device manager

svn path=/trunk/; revision=24338
2006-10-01 09:05:19 +00:00
Alex Ionescu
ebafbecc80 - Fix Ki386InitializeTss to use dynamic GDT calculated from KiGetMachineBootPointers instead of static internal address. Now NTLDR boots us all the way to HalInitializeProcessor.
svn path=/trunk/; revision=24337
2006-10-01 07:31:33 +00:00
Alex Ionescu
7c753a339a - Put IDT in RW .data section
- Fix Ki386InitializeTss to properly set Boot TSS descriptor data (set it to 32-bits). Also properly setup the DF/NMI Task Gates in the IDT.

svn path=/trunk/; revision=24336
2006-10-01 07:24:24 +00:00
Alex Ionescu
00564d63b7 - Clear KPCR->TEB during bootstrap as well.
- Use KPCR_PROCESSOR_NUMBER instead of 0x130.

svn path=/trunk/; revision=24335
2006-10-01 06:46:08 +00:00
Alex Ionescu
aebf830821 - Add two more lines in boot.S which detect boot-by-NTLDR and jump into KiSystemService (I thought FreeLdr didn't use the entrypoint, but it looks like it does, so this hack is needed). Detection is done by checking for the high bit in the PLOADER_PARAMETER_BLOCK pointer, which will be set on NT.
- Fix a double bug in KiSystemStartup. First, we were setting KPCR->Number instead of KPRCB->Number. Second, we were using KeGetPcr instead of __writefsdword. It worked on ROS because KeGetPcr is hard-coded to ROS's KPCR buffer.

svn path=/trunk/; revision=24334
2006-10-01 06:43:26 +00:00
Alex Ionescu
790760dcf4 - Remove all the remaining code in boot.S and make KiRosPrepareForSystemStartup fastcall. Now NtProcessStartup just does a jmp to KiRosPrepareForSystemStartup without any other code.
- Use freeldr's stack during all of freeldr.c, and only switch to the boot stack in KiSystemStartup before calling KiInitializeKernel. This is what NT does as well (it piggybacks on NTLDR's stack until then). This allowed us to clean boot.S and now we can boot from NTLDR properly.

svn path=/trunk/; revision=24333
2006-10-01 06:08:05 +00:00
Alex Ionescu
380f89c205 - Fully use KeLoaderBlock->InLoadOrderListHead for driver loading and symbol lookups, instead of KeLoaderModules/KeLoaderModuleCount. Still not 100% compatible with NTLDR (since it uses BootDriverListHead with a special structure), but much closer to a portable design that doesn't rely on static kernel data.
- Change some internal functions to use UNICODE_STRING instead of PCHAR since this is how LdrEntry->BaseDllName is, and also it's closer to NT Design.

svn path=/trunk/; revision=24331
2006-10-01 05:05:57 +00:00
Andrew Munger
32b3c2fdf9 WaxDragon curses BrandonTurner.
svn path=/branches/ros-branch-0_3_1/; revision=24330
2006-10-01 04:57:50 +00:00
Andrew Munger
786ac12c99 Oops. I forgot the branch has a config.rbuild...
svn path=/branches/ros-branch-0_3_1/; revision=24329
2006-10-01 04:47:34 +00:00
Andrew Munger
550317611d Sync win32k and gdi32_winetest from trunk.
Merged 24228-24229, 24231, 24234-24239,
24255-24257, 24260-24264, 24266-24268,
24270-24271, 24287-24288.

svn path=/branches/ros-branch-0_3_1/; revision=24328
2006-10-01 04:37:32 +00:00
Hervé Poussineau
fbe45c7180 Give enough space to retrieve full device class description
svn path=/trunk/; revision=24326
2006-09-30 23:37:44 +00:00
KJK::Hyperion
ae3c3041f4 Fixes to un-break trunk:
* Disabling XBox HAL for now (TEMPORARY MEASURE)
 * Port MP HAL to the new loader structures

svn path=/trunk/; revision=24325
2006-09-30 23:35:17 +00:00
Hervé Poussineau
7227204f68 Better resources handling in serial driver.
All: copy lower device flags to FDO. This prevents the serial mouse to use buffered I/O

svn path=/trunk/; revision=24324
2006-09-30 23:06:51 +00:00
Hervé Poussineau
b606a6771c Do not expect a call to AddDevice with a NULL Pdo. Those are not guaranteed
svn path=/trunk/; revision=24323
2006-09-30 22:41:23 +00:00
Hervé Poussineau
3f47783c54 Implement SetupDiGetDriverInstallParamsW
Add support for DI_FLAGSEX_INSTALLEDDRIVER

svn path=/trunk/; revision=24322
2006-09-30 20:42:47 +00:00
Hervé Poussineau
b0e0c40c5d i8042prt manages PS/2 ports, not PS/2 devices. Take it into account when browsing devices detected by freeldr.
svn path=/trunk/; revision=24321
2006-09-30 19:09:10 +00:00
Hervé Poussineau
c1e52bcfca Fix wrong default registry value, which was possibly leading to non PS/2 keyboard detection at startup
svn path=/trunk/; revision=24320
2006-09-30 17:26:31 +00:00
Thomas Bluemel
41f18c74da Recalculate property sheet sizes after adding/removing sheets.
svn path=/trunk/; revision=24319
2006-09-30 16:31:35 +00:00
Alex Ionescu
c25e3321b0 - Complete much more of KiRosFrldrLpbtoNtLpb. We now:
- Create a LDR_DATA_TABLE entry for each module (driver, hal, kernel) and properly fill it out and insert it into the loader block.
  - Use the NLS data block to hold pointers to the NLS tables.
  - Use the ->RegistryBase/Length loader block members to hold pointers to the SYSTEM hive.
  - Create a MEMORY_ALLOCATION_DESCRIPTOR for each type of memory currently used (LoaderNlsData, LoaderRegistrydata, LoaderSystemCode, LoaderHalCode, LoaderBootDriver).
  - Changes are currently UNUSED!
- Revert LOADER_PARAMETER_BLOCK change, it actually really is PNLS_DATA_BLOCK.

svn path=/trunk/; revision=24318
2006-09-30 16:04:23 +00:00
Alex Ionescu
13ccbc28b2 - Re-remove intrinics from winddk.h
- Fix a typo in LOADER_PARAMETER_BLOCK

svn path=/trunk/; revision=24317
2006-09-30 14:57:30 +00:00
Magnus Olsen
10bd13604b adding back __readcr4 and __readcr3 to winddk.h for gcc does not have it. come bit futer build trunk
svn path=/trunk/; revision=24316
2006-09-30 14:43:41 +00:00
KJK::Hyperion
52fb2adb7c Corrected DWORD operand typo (%l -> %k)
svn path=/trunk/; revision=24315
2006-09-30 14:40:12 +00:00
Thomas Bluemel
b1a25bba1d Fix GCC4 warnings
svn path=/trunk/; revision=24314
2006-09-30 11:54:37 +00:00
Magnus Olsen
767b7de159 hopply this will fix hal_xbox build not tested.
svn path=/trunk/; revision=24313
2006-09-30 11:33:21 +00:00
Magnus Olsen
ce35dd9b7b fix build of blue again gcc does not have _disable and _enable, but MSVC have it.
svn path=/trunk/; revision=24312
2006-09-30 10:52:41 +00:00
Ged Murphy
c3a99cfb3e implement refresh, although it runs at a snails pace until the multiple SetupDiGetClassDevs call issue is fixed
svn path=/trunk/; revision=24311
2006-09-30 10:39:36 +00:00
Ged Murphy
c2e551ecea stop icon from changing when selected.
This change doesn't seem quite right to me, but it works for now

svn path=/trunk/; revision=24310
2006-09-30 10:31:28 +00:00
Ged Murphy
f8df38ff88 add a line at the root of the tree for user ergonomics :)
svn path=/trunk/; revision=24309
2006-09-30 10:18:04 +00:00
Alex Ionescu
540d96660c - Save processor state in the PKPRCB in KiInitializeKernel.
- Set the booting CPU as idle if no next thread was scheduled.
- Raise IRQL to HIGH_LEVEL upon exiting KiInitializeKernel to match the re-lowering to DISPATCH_LEVEL in KiSystemStartup (and subsequent interrupt flush).

svn path=/trunk/; revision=24308
2006-09-30 07:04:49 +00:00
Alex Ionescu
f516d2846e - Add loop around the KiFreezeExecutionLock before continuing OS boot.
- Only check for break-in on the Boot CPU.
- Set priority to 0 *Before* lowering to DISPATCH_LEVEL.
- Also force interrupts to be enabled before lowering IRQL.
- Also set the idle thread's wait irql to DISPATCH_LEVEL (might fix some odd crashes) and set it as Running on UP builds (on SMP builds this is done in other code).

svn path=/trunk/; revision=24307
2006-09-30 06:18:45 +00:00
Alex Ionescu
eb0f964be3 - Fix some bugs in intrin.h (missing __inline__ statments in some locations, which were causing warnings due to "static").
- Remove intrinsics in winddk.h since they're now properly done in intrin.h (thanks KJK!!!)
- Make freeldr.c setup the boot KTSS like NTLDR does, so that the GDT entry for it is valid (and remove the code that was doing this from Ki386InitializeTss)
- Refactor KiSystemStartup to use 100% dynamic pointers and machine data queried from the Loader Block or actual GDT/IDT/Selectors in memory, isntead of hard-coded ntoskrnl offsets. This makes it possible to be loaded by NTLDR, which sets these system structures up by itself. (we do it in freeldr.c, as hacks).

svn path=/trunk/; revision=24306
2006-09-30 05:42:22 +00:00
Alex Ionescu
8b1ba6c11a - Use LOADER_PARAMETER_BLOCK everywhere in ReactOS except freeldr.c
- Implemented KiRosFrldrLpbtoNtLpb to do a lightweight conversion and setup. Next patches will try to get rid of PLOADER_MODULE and use LDR_DATA_TABLE_ENTRY as well as increase bootstrap compatibility.

svn path=/trunk/; revision=24305
2006-09-30 03:33:50 +00:00
Andrew Munger
723627e679 Merge 24208, 24236, 24242, and 24259 from trunk. LiveCD fixes.
svn path=/branches/ros-branch-0_3_1/; revision=24304
2006-09-30 02:54:20 +00:00
Ged Murphy
79e7a43785 - update french timedate resource file
- patch by Sylvain Petreolle

svn path=/trunk/; revision=24303
2006-09-29 18:04:15 +00:00
Aleksey Bragin
cad356e2d8 Add devmgmt to the build system, thus fixing make bootcd
svn path=/trunk/; revision=24302
2006-09-29 17:57:20 +00:00
Ged Murphy
1533a93526 add devmgmt.exe as it's usable in ROS now
svn path=/trunk/; revision=24301
2006-09-29 17:34:50 +00:00
Aleksey Bragin
b652b371db - Implement device creating, with the specified DeviceExtension
- Add stub for processing IRPs sent to the mouse driver

TODO (will be done once problem with load-order will be resolved):
- Store mouclass's callback address
- Actually call it thus making driver working
- Cleanup routines

svn path=/trunk/; revision=24300
2006-09-29 17:07:48 +00:00
Ged Murphy
c89da0aef0 there's always one that gets away ...
svn path=/trunk/; revision=24299
2006-09-29 17:07:17 +00:00
Ged Murphy
db3ddf3123 - Add the device imagelist icons to setupapi.
- It appears SetupDiGetClassImageListExW will need some work before these are usable though.

svn path=/trunk/; revision=24298
2006-09-29 16:56:24 +00:00