The commit message is very detailed. But the function header comments are not. Can you please update the function header comments to add 4 lines of @retval RETURN_INVALID_PARAMETER, each line describes one invalid case.
It's ok to have multiple lines starting with @retval RETURN_INVALID_PARAMETER> > + // If (LinearAddress + Length - 1) is not in the same ParentPagingEntry > with (LinearAddress + Offset), then the remaining child PagingEntry > + // starting from PagingEntryIndex of ParentPagingEntry is all covered by > [LinearAddress + Offset, LinearAddress + Length - 1]. > + // > + PagingEntryIndexEnd = (BitFieldRead64 (LinearAddress + Length - 1, > BitStart + 9, 63) != BitFieldRead64 (LinearAddress + Offset, BitStart + 9, > 63)) ? > 511 : > + (UINTN)BitFieldRead64 (LinearAddress + Length - 1, > BitStart, > BitStart + 9 - 1); > + PagingEntry = (IA32_PAGING_ENTRY > *)(UINTN)IA32_PNLE_PAGE_TABLE_BASE_ADDRESS (&ParentPagingEntry- > >Pnle); > + for (Index = PagingEntryIndex; Index <= PagingEntryIndexEnd; Index++) { > + if (PagingEntry[Index].Pce.Present == 0) { > + // > + // [LinearAddress, LinearAddress + Length] contains non-present > range. > + // > + Status = IsAttributesAndMaskValidForNonPresentEntry (Attribute, > Mask); > + if (RETURN_ERROR (Status)) { > + return Status; > + } > + > + break; Why break out of the loop when meeting a non-present entry? -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#101675): https://edk2.groups.io/g/devel/message/101675 Mute This Topic: https://groups.io/mt/97796382/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-