diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c index ce5cc87c62..1dc47f9d00 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryProtection.c @@ -99,6 +99,9 @@ SetUefiImageProtectionAttributes ( UEFI_IMAGE_RECORD_SEGMENT *ImageRecordSegment; UINTN SectionAddress; UINT32 Index; + UINT32 Attribute; + + Attribute = IsUser ? EFI_MEMORY_USER : 0; SectionAddress = ImageRecord->StartAddress; for (Index = 0; Index < ImageRecord->NumSegments; Index++) { @@ -106,7 +109,7 @@ SetUefiImageProtectionAttributes ( SetUefiImageMemoryAttributes ( SectionAddress, ImageRecordSegment->Size, - IsUser ? ImageRecordSegment->Attributes | (UINT32)EFI_MEMORY_USER : ImageRecordSegment->Attributes + ImageRecordSegment->Attributes | Attribute ); SectionAddress += ImageRecordSegment->Size; diff --git a/MdePkg/Include/Library/BaseLib.h b/MdePkg/Include/Library/BaseLib.h index ad2320a43c..739a2fc79d 100644 --- a/MdePkg/Include/Library/BaseLib.h +++ b/MdePkg/Include/Library/BaseLib.h @@ -5683,6 +5683,7 @@ typedef struct { UINT16 Reserved_98; UINT16 T; UINT16 IOMapBaseAddress; + UINT32 SSP; } IA32_TASK_STATE_SEGMENT; typedef union {