> @@ -290,7 +291,8 @@ PageTableLibMapInLevel ( > IN UINT64 Length, > IN UINT64 Offset, > IN IA32_MAP_ATTRIBUTE *Attribute, > - IN IA32_MAP_ATTRIBUTE *Mask > + IN IA32_MAP_ATTRIBUTE *Mask, > + OUT BOOLEAN *IsModified > ) > { > RETURN_STATUS Status; > @@ -316,6 +318,8 @@ PageTableLibMapInLevel ( > IA32_MAP_ATTRIBUTE LocalParentAttribute; > UINT64 PhysicalAddrInEntry; > UINT64 PhysicalAddrInAttr; > + IA32_PAGING_ENTRY OriginalParentPagingEntry; > + IA32_PAGING_ENTRY OriginalCurrentPagingEntry; > > ASSERT (Level != 0); > ASSERT ((Attribute != NULL) && (Mask != NULL)); > @@ -328,8 +332,9 @@ PageTableLibMapInLevel ( > NopAttribute.Bits.ReadWrite = 1; > NopAttribute.Bits.UserSupervisor = 1; > > - LocalParentAttribute.Uint64 = ParentAttribute->Uint64; > - ParentAttribute = &LocalParentAttribute; > + LocalParentAttribute.Uint64 = ParentAttribute->Uint64; > + ParentAttribute = &LocalParentAttribute; > + OriginalParentPagingEntry.Uint64 = ParentPagingEntry->Uint64;
1. can you add a blank line before "OriginalParentPagingEntry" assignment? This helps to tell that the new added line has nothing to do with the original two lines code that changes "ParentAttribute". > > + if (IsModified != NULL) { > + *IsModified = FALSE; > + } 2. can you use code as below? If (IsModified == NULL) { IsModified = LocalIsModified; } Then all code can just change "*IsModified" without checking if it's NULL. -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101682): https://edk2.groups.io/g/devel/message/101682 Mute This Topic: https://groups.io/mt/97796390/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-