]> git.proxmox.com Git - mirror_edk2.git/blobdiff - UefiCpuPkg/Library/MpInitLib/DxeMpLib.c
UefiCpuPkg/MpInitLib: Fix ASSERT for success.
[mirror_edk2.git] / UefiCpuPkg / Library / MpInitLib / DxeMpLib.c
index c17daa0fc0da7d59f373b440b351e685578e0c3b..b2307cbb618db18205b9d065694a4630f8d74494 100644 (file)
@@ -236,7 +236,6 @@ GetProtectedModeCS (
   UINTN                    GdtEntryCount;\r
   UINT16                   Index;\r
 \r
-  Index = (UINT16) -1;\r
   AsmReadGdtr (&GdtrDesc);\r
   GdtEntryCount = (GdtrDesc.Limit + 1) / sizeof (IA32_SEGMENT_DESCRIPTOR);\r
   GdtEntry = (IA32_SEGMENT_DESCRIPTOR *) GdtrDesc.Base;\r
@@ -248,7 +247,7 @@ GetProtectedModeCS (
     }\r
     GdtEntry++;\r
   }\r
-  ASSERT (Index != -1);\r
+  ASSERT (Index != GdtEntryCount);\r
   return Index * 8;\r
 }\r
 \r