Branch: refs/heads/master
Home: https://github.com/tianocore/edk2
Commit: 9d8a5fbd0ca7ed563544e71d2dbdd23b0a3f53e3
https://github.com/tianocore/edk2/commit/9d8a5fbd0ca7ed563544e71d2dbdd23b0a3f53e3
Author: Jiaxin Wu <[email protected]>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
M UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmiException.nasm
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Enable single step after SmmProfile start
There is a bug in the existing code: the single step is always enabled
once the Page Fault (#PF) occurs, but it is only disabled when the SMM
Profile feature actually starts (see DebugExceptionHandler).
If the SMM Profile feature has not been started, this will result in
the single-step mode remaining enabled if a Page Fault occurs.
This patch is to enable the single-step debugging mode by setting the
Trap Flag only after SmmProfile feature starts.
Signed-off-by: Jiaxin Wu <[email protected]>
Commit: f73b97fe7f3ff12f021ea786235ec25d69d8c23c
https://github.com/tianocore/edk2/commit/f73b97fe7f3ff12f021ea786235ec25d69d8c23c
Author: Jiaxin Wu <[email protected]>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c
M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfile.c
M UefiCpuPkg/PiSmmCpuDxeSmm/SmmProfileInternal.h
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Check PDE entry exist or not before use
Before the commit 701b5797 & 4ceefd6d, 2MB-page will be created to
cover [0: 4G] by default if SmmProfile enabled, and it will be go
through to change 2MB-page into 4KB-page during page table update
(InitPaging). If so, there was no problem to assert PDE entry exist
in the RestorePageTableBelow4G.
But after above commits, PageTableMap API is used to create/update
the page table, 1G-page will be the default page table mode, and
only covers the limited address range. Those not covered ranges
will be marked as non-present in 1g-page level address. If so,
2M-page address might not exist, it's incorrect to assert PDE
entry exist in the RestorePageTableBelow4G.
The correct behavior should check PDE entry exist or not, if not,
PDE should be allocated and assigned to PDPTE.
Note:
RestorePageTableBelow4G () does not use 1G page size entries
for the creation of new pages, maintaining consistency with the
behavior of the original code.
The purpose of this patch is to ensure that a Page Directory Entry
(PDE) exists prior to its usage.
Signed-off-by: Jiaxin Wu <[email protected]>
Commit: 24f8b97a9d5b5189dd0e2acf96b4920f54ddcb7d
https://github.com/tianocore/edk2/commit/24f8b97a9d5b5189dd0e2acf96b4920f54ddcb7d
Author: Jiaxin Wu <[email protected]>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Remove assert check for PDE entry not exist
If 2MB-page is selected, PDE entry might exist, it's incorrect to assert
it's not exist. Detailed see blow case analysis (it's similar case if
address exceeds 4G):
Assume the Default Page table has covered below 6M size range:
[0000000000001000, 0000000000601000)
Then, with PageTableMap API, below Page table entry will be
created if 1G-page or 2M-page mode is selected:
[0000000000001000, 0000000000002000) --> 4K
[0000000000002000, 0000000000003000) --> 4K
...
[00000000001FF000, 0000000000200000) --> 4k
[0000000000200000, 0000000000400000) --> 2M
[0000000000400000, 0000000000600000) --> 2M
[0000000000600000, 0000000000601000) --> 4K
Above will cover 2M aligned address (0000000000600000) in page table. If
Page Fault happen by accessing 0000000000602000, need create the page
entry:
[0000000000602000, 0000000000603000) --> 4K
But PDE entry has been created/existed in page table with 0 PS bit.
So, this patch removes the assert check. The page table entry created
will be the platform-specified PageSize granularity.
Signed-off-by: Jiaxin Wu <[email protected]>
Commit: 87d3a6272ca8637787813256c1a2435e89e326e2
https://github.com/tianocore/edk2/commit/87d3a6272ca8637787813256c1a2435e89e326e2
Author: Jiaxin Wu <[email protected]>
Date: 2024-08-02 (Fri, 02 Aug 2024)
Changed paths:
M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c
Log Message:
-----------
UefiCpuPkg/PiSmmCpuDxeSmm: Iterate page table to find proper entry
Iterate through the page table to find the appropriate page table
entry for page creation if one of the following cases is met:
1) StartBit > EndBit: The PageSize of current entry is bigger than
the platform-specified PageSize granularity.
2) IA32_PG_P bit is 0 & IA32_PG_PS bit is not 0: The current entry
is present and it's a non-leaf entry.
Signed-off-by: Jiaxin Wu <[email protected]>
Compare: https://github.com/tianocore/edk2/compare/bbee1cc852fa...87d3a6272ca8
To unsubscribe from these emails, change your notification settings at
https://github.com/tianocore/edk2/settings/notifications
_______________________________________________
edk2-commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/edk2-commits