Ring3: Refactoring.

This commit is contained in:
Mikhail Krichanov 2024-11-01 12:28:49 +03:00
parent 3dc02534db
commit 983649444e
2 changed files with 5 additions and 1 deletions
MdeModulePkg/Core/Dxe/Misc
MdePkg/Include/Library

View File

@ -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;

View File

@ -5683,6 +5683,7 @@ typedef struct {
UINT16 Reserved_98;
UINT16 T;
UINT16 IOMapBaseAddress;
UINT32 SSP;
} IA32_TASK_STATE_SEGMENT;
typedef union {