From 7144df121c63c3398fed1728cd2368511aefc4cd Mon Sep 17 00:00:00 2001 From: Mikhail Krichanov Date: Tue, 12 Mar 2024 12:45:40 +0300 Subject: [PATCH] SysCall: Fixed UnicodeCollation wrappers. --- MdeModulePkg/Core/Dxe/SysCall/BootServices.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Core/Dxe/SysCall/BootServices.c b/MdeModulePkg/Core/Dxe/SysCall/BootServices.c index 6005cf7ec8..366fb45a77 100644 --- a/MdeModulePkg/Core/Dxe/SysCall/BootServices.c +++ b/MdeModulePkg/Core/Dxe/SysCall/BootServices.c @@ -1190,6 +1190,7 @@ CallBootService ( gCpu->GetMemoryAttributes (gCpu, (EFI_PHYSICAL_ADDRESS)((UINTN)UserRsp + 6 * sizeof (UINTN) - 1), &Attributes); ASSERT ((Attributes & EFI_MEMORY_USER) != 0); + DisableSMAP (); if ((CHAR16 *)UserRsp->Arguments[4] != NULL) { gCpu->GetMemoryAttributes (gCpu, (EFI_PHYSICAL_ADDRESS)UserRsp->Arguments[4], &Attributes); ASSERT ((Attributes & EFI_MEMORY_USER) != 0); @@ -1205,6 +1206,7 @@ CallBootService ( return EFI_OUT_OF_RESOURCES; } } + EnableSMAP (); Unicode->FatToStr ( Unicode, @@ -1258,6 +1260,7 @@ CallBootService ( gCpu->GetMemoryAttributes (gCpu, (EFI_PHYSICAL_ADDRESS)((UINTN)UserRsp + 6 * sizeof (UINTN) - 1), &Attributes); ASSERT ((Attributes & EFI_MEMORY_USER) != 0); + DisableSMAP (); if ((CHAR8 *)UserRsp->Arguments[4] != NULL) { gCpu->GetMemoryAttributes (gCpu, (EFI_PHYSICAL_ADDRESS)UserRsp->Arguments[4], &Attributes); ASSERT ((Attributes & EFI_MEMORY_USER) != 0); @@ -1273,6 +1276,7 @@ CallBootService ( return EFI_OUT_OF_RESOURCES; } } + EnableSMAP (); Unicode->StrToFat ( Unicode,