mirror of
https://github.com/ApfelTeeSaft/reactos.git
synced 2026-08-30 19:26:05 +00:00
- Merge Arty's Mm Page Referencing patch. I was able to complete first-stage setup (albeit only on the second try) and booting to second stage (after three tries). There are still freelist.c bugchecks but this patch is defintely a step in the right direction.
svn path=/trunk/; revision=25656
This commit is contained in:
@@ -479,7 +479,9 @@ MmInitializePageList(ULONG_PTR FirstPhysKernelAddress,
|
||||
MmPageArray[j].Flags.Type = MM_PHYSICAL_PAGE_USED;
|
||||
MmPageArray[j].Flags.Zero = 0;
|
||||
MmPageArray[j].Flags.Consumer = MC_NPPOOL;
|
||||
MmPageArray[j].ReferenceCount = 1;
|
||||
/* Reference count 2, because we're having ReferenceCount track
|
||||
MapCount as well. */
|
||||
MmPageArray[j].ReferenceCount = 2;
|
||||
MmPageArray[j].MapCount = 1;
|
||||
InsertTailList(&UsedPageListHeads[MC_NPPOOL],
|
||||
&MmPageArray[j].ListEntry);
|
||||
@@ -519,7 +521,7 @@ MmInitializePageList(ULONG_PTR FirstPhysKernelAddress,
|
||||
MmPageArray[i].Flags.Type = MM_PHYSICAL_PAGE_USED;
|
||||
MmPageArray[i].Flags.Zero = 0;
|
||||
MmPageArray[i].Flags.Consumer = MC_NPPOOL;
|
||||
MmPageArray[i].ReferenceCount = 1;
|
||||
MmPageArray[i].ReferenceCount = 2;
|
||||
MmPageArray[i].MapCount = 1;
|
||||
InsertTailList(&UsedPageListHeads[MC_NPPOOL],
|
||||
&MmPageArray[i].ListEntry);
|
||||
@@ -588,6 +590,7 @@ MmMarkPageMapped(PFN_TYPE Pfn)
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
MmPageArray[Pfn].MapCount++;
|
||||
MmPageArray[Pfn].ReferenceCount++;
|
||||
KeReleaseSpinLock(&PageListLock, oldIrql);
|
||||
}
|
||||
}
|
||||
@@ -612,6 +615,7 @@ MmMarkPageUnmapped(PFN_TYPE Pfn)
|
||||
KEBUGCHECK(0);
|
||||
}
|
||||
MmPageArray[Pfn].MapCount--;
|
||||
MmPageArray[Pfn].ReferenceCount--;
|
||||
KeReleaseSpinLock(&PageListLock, oldIrql);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user