Commit graph

22732 commits

Author SHA1 Message Date
Thomas Bluemel 99379a7e2c Fix warning
svn path=/trunk/; revision=24381
2006-10-03 20:04:39 +00:00
Ged Murphy a2d3c5fe33 - Implement the context menu (mouse only at the moment) makeing it accessable when the cursor over the item only
- open the propsheet when double clicking child items
- make 'properties' bold

svn path=/trunk/; revision=24380
2006-10-03 19:55:15 +00:00
Hervé Poussineau 21dd51fc8b Copy i8042prt driver from 0.3.1 branch to trunk. Try #2
svn path=/trunk/; revision=24379
2006-10-03 18:04:03 +00:00
Hervé Poussineau 90b4dc09c7 Of course, I've added one level in directory structure in 24377. Delete the whole i8042prt driver and retry
(Sorry, this revision won't build)

svn path=/trunk/; revision=24378
2006-10-03 18:03:28 +00:00
Hervé Poussineau 273908b19f Copy i8042prt driver from 0.3.1 branch to trunk
svn path=/trunk/; revision=24377
2006-10-03 18:00:04 +00:00
Hervé Poussineau b207566c12 Add back registry entries from i8042prt/kbdclass/mouclass
svn path=/trunk/; revision=24376
2006-10-03 17:57:29 +00:00
Thomas Bluemel fd990e9ada Fix displaying Win32 errors (the Reg* APIs don't set the last error code!)
svn path=/trunk/; revision=24375
2006-10-03 17:02:36 +00:00
Thomas Bluemel 7b5fcdd9fa Fix displaying the size of the RAM
svn path=/trunk/; revision=24374
2006-10-03 16:25:13 +00:00
Hervé Poussineau 30189808bf Fix a few warnings
svn path=/trunk/; revision=24373
2006-10-03 14:28:21 +00:00
Ged Murphy 640d89daad set processor information in the sysdm control panel applet
svn path=/trunk/; revision=24372
2006-10-02 23:35:43 +00:00
Andrew Munger 2167cc7a61 Patch from ShadowFlare, bug 1838.
"The current implementation continues to register or unregister additional DLLs
that were specified, even if one of the earlier ones failed.  The behavior on
the Microsoft version is different; if one fails, it stops there instead of
continuing.  Some installers may possibly depend on this behavior."

svn path=/trunk/; revision=24371
2006-10-02 22:21:37 +00:00
Aleksey Bragin 835bb80157 - Add registry entry for usbdriver.sys's legacy loading. Commented out by default.
- Add usbdriver.sys to bootcd

svn path=/trunk/; revision=24370
2006-10-02 21:28:01 +00:00
Aleksey Bragin 903c277247 - Change CONNECT_DATA to DEV_CONNECT_DATA
- Add the last bit to the usb mouse driver to make it functional - recognition by mouclass.sys, and sending input data to it
- Misc small changes

Now USB mouse works in 2nd stage (you need to add usbdriver.sys as a legacy driver to the registry certainly)

TODO, but not of the top priority:
- Make unloading correct

svn path=/trunk/; revision=24369
2006-10-02 21:23:41 +00:00
Hervé Poussineau c99914fdac Disable keyboard and mouse before checking the i8042 controller.
Flush queue before enabling them

svn path=/trunk/; revision=24368
2006-10-02 21:14:40 +00:00
Hervé Poussineau 3674f2ef32 Fix 2 typos (spotted by Fireball)
svn path=/trunk/; revision=24367
2006-10-02 19:36:14 +00:00
Ged Murphy 3193a5d7e9 - display system RAM on the general page.
- fixes bug 1835

svn path=/trunk/; revision=24366
2006-10-02 18:51:31 +00:00
Hervé Poussineau b2aeafcad4 Implement CMP_WaitNoPendingInstallEvents
Wait for Pnp manager to finish its job before displaying the 2nd stage setup
Thanks Filip for his precious help on the umpnpmgr.exe side (not thread-safe as Single linked list functions are not implemented in ntdll)

svn path=/trunk/; revision=24365
2006-10-02 18:46:39 +00:00
Ged Murphy 4cfbdb6f63 - Only call SetupDiGetClassDevs once for each class, this makes load time 3 times faster although I'm still not happy with it. We may have to enumerate the drivers in the background.
- use UINT for 1 bit flags, reduce the width a little and check the menu.

svn path=/trunk/; revision=24364
2006-10-02 18:14:58 +00:00
Alex Ionescu 04c5f92621 - Combine SeInit1 and SeInit2 into SeInit since both can be done together now.
- Call PsInitSystem instead of PspInitPhase0, since PsInitsystem is the "external" phase-choosing routine.
- Implement ExComputeTickCountMultiplier to create a 24-bit precision remainder + whole integer of the ms/clock tick used in SharedUserData.
- Set the OS version and Machine Type (i386/PPC (<3 Arty) in SharedUserData.
- Move some HAL calls in Phase 2 (actually Phase 1...), same for KeInit2.
- Break into KDBG a bit earlier.

svn path=/trunk/; revision=24363
2006-10-02 15:52:58 +00:00
Alex Ionescu 06142d4e0d - Setup memory limits in shared user data.
- Loop security descriptors to find NLS data and make a copy of it in kernel pool, because the NLS buffer from NTLDR will be freed on NT. Also discovered a bug in Freeldr where it doesn't allocate ths NLS files sequentially, leaving a hole of 0x1000 between them. Added a hack to compensate (won't break NTLDR booting, just will waste 8KB of memory).
- Allocate the system call count table on checked builds.
- Refactor Ob/Se booting to match more closely NT, and so that we can do Se initialization in one shot.

svn path=/trunk/; revision=24362
2006-10-02 15:05:03 +00:00
Thomas Bluemel 62ac7ad5c9 Fix some warnings
svn path=/trunk/; revision=24361
2006-10-02 13:29:55 +00:00
Alex Ionescu afa1de7c81 - Implement Phase 0 Ex initialization (Resource, Lookaside initialization) and generic Ex initialization routine.
- Clear the crypto exponent on boot-up.
- Set default global flags for checked builds.
- Set NtSystemRoot (SharedUserData) to C:<NT BOOT PATH> on startup.
- Cleanup lookas.c file and implement routines to initialize the system lookaside list in phase 0.

svn path=/trunk/; revision=24360
2006-10-02 13:23:03 +00:00
Thomas Bluemel 526efd2ee7 Define NTOSAPI before including ntddk.h to avoid including function prototypes with dllimport
svn path=/trunk/; revision=24359
2006-10-02 12:22:17 +00:00
Alex Ionescu 7fcf928e38 - Continue implementation of KiRosFrldrLpbToNtLpb by parsing the FreeLDR command line and:
* Removing the ARC Boot path and splitting it into the ARC Boot Device Name, the ARC HAL Device Name, and the NT Boot and HAL Path Names, saved in their respective LoaderBlock pointers.
  * Converting every slash to a space. ("/DEBUGPORT" -> " DEBUGPORT")
  * Now we can fully parse and read NTLDR command lines.
- Update various code in the kernel to:
  * Use LoaderBlock->ArcDeviceNamePath & friends instead of the command line.
  * Stop depending on slashes, and instead use strstr for parameters.

svn path=/trunk/; revision=24358
2006-10-02 05:40:36 +00:00
Aleksey Bragin 5c112af711 - Add a check to the boot.ini-changing code, to prevent creation of a new ReactOS entry after each installation.
svn path=/trunk/; revision=24356
2006-10-01 21:48:05 +00:00
Andrew Munger e6adaebbce Resource sync from trunk.
Merged 24269, 24281, 24285, 24292, 24294-24295,
24298-24299, and 24303.

svn path=/branches/ros-branch-0_3_1/; revision=24355
2006-10-01 21:32:47 +00:00
Aleksey Bragin 5cf4352021 - Implement loading of NLS data, SYSTEM hive data (just simple loading into memory, without any kind of parsing or even checking if that data is correct)
- Add a function for creating a stub of hardware config (config consisting of only one node - root)
- Implement two steps of LPB initialization (names Phase 0 and Phase 1 are used internally by me, and doesn't correspond to anything)
- Implement a WinLdrSetupForNt, which allocates and initializes some specific structures (PCR, TSS, GDT, IDT)
- Respectively enable calls to these functions from LoadAndBootWindows()

svn path=/trunk/; revision=24354
2006-10-01 21:15:15 +00:00
Aleksey Bragin eb998b4eaf - Comment out xbox memory detection for now (until fully switched to NT-style LPB)
- Fix HalpInitializePhase0() prototype
- Add halxbox back to build

svn path=/trunk/; revision=24353
2006-10-01 21:07:25 +00:00
Alex Ionescu 0c1b724e79 - Un-optimize KeGetPcr and make it use fs:20h instead of hard-coding the 0xFF.... address, because someone decided that ROS should have a different KPCR address then NT.
- This gets NTLDR working with ReactOS and I can boot all the way to MmInit1 (which fails due to missing KeMemoryMap & freeldr data).
- Serial port output works with DPRINT1 as well ;-)

svn path=/trunk/; revision=24352
2006-10-01 20:27:36 +00:00
Alex Ionescu 2855e1f08f - Do MmInit1 in KiInitializeKernel so we can access SharedUserData from it (we'll need to setup the CPU Features there).
- Cleanup some external/prototype mess and put them nicely into headers.

svn path=/trunk/; revision=24351
2006-10-01 19:43:18 +00:00
Aleksey Bragin 3d9d36ccff - Add new type of debug print for windows loader
- Add address conversion routines for windows loader
- Add stubs for PE loading, memory operations
- Add some code to the LoadAndBootWindows()

Some notes:
- The windows loader is going to become some kind of a library in future, shared at least between freeldr and EFI loader.
- The code in windows loader is specific to i386 architecture for now, but I add it to the "freeldr_base". I better separate it a bit later, after discussion with arty (because I hardly want compatibility with loading windows on PPC).

svn path=/trunk/; revision=24350
2006-10-01 19:39:49 +00:00
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