Branch: refs/heads/master Home: https://github.com/tianocore/edk2 Commit: 897284d47deec28a3f88a7694cfc899856b897b9 https://github.com/tianocore/edk2/commit/897284d47deec28a3f88a7694cfc899856b897b9 Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024)
Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/NonMmramMapDxeSmm.c M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Fix IsSmmCommBufferForbiddenAddress check SmiPFHandler depends on the IsSmmCommBufferForbiddenAddress() to do the forbidden address check: For SMM, verifying whether an address is forbidden is necessary only when RestrictedMemoryAccess is enabled. For MM, all accessible address is recorded in the ResourceDescriptor HOB, so no need check the RestrictedMemoryAccess is enabled or not. This patch is to move RestrictedMemoryAccess check into SMM IsSmmCommBufferForbiddenAddress to align with above behavior. With the change, SmiPFHandler doesn't need to check the RestrictedMemoryAccess enable or not. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: c8ce84d06785ee7e7a3e1a8ab7c0af42ccbe3aa8 https://github.com/tianocore/edk2/commit/c8ce84d06785ee7e7a3e1a8ab7c0af42ccbe3aa8 Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Always save and restore CR2 Following the commit 9f29fbd3, full mapping SMM page table is always created regardless the value of the PcdCpuSmmRestrictedMemoryAccess. Consequently, a page fault (#PF) that triggers an update to the page table occurs only when SmiProfile is enabled. Therefore, it is necessary to save and restore the CR2 register when SmiProfile is configured to be enabled. And the operation of saving and restoring CR2 is considered to be not heavy operation compared to the saving and restoring of CR3. As a result, the condition check for SmiProfile has been removed, and CR2 is now saved and restored unconditionally, without the need for additional condition checks. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: f6eb069e1719a6203814846bd953d85518bc4f21 https://github.com/tianocore/edk2/commit/f6eb069e1719a6203814846bd953d85518bc4f21 Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Deadloop if PFAddr is not supported by system Deadloop if PFAddr is not supported by system, no need check SMM CPU RestrictedMemory access enable or not. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: 4f6614fc180c3f24a72ac3234daba8575f13cbad https://github.com/tianocore/edk2/commit/4f6614fc180c3f24a72ac3234daba8575f13cbad Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.c M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Correct SetPageTableAttributes func usage SetPageTableAttributes() will use the IfReadOnlyPageTableNeeded() to determine whether it is necessary to set the page table itself to read-only. And IfReadOnlyPageTableNeeded() has already token into account the status of IsRestrictedMemoryAccess(). Therefore, there is no need for an additional call to IsRestrictedMemoryAccess() before calling the SetPageTableAttributes(). Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: 633a755d99d8f889c4e3ed74cf558b16e6a67251 https://github.com/tianocore/edk2/commit/633a755d99d8f889c4e3ed74cf558b16e6a67251 Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/SmmCpuMemoryManagement.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Update IfReadOnlyPageTableNeeded After the 9f29fbd3, full mapping SMM page table is always created regardless the value of the PcdCpuSmmRestrictedMemoryAccess. If so, SMM PageTable Attributes can be set to ready-only since there is no need to update it. So, this patch is to remove restricted memory access check when setting the SMM PageTable attributes. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: b4820f2d6591357d7e6f35b5e5340300d3be790f https://github.com/tianocore/edk2/commit/b4820f2d6591357d7e6f35b5e5340300d3be790f Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Clean mCpuSmmRestrictedMemoryAccess Currently, mCpuSmmRestrictedMemoryAccess is only used by the IsRestrictedMemoryAccess(). And IsRestrictedMemoryAccess() can consume the PcdCpuSmmRestrictedMemoryAccess directly. Therefore, mCpuSmmRestrictedMemoryAccess can be cleaned to simply the code logic. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Commit: b437b5ca4c1a6725897dfd0740de6ef20cacd226 https://github.com/tianocore/edk2/commit/b437b5ca4c1a6725897dfd0740de6ef20cacd226 Author: Jiaxin Wu <jiaxin...@intel.com> Date: 2024-09-06 (Fri, 06 Sep 2024) Changed paths: M UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/PageTbl.c A UefiCpuPkg/PiSmmCpuDxeSmm/Ia32/SmmFuncsArchDxeSmm.c M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuDxeSmm.inf M UefiCpuPkg/PiSmmCpuDxeSmm/PiSmmCpuStandaloneMm.inf M UefiCpuPkg/PiSmmCpuDxeSmm/X64/PageTbl.c A UefiCpuPkg/PiSmmCpuDxeSmm/X64/SmmFuncsArchDxeSmm.c Log Message: ----------- UefiCpuPkg/PiSmmCpuDxeSmm: Remove RestrictedMemoryAccess check for MM CPU The PcdCpuSmmRestrictedMemoryAccess is declared as either a dynamic or fixed PCD. It is not recommended for use in the MM CPU driver. Furthermore, IsRestrictedMemoryAccess() is only needed for SMM. Therefor, there is no need for MM to consume the PcdCpuSmmRestrictedMemoryAccess. So, this patch is to add the SMM specific file for its own functions, with the change, the dependency of the MM CPU driver on PcdCpuSmmRestrictedMemoryAccess can be removed. Signed-off-by: Jiaxin Wu <jiaxin...@intel.com> Compare: https://github.com/tianocore/edk2/compare/c047353a1244...b437b5ca4c1a To unsubscribe from these emails, change your notification settings at https://github.com/tianocore/edk2/settings/notifications _______________________________________________ edk2-commits mailing list edk2-commits@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/edk2-commits