mirror of
https://github.com/reactos/reactos.git
synced 2025-03-01 03:45:16 +00:00
Use new kstack
This commit is contained in:
parent
51c35c0dfe
commit
780f79e94b
2 changed files with 20 additions and 3 deletions
|
@ -125,7 +125,7 @@
|
|||
#define MI_WRITE_VALID_PPE MI_WRITE_VALID_PTE
|
||||
|
||||
/* Translating virtual addresses to physical addresses
|
||||
(See: "Intel® 64 and IA-32 Architectures Software Developer’s Manual
|
||||
(See: "Intel® 64 and IA-32 Architectures Software Developer’s Manual
|
||||
Volume 3A: System Programming Guide, Part 1, CHAPTER 4 PAGING")
|
||||
Page directory (PD) and Page table (PT) definitions
|
||||
Page directory entry (PDE) and Page table entry (PTE) definitions
|
||||
|
@ -219,3 +219,20 @@ C_ASSERT(PD_COUNT == 1);
|
|||
(PMMPTE)((ULONG_PTR)MmNonPagedPoolEnd - \
|
||||
(((x)->u.Subsect.SubsectionAddressHigh << 7) | \
|
||||
(x)->u.Subsect.SubsectionAddressLow << 3))
|
||||
|
||||
FORCEINLINE
|
||||
PMMPTE
|
||||
MiReserveKernelStackPtes(
|
||||
_In_ ULONG NumberOfPtes)
|
||||
{
|
||||
return MiReserveSystemPtes(NumberOfPtes, SystemPteSpace);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
MiReleaseKernelStackPtes(
|
||||
_In_ PMMPTE FirstPte,
|
||||
_In_ ULONG NumberOfPtes)
|
||||
{
|
||||
MiReleaseSystemPtes(FirstPte, NumberOfPtes, SystemPteSpace);
|
||||
}
|
||||
|
|
|
@ -267,7 +267,7 @@ MmDeleteKernelStack(IN PVOID StackBase,
|
|||
//
|
||||
// Release the PTEs
|
||||
//
|
||||
MiReleaseSystemPtes(PointerPte, StackPages + 1, SystemPteSpace);
|
||||
MiReleaseKernelStackPtes(PointerPte, StackPages + 1);
|
||||
}
|
||||
|
||||
PVOID
|
||||
|
@ -321,7 +321,7 @@ MmCreateKernelStack(IN BOOLEAN GuiStack,
|
|||
//
|
||||
// Reserve stack pages, plus a guard page
|
||||
//
|
||||
StackPte = MiReserveSystemPtes(StackPtes + 1, SystemPteSpace);
|
||||
StackPte = MiReserveKernelStackPtes(StackPtes + 1);
|
||||
if (!StackPte) return NULL;
|
||||
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue