X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FLibrary%2FMpInitLib%2FDxeMpLib.c;fp=UefiCpuPkg%2FLibrary%2FMpInitLib%2FDxeMpLib.c;h=b2307cbb618db18205b9d065694a4630f8d74494;hp=c17daa0fc0da7d59f373b440b351e685578e0c3b;hb=37fba7c2762e114a280e3b361b53ded034aac7e3;hpb=61a62fc2587ae4d01718124f28e1ea0e60375902 diff --git a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c index c17daa0fc0..b2307cbb61 100644 --- a/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c +++ b/UefiCpuPkg/Library/MpInitLib/DxeMpLib.c @@ -236,7 +236,6 @@ GetProtectedModeCS ( UINTN GdtEntryCount; UINT16 Index; - Index = (UINT16) -1; AsmReadGdtr (&GdtrDesc); GdtEntryCount = (GdtrDesc.Limit + 1) / sizeof (IA32_SEGMENT_DESCRIPTOR); GdtEntry = (IA32_SEGMENT_DESCRIPTOR *) GdtrDesc.Base; @@ -248,7 +247,7 @@ GetProtectedModeCS ( } GdtEntry++; } - ASSERT (Index != -1); + ASSERT (Index != GdtEntryCount); return Index * 8; }