X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=MdeModulePkg%2FUniversal%2FDebugSupportDxe%2FIa32%2FPlDebugSupportIa32.c;fp=MdeModulePkg%2FUniversal%2FDebugSupportDxe%2FIa32%2FPlDebugSupportIa32.c;h=b7c182f5808d43b7a6f7817def1af9fe32e4effe;hp=290fea69d5c12c9f50d809a3c3d26a1fec4f657c;hb=ea2d90867ac938e89c4bae0d1c7308940af00784;hpb=7ee40c6e7938be4d4f54d8e5433787ea01b30742 diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c index 290fea69d5..b7c182f580 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupportIa32.c @@ -115,31 +115,29 @@ ManageIdtEntryTable ( Status = EFI_SUCCESS; - if (!FeaturePcdGet (PcdNtEmulatorEnable)) { - if (CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc, sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) { + if (CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc, sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) { + // + // we've already installed to this vector + // + if (NewCallback != NULL) { // - // we've already installed to this vector + // if the input handler is non-null, error // - if (NewCallback != NULL) { - // - // if the input handler is non-null, error - // - Status = EFI_ALREADY_STARTED; - } else { - UnhookEntry (ExceptionType); - } + Status = EFI_ALREADY_STARTED; } else { + UnhookEntry (ExceptionType); + } + } else { + // + // no user handler installed on this vector + // + if (NewCallback == NULL) { // - // no user handler installed on this vector + // if the input handler is null, error // - if (NewCallback == NULL) { - // - // if the input handler is null, error - // - Status = EFI_INVALID_PARAMETER; - } else { - HookEntry (ExceptionType, NewCallback); - } + Status = EFI_INVALID_PARAMETER; + } else { + HookEntry (ExceptionType, NewCallback); } }