Commit graph

19 commits

Author SHA1 Message Date
ReactOS Portable Systems Group
e34e342d45 - Fix build of NTOS and FreeLDR on ARM.
svn path=/trunk/; revision=34889
2008-07-28 03:07:03 +00:00
ReactOS Portable Systems Group
1b0bec70c1 - Fix the NTOS ARM build after the recent Mm changes.
svn path=/trunk/; revision=34885
2008-07-28 02:13:56 +00:00
ReactOS Portable Systems Group
908aede2ef - Remove MiGetUserPageDirectoryCount from the ARM Mm since this function is now useless after our cleanups.
svn path=/trunk/; revision=34872
2008-07-27 23:48:19 +00:00
ReactOS Portable Systems Group
ac0487dfa5 - Fix a couple of bugs, and majorly refactor MmDeleteVirtualMapping to sync it to the x86 version somewhat more.
svn path=/trunk/; revision=34859
2008-07-27 20:58:23 +00:00
ReactOS Portable Systems Group
027390f247 - Major cleanup, refactoring, and bugfixing of ARM Mm code in preparation for user-mode support.
- Sync the code a lot closer to its x86 counterpart, still more work to be done.
- Very soon, it should be possible to share upward of 50% of the new ARM code with the x86 version of React as well and unify the implementations.

svn path=/trunk/; revision=34857
2008-07-27 19:52:41 +00:00
ReactOS Portable Systems Group
574cb20678 - MmDeleteVirtualMapping can be called for memory that isn't mapped yet -- just ignore this like we do on x86.
- This gets us much farther, to the point where we try to load smss.exe but can't find it.


svn path=/trunk/; revision=34821
2008-07-27 05:38:51 +00:00
ReactOS Portable Systems Group
4cdbf59086 - We need to call MmMarkPageMapped for virtual mappings, except for those created thgouh MmCreateVirtualMappingForKernel (even though the other versions of the call can still do kernel mappings).
- Refactored the virtual mapping function to support this. MmUnmapIoSpace now works properly.

svn path=/trunk/; revision=34667
2008-07-22 09:31:13 +00:00
ReactOS Portable Systems Group
0e52616f5f - Implement MmRawDeleteVirtualMapping.
- RamdiskUnmapPages works now.


svn path=/trunk/; revision=34664
2008-07-22 07:11:33 +00:00
ReactOS Portable Systems Group
9a54151f86 - Fix ARM exports to make up for the recent i386 changes.
- Implement MmGetPageProtect. MDL Probe And Lock now works.
- We get to RamdiskReadWrite now!


svn path=/trunk/; revision=34623
2008-07-21 01:41:04 +00:00
ReactOS Portable Systems Group
926d44768b - Add driver database code to FreeLDR (using ReactOS-style LoadOrderListHead instead of BootDriversListHead, oh well!).
- This means we actually load and parse drivers now!!! Some Mm work was required to support unloading and remapping: MmDeleteVirtualMapping is now implemented.
- We can now see scsiport.sys and atapi.sys strings displayed on the LCD.
- Implemented HalQuery/SetDisplayParameters, HalQuery/ReleaseDisplayOwnership and HalDisplayString just like on x86.
- Since we now load symbols for the drivers (or at least try to), stubbed DebugService2, which also shows us what's being loaded.
- Extended the Loader MemoryType array to include XIP/RAM Disk Memory.  


svn path=/trunk/; revision=34210
2008-06-30 08:40:54 +00:00
ReactOS Portable Systems Group
c50bcc2c12 - Implement beginnings of Ramdisk Port Driver. Planning compatibility with ISO, SDI and WIM files and full Windows support.
- New license for our code.


svn path=/trunk/; revision=34170
2008-06-29 02:58:05 +00:00
ReactOS Portable Systems Group
aa2b83d508 - Implement MmGetPfnForProcess, MmIsPageSwapEntry.
- Fix a bug in MmDeletePageTable.
- Use MmCreateVirtualMappingForKernel when we are already in the right process context, and allow it to be used for addresses < KSEG0_BASE as well.
- We now have full memory mapped file support, and get all the way to CmInitSystem1.


svn path=/trunk/; revision=34072
2008-06-24 14:16:06 +00:00
ReactOS Portable Systems Group
bfd0d8594d - Fix a bug in MmGetPhysicalAddress.
- Don't hang in the clock interrupt anymore, for now we'll just ignore it (but it works! :D)
- Make all unimplemented bootvid functions hang the system, so we can better stop at progress-points.
- Implement VidInitialize:
  - We allocate a 640x480@16bpp framebuffer using contiguous physical memory (our MMU code survives!).
  - We setup the LCD controller timings and framebuffer address.
  - We enable the LCD
- For debugging, we're also drawing a nice little test pattern... and it works! We have GUI Code :)


