MinPlatformPkg/TestPointCheckLib: Fix DMAR structure length calculation
REF:https://bugzilla.tianocore.org/show_bug.cgi?id=3768 When processing DMAR structures of type EFI_ACPI_DMAR_STRUCTURE_HEADER within the ACPI DMAR table, the code determines the structure length by subtracting the DMAR structure headers present from the overall DMAR ACPI table size. The terminating condition is that the remaining total DMAR length is greater than zero. However, the current DMAR structure length is subtracted after the DMAR structure pointer has already been assigned to the next structure. This change subtracts the current DMAR structure length before transitioning to the next structure. The terminating condition is also updated to ensure the remaining size is at least as large as the expected structure header size. Cc: Chasel Chiu <chasel.chiu@intel.com> Cc: Nate DeSimone <nathaniel.l.desimone@intel.com> Cc: Liming Gao <gaoliming@byosoft.com.cn> Cc: Eric Dong <eric.dong@intel.com> Signed-off-by:Michael Kubacki <michael.kubacki@microsoft.com> Reviewed-by:
Nate DeSimone <nathaniel.l.desimone@intel.com>
Loading
Please register or sign in to comment