Ring3: Refactoring.

This commit is contained in:
Mikhail Krichanov 2024-11-01 12:28:49 +03:00
parent 6b2c6059f8
commit 2621d0f05a
2 changed files with 5 additions and 1 deletions

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

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