Author: ros-arm-bringup
Date: Sun Jul 12 14:47:45 2009
New Revision: 41926
URL:
http://svn.reactos.org/svn/reactos?rev=41926&view=rev
Log:
Deal with the fact that DirectoryTableBase in EPROCESS has now been defined as PULONG
instead of LARGE_INTEGER
Remove ARM-specific hyperspace functions since these are portable now
Modified:
trunk/reactos/ntoskrnl/ke/arm/kiinit.c
trunk/reactos/ntoskrnl/ke/arm/trapc.c
trunk/reactos/ntoskrnl/mm/arm/stubs.c
Modified: trunk/reactos/ntoskrnl/ke/arm/kiinit.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/kiinit.c?r…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/kiinit.c [iso-8859-1] Sun Jul 12 14:47:45 2009
@@ -42,7 +42,7 @@
IN CCHAR Number,
IN PLOADER_PARAMETER_BLOCK LoaderBlock)
{
- LARGE_INTEGER PageDirectory;
+ ULONG PageDirectory[2];
PKPCR Pcr;
ULONG i;
@@ -200,11 +200,10 @@
// Initialize the Idle Process and the Process Listhead
//
InitializeListHead(&KiProcessListHead);
- PageDirectory.QuadPart = 0;
KeInitializeProcess(InitProcess,
0,
0xFFFFFFFF,
- &PageDirectory,
+ PageDirectory,
FALSE);
InitProcess->QuantumReset = MAXCHAR;
}
Modified: trunk/reactos/ntoskrnl/ke/arm/trapc.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ke/arm/trapc.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/ke/arm/trapc.c [iso-8859-1] Sun Jul 12 14:47:45 2009
@@ -100,7 +100,7 @@
//
// Update the page directory base
//
- TtbRegister.AsUlong = (ULONG)NewProcess->DirectoryTableBase.LowPart;
+ TtbRegister.AsUlong = NewProcess->DirectoryTableBase[0];
ASSERT(TtbRegister.Reserved == 0);
KeArmTranslationTableRegisterSet(TtbRegister);
@@ -148,8 +148,8 @@
//
// Check if address space switch is needed
//
- if (OldProcess->DirectoryTableBase.LowPart !=
- NewProcess->DirectoryTableBase.LowPart)
+ if (OldProcess->DirectoryTableBase[0] !=
+ NewProcess->DirectoryTableBase[0])
{
//
// FIXME-USER: Support address space switch
Modified: trunk/reactos/ntoskrnl/mm/arm/stubs.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/arm/stubs.c?re…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/arm/stubs.c [iso-8859-1] Sun Jul 12 14:47:45 2009
@@ -290,7 +290,7 @@
NTAPI
MmCreateProcessAddressSpace(IN ULONG MinWs,
IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase)
+ IN PULONG DirectoryTableBase)
{
NTSTATUS Status;
ULONG i;
@@ -360,7 +360,7 @@
//
// Return the page table base
//
- DirectoryTableBase->QuadPart = Pfn[0] << PAGE_SHIFT;
+ DirectoryTableBase[0] = Pfn[0] << PAGE_SHIFT;
return TRUE;
}
@@ -391,12 +391,13 @@
NTSTATUS
NTAPI
MmInitializeHandBuiltProcess(IN PEPROCESS Process,
- IN PLARGE_INTEGER DirectoryTableBase)
+ IN PULONG DirectoryTableBase)
{
//
// Share the directory base with the idle process
//
- *DirectoryTableBase = PsGetCurrentProcess()->Pcb.DirectoryTableBase;
+ DirectoryTableBase[0] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[0];
+ DirectoryTableBase[1] = PsGetCurrentProcess()->Pcb.DirectoryTableBase[1];
//
// Initialize the Addresss Space
@@ -685,93 +686,6 @@
//
if (WasDirty) *WasDirty = FALSE; // LIE!!!
if (Page) *Page = Pfn;
-}
-
-PVOID
-NTAPI
-MmCreateHyperspaceMapping(IN PFN_TYPE Page)
-{
- PMMPTE PointerPte, FirstPte, LastPte;
- MMPTE TempPte;
- PVOID Address;
-
- //
- // Loop hyperspace PTEs (1MB)
- //
- FirstPte = PointerPte = MiGetPteAddress((PVOID)HYPER_SPACE);
- LastPte = PointerPte + 256;
- while (PointerPte <= LastPte)
- {
- //
- // Find a free slot
- //
- if (PointerPte->u.Hard.L2.Fault.Type == FaultPte)
- {
- //
- // Use this entry
- //
- break;
- }
-
- //
- // Try the next one
- //
- PointerPte++;
- }
-
- //
- // Check if we didn't find anything
- //
- if (PointerPte > LastPte) return NULL;
-
- //
- // Create the mapping
- //
- TempPte = MiArmTemplatePte;
- TempPte.u.Hard.L2.Small.BaseAddress = Page;
- ASSERT(PointerPte->u.Hard.L2.Fault.Type == FaultPte);
- ASSERT(TempPte.u.Hard.L2.Small.Type == SmallPte);
- *PointerPte = TempPte;
-
- //
- // Return the address
- //
- Address = (PVOID)(HYPER_SPACE + ((PointerPte - FirstPte) * PAGE_SIZE));
- KeArmInvalidateTlbEntry(Address);
- DPRINT("[HMAP]: %p %lx\n", Address, Page);
- return Address;
-}
-
-PFN_TYPE
-NTAPI
-MmDeleteHyperspaceMapping(IN PVOID Address)
-{
- PFN_TYPE Pfn;
- PMMPTE PointerPte;
- DPRINT("[HUNMAP]: %p\n", Address);
-
- //
- // Get the PTE
- //
- PointerPte = MiGetPteAddress(Address);
- ASSERT(PointerPte->u.Hard.L2.Small.Type == SmallPte);
-
- //
- // Save the PFN
- //
- Pfn = PointerPte->u.Hard.L2.Small.BaseAddress;
-
- //
- // Destroy the PTE
- //
- PointerPte->u.Hard.AsUlong = 0;
- ASSERT(PointerPte->u.Hard.L2.Fault.Type == FaultPte);
-
- //
- // Flush the TLB entry and return the PFN
- //
- KeArmInvalidateTlbEntry(Address);
- return Pfn;
}
VOID