Art Yerkes [Mon, 1 Jan 2007 11:32:44 +0000 (11:32 +0000)]
- most of the churn here is from code and headers imported from trunk.
- there are several improvements to freeldr for which ion and fireball are responsible.
- also here is filip's cmlib.
- my changes to freeldr mostly centered around managing the kernel slab and transitioning to the kernel memory
map. the new map is built in a new area and installed once we have every page set up. this is a bit safer
than the old method.
- the video planes are handed off to ntoskrnl, and some trace macros using the frame buffer are available.
- some hacks are removed.
- current status: LdrInitModuleManagement tries to get the header from hal.dll but fails for some reason. i
need to look into it.
- this is a checkpoint, since there's been some interest in seeing how things are progressing.
- you can put any pe-coff powerpc exe (based at 0x80000000) in place of ntoskrnl to test various aspects of
the boot handoff. this will be useful for testing our trap handlers and such.
- the toolchain didn't produce correct executables in all cases before, and didn't differentiate rva32 and
rel32, causing some things to be linked wrong. so far, the current toolchain (
20061231) links correctly,
using R_PPC_UADDR32 as a surrogate for rva32, since it's never produced by gcc.
- some earlyboot video tracing is in ntoskrnl so i can peek around a bit.
svn path=/branches/powerpc/; revision=25259
Art Yerkes [Sun, 22 Oct 2006 07:24:21 +0000 (07:24 +0000)]
Build an entirely new page table.
svn path=/branches/powerpc/; revision=24597
Art Yerkes [Sun, 8 Oct 2006 10:50:50 +0000 (10:50 +0000)]
Simplify this since we now have intrin.h
svn path=/branches/powerpc/; revision=24450
Art Yerkes [Sun, 8 Oct 2006 10:31:52 +0000 (10:31 +0000)]
Also added for merge.
svn path=/branches/powerpc/; revision=24449
Art Yerkes [Sun, 8 Oct 2006 10:27:42 +0000 (10:27 +0000)]
Move mmu.h to make it more generally accessible since we need translation
functions in windows subdir.
svn path=/branches/powerpc/; revision=24448
Art Yerkes [Sun, 8 Oct 2006 10:18:28 +0000 (10:18 +0000)]
Really fix font.h
svn path=/branches/powerpc/; revision=24447
Art Yerkes [Sun, 8 Oct 2006 10:14:01 +0000 (10:14 +0000)]
Fix silly error: missing digit.
svn path=/branches/powerpc/; revision=24446
Art Yerkes [Sun, 8 Oct 2006 10:11:51 +0000 (10:11 +0000)]
Straggler. Early boot video font.
svn path=/branches/powerpc/; revision=24445
Art Yerkes [Sun, 8 Oct 2006 10:01:27 +0000 (10:01 +0000)]
Partially fixed up tree after merge from HEAD. More to do.
Fixing ICE in gcc is no fun.
svn path=/branches/powerpc/; revision=24443
Aleksey Bragin [Sat, 7 Oct 2006 13:07:25 +0000 (13:07 +0000)]
- Add structure for describing boot-loaded drivers
svn path=/trunk/; revision=24432
Alex Ionescu [Fri, 6 Oct 2006 23:11:49 +0000 (23:11 +0000)]
- Fix calls to HvInitializeHive
svn path=/trunk/; revision=24431
Magnus Olsen [Fri, 6 Oct 2006 21:59:42 +0000 (21:59 +0000)]
Fixed control apps windows, Let me known if it create any regress.
svn path=/trunk/; revision=24430
Aleksey Bragin [Fri, 6 Oct 2006 21:20:36 +0000 (21:20 +0000)]
- Load and initialize in-memory registry
- Query NLS file names from registry instead of hardcoding
- Move loading of NLS data to WinLdrLoadAndScanSystemHive()
svn path=/trunk/; revision=24429
Alex Ionescu [Fri, 6 Oct 2006 20:52:50 +0000 (20:52 +0000)]
- Fix calls to HvInitializeHive due to my last patch. Proof that Fireball doesn't properly test his commits... I broke Freeldr building before his commit, yet he commited it anyway even though freeldr couldn't build ;). Just kidding.
svn path=/trunk/; revision=24428
Aleksey Bragin [Fri, 6 Oct 2006 20:28:55 +0000 (20:28 +0000)]
- Make arc-path passed to the kernel look a bit more correct (still a hack of course)
- Add KdCom.dll loading along with ntoskrnl.exe and hal.dll
- Move registry-related code to a new file wlregistry.c
- WinLdrLoadAndScanSystemHive() is going to combine loading, initializing and parsing registry. NLS / OEM font data loading is marked with FIXMEs now, since it needs going into that routine (because registry tells the file names, not hardcoding them)
svn path=/trunk/; revision=24427
Alex Ionescu [Fri, 6 Oct 2006 19:29:25 +0000 (19:29 +0000)]
- Add PROFILE_ACPI_DOCKING_STATE.
- Fix HvInitialize definition to match more closely NT's since I need some of the extra parameters for the cm rewrite.
- Implement ExInitializePushLock and ExConvertPushLockSharedToExclusive macros.
svn path=/trunk/; revision=24426
Ged Murphy [Fri, 6 Oct 2006 17:10:57 +0000 (17:10 +0000)]
fix a TCHAR brain lapse...
svn path=/trunk/; revision=24425
Ged Murphy [Fri, 6 Oct 2006 16:08:54 +0000 (16:08 +0000)]
implemented DeviceProperties_RunDLLW and DeviceProperties_RunDLLA
svn path=/trunk/; revision=24424
Alex Ionescu [Fri, 6 Oct 2006 06:36:35 +0000 (06:36 +0000)]
- Add internal EX_CALLBACK Object to NDK. (Callback blocks are a new NT 5.2 kernel mechanism much like RunOncs blocks in Vista user-mode). They're managed by rundown protection and fast-referencing through interlocked calls to push/pop/sychrnonize system callbacks.
- Add ObOpenObjectByName to NDK, since this API is not documented in official headers.
svn path=/trunk/; revision=24422
Alex Ionescu [Thu, 5 Oct 2006 23:01:38 +0000 (23:01 +0000)]
- Guard some current cmlib includes against new cm branch
- Remove NTSYSAPI from NtBuildNumber definition in NDK.
svn path=/trunk/; revision=24416
Alex Ionescu [Thu, 5 Oct 2006 16:38:58 +0000 (16:38 +0000)]
- Remove SMSS's code for signaling the "init" event.
- Make ExpInitNls responsible for NLS initialization in Phase 0 as well, to clean up the code in ExpInitailizeExecutive a bit.
- Initialize the system time/clock in Phase 1, not in Phase 0.
- Do HAL Phase1 initialization as the first step in Phase 1 initialization, then initialize the system clock (since the HAL's RTC is now configured).
- Do Ob Phase 1 init in Phase 1 initialization, not in phase 0.
- Do Ke Phase 1 init after HAL, Ob and Ex phase 1 inits.
- Initialize NLS for Phase 1 after Ke Phase 1, instead of much later.
svn path=/trunk/; revision=24414
Alex Ionescu [Thu, 5 Oct 2006 16:14:28 +0000 (16:14 +0000)]
- Get rid of the completely convoluted way that Phase 1 initialization was being ended, with umpteen events and waits and timeouts all synchronized from user-mode and do a simple 5-second wait to determine if smss started OK or not.
- Promote the Phase 1 initialization thread by jumping directly into the zero-page thread, and remove manual zero-page thread initialization code since we simply jump into its main routine.
- 100 less lines of code :)
svn path=/trunk/; revision=24413
Alex Ionescu [Thu, 5 Oct 2006 15:13:59 +0000 (15:13 +0000)]
- Put all Phase 1 Ex* Initialization in ExpInitSystemPhase1 and clean up associated deprecated calls.
- Call ExpInitializePushLocks since we weren't doing this before.
svn path=/trunk/; revision=24412
Alex Ionescu [Thu, 5 Oct 2006 14:49:20 +0000 (14:49 +0000)]
- Rewrite ExpLoadInitialProcess by inlining and simplifying what the call to RtlCreateProcsesParameters should do, and also create our own custom environment with the same arguments that NT's smss gets.
- This optimizes booting as well as gets use the differnet SESSIONY_INITIALIZATION_FAILED, where Y is a number representing which step of the process parameter/envieonment creation failed.
svn path=/trunk/; revision=24411
Aleksey Bragin [Thu, 5 Oct 2006 09:15:44 +0000 (09:15 +0000)]
- Add #ifdef DEBUG / #endif to fix compile. FreeLdr's debug macros needs some improvement in the future...
svn path=/trunk/; revision=24410
Alex Ionescu [Thu, 5 Oct 2006 02:02:27 +0000 (02:02 +0000)]
- Use KeLoaderBlock for registry hive loading.
- Get rid of the CACHED_MODULE array and associated structures and stop using them, get rid of ParseAndCacheLoadedModules. Stop using KeLoadedModules and KeLoadedModuleCount outside of freeldr.c.
- Except for MmInit1, the kernel should now be totally isolated from FreeLDR-specific data.
svn path=/trunk/; revision=24409
Alex Ionescu [Thu, 5 Oct 2006 01:44:54 +0000 (01:44 +0000)]
- Implement ExpInitNls to initialize the NLS Section using the new semantics recently implemented. Works pretty much like the previous code in rtl/nls.c except it uses the new variable names as well as maps a view of the NLS Table into the system process.c
- Delete rtl/nls.c and all the associated deprecated code.
- Do MmInit1 and SharedUserData stuff *after* initializing the initial thread, to avoid an ASSERT during bootup.
svn path=/trunk/; revision=24408
Ged Murphy [Wed, 4 Oct 2006 22:29:18 +0000 (22:29 +0000)]
add a few more icons to the device imagelist
svn path=/trunk/; revision=24407
Christoph von Wittich [Wed, 4 Oct 2006 22:06:00 +0000 (22:06 +0000)]
-removed unused var
svn path=/trunk/; revision=24406
Aleksey Bragin [Wed, 4 Oct 2006 21:58:36 +0000 (21:58 +0000)]
- Add most needed memory-manipulating functions. Some places are really crappy (like WinLdrSetProcessorContext's IDT filling), will be fixed soon.
- FIXME: Since FreeLdr doesn't really keep track of which memory is of which type, this code has a massive hack for guessing the memory type, which is incorrect for future usage
svn path=/trunk/; revision=24405
Christoph von Wittich [Wed, 4 Oct 2006 21:47:43 +0000 (21:47 +0000)]
-support debugging of control panel applets
svn path=/trunk/; revision=24404
Christoph von Wittich [Wed, 4 Oct 2006 21:47:08 +0000 (21:47 +0000)]
-don't use GetLastError with Reg* functions
-remove @16 from def file (msvc doesn't like it)
svn path=/trunk/; revision=24403
Aleksey Bragin [Wed, 4 Oct 2006 21:36:56 +0000 (21:36 +0000)]
- Fix warning in winldr.c
- Implement WinLdrAllocateDataTableEntry() used for allocating and initializing the DTE
- Implement WinLdrLoadImage(), which uses LdrRelocateImageWithBias() from RTL, calling it with loader name "FLx86" (RTL should treat it differently -- ROS/WinLdr-specific behavior)
svn path=/trunk/; revision=24402
Aleksey Bragin [Wed, 4 Oct 2006 21:11:16 +0000 (21:11 +0000)]
- Remove some crap from the LoadAndBootWindows()
- Change debugging checkpoint to online-asm (all this is temporary), since any code after while(1){}; seems to be just optimized away by gcc
- Uncomment NDEBUG for now
svn path=/trunk/; revision=24401
Thomas Bluemel [Wed, 4 Oct 2006 19:55:53 +0000 (19:55 +0000)]
Fix broken resources
svn path=/trunk/; revision=24400
Ged Murphy [Wed, 4 Oct 2006 19:04:16 +0000 (19:04 +0000)]
add some overlay icons needed for devmgmt
svn path=/trunk/; revision=24399
Thomas Bluemel [Wed, 4 Oct 2006 18:46:57 +0000 (18:46 +0000)]
Fix almost the same bug in LdrGetProcedureAddress as in r24397
svn path=/trunk/; revision=24398
Thomas Bluemel [Wed, 4 Oct 2006 16:51:51 +0000 (16:51 +0000)]
- Fix binary search algorithm in LdrGetProcedureAddress
- Fix temporary ntdll export hack (r24395)
svn path=/trunk/; revision=24397
Ged Murphy [Wed, 4 Oct 2006 16:39:45 +0000 (16:39 +0000)]
- Open the device propsheet for child items (not parents as there isn't much point)
- Tag the Device ID onto the treeview items and provide functionality to tear it down
- Remove/change some code which wasn't needed to speed up opening time3
- We now have a pretty functional device manager. However it's heavily reliant on devmgr.dll, therefore functionality per device will rely on how complete this lib is.
svn path=/trunk/; revision=24396
Alex Ionescu [Wed, 4 Oct 2006 16:00:36 +0000 (16:00 +0000)]
- Implement XPSP2+ syscall stub that uses indirect pointer instead of executable code inside KUSER_SHARED_DATA.
- Someone (FILIP!) please fix LdrGetProcedureAddress. It's broken and I had to rename an ntdll export to make it work (see comments).
- Make sure you REBUILD CLEAN. This commit changes NCITool!!!
- Setup some NPX-related CPU features in SharedUserData during KiInitializeKernel.
- Remove some now-deprecated initialization functions.
svn path=/trunk/; revision=24395
Thomas Bluemel [Wed, 4 Oct 2006 15:19:23 +0000 (15:19 +0000)]
Don't compile with -Wconversion since we have function callbacks that have parameters with sizes different from int without forward declarations. Fixes superfluous warnings.
svn path=/trunk/; revision=24394
Aleksey Bragin [Wed, 4 Oct 2006 12:26:12 +0000 (12:26 +0000)]
- Format code of InstallFatBootcodeToPartition(), changing from tabs+spaces mix to tabs only (use "ignore whitespaces" settings to view other changes)
- Change installation logic when installing to a NTLDR's boot.ini: Firstly freeldr.ini is checked for existence, and either created or updated, then boot.ini is checked for having a proper entry, and if needed - entry is added. Fixes related bugs (having more and more ReactOS entries, no entry added if freeldr.ini already exists in the root folder)
svn path=/trunk/; revision=24392
Magnus Olsen [Wed, 4 Oct 2006 10:59:01 +0000 (10:59 +0000)]
this file some have forget set eol-style native
fixed
svn path=/trunk/; revision=24391
Art Yerkes [Wed, 4 Oct 2006 08:10:01 +0000 (08:10 +0000)]
- Create a slab that contains the last vestage of our life as the boot program.
- Include a font containing some characters we can use with boot video.
- Copy in a description of the boot framebuffer.
- Add a small ad-hoc number writing function.
- Display our progress building the initial page table.
- We don't necessarily have space in the boot-time page table so just kill
off boot-time paging.
- Pass ntoskrnl the address of the boot slab. It contains the boot font, a
description of the boot video device and all active page table entries.
- Next, well be able to use this in early ntoskrnl space to display our
progress etc. Since we're using phyiscal addresses to write to the boot
framebuffer, the page table needn't include it. This simplifies things
compared to linux, but it's expensive.
svn path=/branches/powerpc/; revision=24390
Magnus Olsen [Wed, 4 Oct 2006 06:58:03 +0000 (06:58 +0000)]
1. move all languages file to own folder
2. fixed sub languages on allot languages rc files
3. add LMH1 Norwegian translations.
See issue #1698 for more details.
svn path=/trunk/; revision=24389
Alex Ionescu [Wed, 4 Oct 2006 05:59:56 +0000 (05:59 +0000)]
- Fix boot crash due to last patch, forgot that SharedUserDAta wasn't available yet.
svn path=/trunk/; revision=24388
Alex Ionescu [Wed, 4 Oct 2006 05:48:46 +0000 (05:48 +0000)]
- Fix KUSER_SHARED_DATA in winddk.h
- Scanfor NOEXECUTE/EXECUTE/OPTIN/OPTOUT/ALWAYSON/ALWAYSOFF load strings and set the appropriate NX policy in KUSER_SHARED_DATA as well as kernel CPU Feature flags.
svn path=/trunk/; revision=24387
Alex Ionescu [Wed, 4 Oct 2006 05:29:30 +0000 (05:29 +0000)]
- Add KF_XMMI64 feature flag for SSE2 and detect it.
- Detect Hyper-Threading and set Local APIC ID (put back Thomas's code that he added in an old revision and that I had accidentally removed and forgotten to re-convert into the new KiGetFeatureBits function).
- Add code to set the kernel MX Csr Mask in the FX Save Area.
- Startup the sysenter handler on the DPC stack.
- Detect and notify users with broken Pentiums.
- Do some NPX checks to forcefully disable any FPU flags that might be set (SSE, MMX, 3DNOW) if the NPX is disabled.
svn path=/trunk/; revision=24386
Alex Ionescu [Wed, 4 Oct 2006 03:37:11 +0000 (03:37 +0000)]
- Make Kernel initialization (KeInit2) portable/more complete. KeInit2 becomes KeInitSystem, the portable part, with a call to KiInitMachineDependent, the arch-specific part.
- Do all CPU configuration through IPIs and synchronize with potential multiple CPUs.
- Add mtrr.c and patpge.c for future support of MTRR, AMD K6 MTRR, PGE and PAT support, with initilization calls in each of them (which only print out a "Sorry" message).
- Add some stubbed code for extra initizliation to do later once some detection things are fixed.
svn path=/trunk/; revision=24385
Ged Murphy [Tue, 3 Oct 2006 22:46:26 +0000 (22:46 +0000)]
update comctl32 to Wine-0.9.22 to get the new imagelist code.
svn path=/trunk/; revision=24384
Ged Murphy [Tue, 3 Oct 2006 22:43:46 +0000 (22:43 +0000)]
add LPCDLGTEMPLATE definition
svn path=/trunk/; revision=24383
Ged Murphy [Tue, 3 Oct 2006 20:51:35 +0000 (20:51 +0000)]
fix processor display
svn path=/trunk/; revision=24382
Thomas Bluemel [Tue, 3 Oct 2006 20:04:39 +0000 (20:04 +0000)]
Fix warning
svn path=/trunk/; revision=24381
Ged Murphy [Tue, 3 Oct 2006 19:55:15 +0000 (19:55 +0000)]
- 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
Hervé Poussineau [Tue, 3 Oct 2006 18:04:03 +0000 (18:04 +0000)]
Copy i8042prt driver from 0.3.1 branch to trunk. Try #2
svn path=/trunk/; revision=24379
Hervé Poussineau [Tue, 3 Oct 2006 18:03:28 +0000 (18:03 +0000)]
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
Hervé Poussineau [Tue, 3 Oct 2006 18:00:04 +0000 (18:00 +0000)]
Copy i8042prt driver from 0.3.1 branch to trunk
svn path=/trunk/; revision=24377
Hervé Poussineau [Tue, 3 Oct 2006 17:57:29 +0000 (17:57 +0000)]
Add back registry entries from i8042prt/kbdclass/mouclass
svn path=/trunk/; revision=24376
Thomas Bluemel [Tue, 3 Oct 2006 17:02:36 +0000 (17:02 +0000)]
Fix displaying Win32 errors (the Reg* APIs don't set the last error code!)
svn path=/trunk/; revision=24375
Thomas Bluemel [Tue, 3 Oct 2006 16:25:13 +0000 (16:25 +0000)]
Fix displaying the size of the RAM
svn path=/trunk/; revision=24374
Hervé Poussineau [Tue, 3 Oct 2006 14:28:21 +0000 (14:28 +0000)]
Fix a few warnings
svn path=/trunk/; revision=24373
Ged Murphy [Mon, 2 Oct 2006 23:35:43 +0000 (23:35 +0000)]
set processor information in the sysdm control panel applet
svn path=/trunk/; revision=24372
Andrew Munger [Mon, 2 Oct 2006 22:21:37 +0000 (22:21 +0000)]
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
Aleksey Bragin [Mon, 2 Oct 2006 21:28:01 +0000 (21:28 +0000)]
- Add registry entry for usbdriver.sys's legacy loading. Commented out by default.
- Add usbdriver.sys to bootcd
svn path=/trunk/; revision=24370
Aleksey Bragin [Mon, 2 Oct 2006 21:23:41 +0000 (21:23 +0000)]
- 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
Hervé Poussineau [Mon, 2 Oct 2006 21:14:40 +0000 (21:14 +0000)]
Disable keyboard and mouse before checking the i8042 controller.
Flush queue before enabling them
svn path=/trunk/; revision=24368
Hervé Poussineau [Mon, 2 Oct 2006 19:36:14 +0000 (19:36 +0000)]
Fix 2 typos (spotted by Fireball)
svn path=/trunk/; revision=24367
Ged Murphy [Mon, 2 Oct 2006 18:51:31 +0000 (18:51 +0000)]
- display system RAM on the general page.
- fixes bug 1835
svn path=/trunk/; revision=24366
Hervé Poussineau [Mon, 2 Oct 2006 18:46:39 +0000 (18:46 +0000)]
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
Ged Murphy [Mon, 2 Oct 2006 18:14:58 +0000 (18:14 +0000)]
- 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
Alex Ionescu [Mon, 2 Oct 2006 15:52:58 +0000 (15:52 +0000)]
- 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
Alex Ionescu [Mon, 2 Oct 2006 15:05:03 +0000 (15:05 +0000)]
- 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
Thomas Bluemel [Mon, 2 Oct 2006 13:29:55 +0000 (13:29 +0000)]
Fix some warnings
svn path=/trunk/; revision=24361
Alex Ionescu [Mon, 2 Oct 2006 13:23:03 +0000 (13:23 +0000)]
- 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
Thomas Bluemel [Mon, 2 Oct 2006 12:22:17 +0000 (12:22 +0000)]
Define NTOSAPI before including ntddk.h to avoid including function prototypes with dllimport
svn path=/trunk/; revision=24359
Alex Ionescu [Mon, 2 Oct 2006 05:40:36 +0000 (05:40 +0000)]
- 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
Art Yerkes [Sun, 1 Oct 2006 22:57:16 +0000 (22:57 +0000)]
A 'boot logo' of sorts to show we're about to switch to kernel mode.
We'll pass the FB address into kernel land so we can continue writing on it.
svn path=/branches/powerpc/; revision=24357
Aleksey Bragin [Sun, 1 Oct 2006 21:48:05 +0000 (21:48 +0000)]
- 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
Andrew Munger [Sun, 1 Oct 2006 21:32:47 +0000 (21:32 +0000)]
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
Aleksey Bragin [Sun, 1 Oct 2006 21:15:15 +0000 (21:15 +0000)]
- 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
Aleksey Bragin [Sun, 1 Oct 2006 21:07:25 +0000 (21:07 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 20:27:36 +0000 (20:27 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 19:43:18 +0000 (19:43 +0000)]
- 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
Aleksey Bragin [Sun, 1 Oct 2006 19:39:49 +0000 (19:39 +0000)]
- 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
Andrew Munger [Sun, 1 Oct 2006 19:29:03 +0000 (19:29 +0000)]
Merge the one line fix from 24273 v. 24276.
svn path=/branches/ros-branch-0_3_1/; revision=24349
Alex Ionescu [Sun, 1 Oct 2006 19:27:10 +0000 (19:27 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 18:27:59 +0000 (18:27 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 18:01:38 +0000 (18:01 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 15:52:10 +0000 (15:52 +0000)]
- Implement static compile-time assertions and use them for structure field checks. Thanks to Thomas and KJK.
svn path=/trunk/; revision=24345
Alex Ionescu [Sun, 1 Oct 2006 15:22:42 +0000 (15:22 +0000)]
- 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
KJK::Hyperion [Sun, 1 Oct 2006 14:49:07 +0000 (14:49 +0000)]
Fixed:
- _InterlockedCompareExchange64 (more efficient handling of 64-bit operands)
- __writecr0, __writecr3, __writecr4 (for real this time)
svn path=/trunk/; revision=24343
Thomas Bluemel [Sun, 1 Oct 2006 14:02:08 +0000 (14:02 +0000)]
Fix usage of a uninitialized variable, unnecessary goto not replaced by a if(...) statement
svn path=/trunk/; revision=24342
Thomas Bluemel [Sun, 1 Oct 2006 12:33:24 +0000 (12:33 +0000)]
fix __writecr0, __writecr3 and __writecr4
svn path=/trunk/; revision=24341
Thomas Bluemel [Sun, 1 Oct 2006 12:19:36 +0000 (12:19 +0000)]
Fix function name (fixes a redefinition error)
svn path=/trunk/; revision=24340
Hervé Poussineau [Sun, 1 Oct 2006 10:11:46 +0000 (10:11 +0000)]
Add ufatx.dll, to be able to create FATX (Xbox file system) partitions
svn path=/trunk/; revision=24339
Hervé Poussineau [Sun, 1 Oct 2006 09:05:19 +0000 (09:05 +0000)]
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
Alex Ionescu [Sun, 1 Oct 2006 07:31:33 +0000 (07:31 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 07:24:24 +0000 (07:24 +0000)]
- 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
Alex Ionescu [Sun, 1 Oct 2006 06:46:08 +0000 (06:46 +0000)]
- Clear KPCR->TEB during bootstrap as well.
- Use KPCR_PROCESSOR_NUMBER instead of 0x130.
svn path=/trunk/; revision=24335
Alex Ionescu [Sun, 1 Oct 2006 06:43:26 +0000 (06:43 +0000)]
- 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