Skip to content

Commit

Permalink
Ring3: Set 1G User pages as not present by default, fixed padding.
Browse files Browse the repository at this point in the history
  • Loading branch information
Mikhail Krichanov committed Nov 29, 2024
1 parent 63dcc29 commit 1bde91a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MdeModulePkg/Core/Dxe/SysCall/X64/InitializeMsr.c
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ MakeUserPageTableTemplate (
//
PageDirectory1GEntry->Uint64 = (UINT64)PageAddress | PageTableInfo->AddressEncMask;
PageDirectory1GEntry->Bits.ReadWrite = 1;
PageDirectory1GEntry->Bits.Present = 1;
PageDirectory1GEntry->Bits.Present = 0;
PageDirectory1GEntry->Bits.MustBe1 = 1;
}
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,14 @@ global ASM_PFX(UserPageTable)
ASM_PFX(UserPageTable):
resq 1

ALIGN 4096
global ASM_PFX(mSwitchCr3Flag)
ASM_PFX(mSwitchCr3Flag):
db 0x0

ALIGN 4096
Padding:
db 0x0

DEFAULT REL
SECTION .text

Expand Down

0 comments on commit 1bde91a

Please sign in to comment.