Moved out the division calculations even one more step out of the loop -- now they're really calculated once, instead of 1000 times (an improvement over the 400000 times they were calculated previously).
svn path=/trunk/; revision=32358
Remove the incomprehensible PFN allocation being done for the pages holding the page list array. We now: 1) Find the highest usable RAM page 2) Allocate the PTEs to hold the array from that point on and lower.
Don't do expensive divisions for every single page on the system being looped! Precompute the values ONCE.
Don't set the reference count for the KPCR and KUSER_SHARED_DATA to 0, these are LIVE pages!
Removed the hack which pre-initializes the balancer -- this isn't needed anymore since the initial PTEs are allocated always from RAM now.
Add some comments about the assumptions being made in this code regarding all PCs having the same kind of memory maps.
svn path=/trunk/; revision=32357
[FORMATTING] Make MmInitializePageList readable by human beings.
Remove code in MmInitializePageList which was just repeating what MmInit1 had already done (why?). Remove alignment code which was duplicated (why??).
svn path=/trunk/; revision=32354
Also, it seems someone added code to get the First/LastKernPhysAddrs without having them setup (they are setup by the FreeLDR hack-code in freeldr.c, not by "real" bootloaders)... so why set them up in the first place? The code now uses the nice memory-list based routines to get this information instead.
Re-factored some detection and debugging code, cleaned up comments.
svn path=/trunk/; revision=32353
Make a specialized UNIMPLEMENTED for Mm code so we don't go too far into the boot with 100 failures hanging behind our backs, which makes it hard to debug progress.
svn path=/trunk/; revision=32351
We still identity map the bottom 0MB of memory with a 1MB page, since this makes the most sense.
We now map the low 8MB of memory to 0x80000000-0x807FFFFF, also with 4KB pages. This area will be discardable after early-init, and contains the early boot structures allocated by FreeLDR.
The Loader Parameter Block and its Extension are now dynamically allocated, instead of being static inside FreeLDR.
Fixed some bugs in the ARM_PTE structure.
svn path=/trunk/; revision=32350
Add exp.c for ARM. Stub out KeContextToTrapFrame in C.
Add thrdini.c for ARM and implement KeArmInitThreadWithContext -- may require changes if the exception frame structure isn't preserving all we need. Stub out KiThreadStartup in C.
svn path=/trunk/; revision=32341
- rename ObmXxx functions to UserXxx functions
- remove some macros
- move prototypes to object.h
- implement UserreferenceObjectByHandle creating a reference to the object, used for cursoricon stuff so far
- rewrite object manager functions to reasonably handle references
- dereference cursoricons correctly, so they will really get deleted -> fixes a cursoricon leak
- destroy submenus in NtUserDestroyMenu -> fixes a big menu leak
- free the buffer of the menu text -> fixes a mem leak
- delete old bitmaps in NtUserSetCursorContent -> fixes a bitmap leak
- delete monitor object on failure
Now taskmgr doesn't leak memory anymore. we still leak some user handles here and there even after terminating a process, but it's much better now.
svn path=/trunk/; revision=32336
There's now a cpu.c for ARM as well, and the cache routines are now there.
KDCOM APIs were marked as kernel stubs, so the kernel was never linking with kdcom. This has been fixed, and boot now stops in kdcom!KdPortInitializeEx since there's no ARM-compatible code.
svn path=/trunk/; revision=32334
Finished implementation of KiSystemStartup.
Copied KiInitializeKernel from x86 to ARM, removing irrelevant parts. This is our current checkpoint.
svn path=/trunk/; revision=32333
We now have HalSweepI/Dcache APIs exported and stubbed in the ARM HAL (great, since UNIMPLEMENTED macro now works).
We now setup more of the PCR, including all the cache values required, then we call the HAL sweep functions (TBD).
svn path=/trunk/; revision=32330
We were doing the initial PCR/PDR page allocation completely wrong since we're using 1MB section pages, not 4KB pages (this needs to be fixed later).
Piggyhack arm_kprintf on top of DebugService which we now define. DPRINT1 and ASSERT now work!
Send ARC paths and normalized command-line in the loader parameter block.
Current state:
FreeLoader v3.0 for ARM
Bootargs: rdbase=0x2000000 rdsize=0x1400000
Detecting Hardware...
Loading...
Reading NTOSKRNL.EXE
Reading BOOTVID.DLL
Reading HAL.DLL
Reading HAL.DLL
Reading c_1252.nls
Reading c_437.nls
Reading l_intl.nls
Reading scsiport.sys
Reading atapi.sys
Reading buslogic.sys
Reading pci.sys
Reading class2.sys
Reading disk.sys
Reading vfatfs.sys
Reading ndis.sys
Mapped serial port to 0xc00f1000
(ntoskrnl/ke/arm/kiinit.c:135) -----------------------------------------------------
(ntoskrnl/ke/arm/kiinit.c:136) ReactOS 0.4-SVN (Build 20080207-r32151)
(ntoskrnl/ke/arm/kiinit.c:137) Command Line: DEBUG DEBUGPORT=COM1 BAUDRATE=115200 SOS
(ntoskrnl/ke/arm/kiinit.c:138) ARC Paths: ramdisk(0) \ ramdisk(0) \ReactOS\
svn path=/trunk/; revision=32328
Freeldr maps the "Versatile"'s serial port into virtual
memory now, and C code can just use arm_kprintf().
This is not code that is supposed to remain in the kernel,
it's only needed for bringup, until enough is working so
that standard serial DbgPrint() works through the original
code path.
svn path=/trunk/; revision=32327
We now have a file for C-code initialization (no reason to use assembly).
We now have some basic TLB routines and intrinsics (not tested).
We also detect if we are running on V4 or V6, and set the TLB and ASID counts respectively.
svn path=/trunk/; revision=32323
Thanks to Johannes Anderwald for explaining me why it made more Problems than fix stuff to translate some strings and how to fix it.
svn path=/trunk/; revision=32322
We now setup ARM cache information in the loader block.
We now allocate the kernel, interrupt and abort stacks, as well as the idle thread and process, and boot PRCB.
We now allocate the PCR and PDR pages.
We now send the command line to the kernel in the LoaderBlock's load options.
svn path=/trunk/; revision=32318
On ARM, don't prepend underscore to the kernel entrypoint.
We now correctly jump into the kernel entrypoint, instead of random code!
svn path=/trunk/; revision=32314
Write ksarm.h and kxarm.h headers, defining the ARM Assembly ABI.
Rewrite the ARM assembler files we currently have to match the ABI.
svn path=/trunk/; revision=32313