svn path=/trunk/; revision=33974
2008-06-15 03:32:52 +00:00
ReactOS Portable Systems Group
e66a86c8b9 - Fix stupid IRQL/Interrupt handling code that someone wrote ;):
- Get rid of KeSwapIrql -- both lower and higher IRQL handling was treated the same!
  - We can now re-activate the assert in the IRQL code
  - Disable interrupts before changing the interrupt mask!!!
  - And re-enable them solely if they were enabled.
  - Clear interrupts mask before setting a new one -- raising isn't always additive!
  - Fix KiInterruptHandler to perform operations in the right order.
  - Finish implementing interrupt exit code.
- Code KeArmStatusRegisterGet to read CPSR and interrupt status.
- Make debug prints a lot more readable and dont trying to acquire the stack during pool allocations.
- Setup the clock interval timer!!!
- This code regresses progress but makes stuf fwork right. We'll get better after implementing the stall interrupt.


svn path=/trunk/; revision=33967
2008-06-14 22:02:50 +00:00
ReactOS Portable Systems Group
3d10a2eabc - Forgot to commit previous HAL changes.
- There is no reason to implement the Interlocked* APIs in assembly in the kernel -- just have them call the intrinsics.
- Also fix the way we were overloading the exported APIs, we now use the intrinsics all the time.
- Convert loader block address to virtual, and parse the addresses inside it and convert them to virtual too, after we don't use them in FreeLDR anymore -- the kernel will delete the p->v identity mapping, and eventually still need to touch the loader block.
- Implement MmGetPhysicalAddress and MiGetUserPageDirectoryCount for ARM.
- We now reach the point where we start initializing the boot drivers' memory information.

svn path=/trunk/; revision=32654
2008-03-11 04:42:54 +00:00
ReactOS Portable Systems Group
0b44376e27 ARM Port Memory Management Checkpoint:
- Implemented and defined the MMU-OS architecture for the ARM port. The details are too long for a commit message, but we have decided to replicate the x86 NT memory manager layout. We've defined a PTE_BASE at 0xC0000000 just like on x86, and we use a PDE_BASE at 0xC1000000. Unlike the x86, we can't use PDE-PTE self-mapping because ARM has different formats (and sizes!) for PDE vs PTEs! We emulate the behavior however (which adds a small performance hit) and the Mm porting is thus at least 10 times easier.
- Moved serial port to 0xE0000000 for now.
- We now parse the board memory map from u-boot.
- Added memory allocation code to FreeLDR -- we now build a full ARC memory map for the kernel.
- FreeLDR allocates page tables and sets up the initial support for our memory layout (see comments for some lengthier explenations)
- Allocations made by FreeLDR for loading ReactOS are now made from a "shared heap" page that's also marked in the memory map.
- Registry and NLS data are now being put into the loader block.
- We now create a loader entry for the kernel (but not anything else -- we'll have to parse the list properly later).
- Defined correct _HARDWARE_PTE_ARM and _MMPTE_HARDWARE for ARM.
- ARM_COARSE_PAGE_TABLE is now 4KB instead of 1KB, going against the architecture! We do this for proper OS support of the PTE_BASE.
- Fixed build due to KiSystemStartulReal change.
- Fixed a bug on the x86 build when creating memory allocation descriptors. Memory corruption could occur in certain scenarios.
- Implemented significant portions of the ARM memory manager code in the kernel:
  - MmGetPageDirectory.
  - MmDeletePageTable (for the kernel address space only).
  - MmIsPagePresent (for the kernel address space only).
  - MmCreateVirtualMappingForKernel.
  - MmCreateVirtualMapping (calls MmCreateVirtualMappingUnsafe).
  - MmCreateVirtualMappingUnsafe (for the kernel address space only).
  - MmSetPageProtect (unused on ARM).
  - MmCreateHyperspaceMapping.
  - MmDeleteHyperspaceMapping.
  - MmInitGlobalKernelPageDirectory.
  - MmInitPageDirectoryMap.
- With the above, this means we now go well inside MmInit1: the PFN database is setup and works, memory areas are functional, and non-paged pool is fully working.
- We currently hit a data abort during paged pool setup -- this is to be expected, since we don't have any exception handlers yet. These are coming up next -- we have to start handling crashes (and page faults).


svn path=/trunk/; revision=32640
2008-03-10 17:27:14 +00:00
ReactOS Portable Systems Group
7c1fea060f Don't overwrite the stacks anymore -- set the right pointer in the ARM loader block (remember that stacks are top-down!).
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
2008-02-14 02:33:42 +00:00
ReactOS Portable Systems Group
ea56f811ec Convert all Mm ASM stubs to C stubs in mm/arm/stubs.c. Now we can see what functions are called.
svn path=/trunk/; revision=32342
2008-02-13 06:43:36 +00:00
ReactOS Portable Systems Group
e31c6ada8e Add /arm tree for Memory Manager and stub MmUpdatePageDir in C.
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
2008-02-13 05:16:14 +00:00