\r
Status = EFI_SUCCESS;\r
\r
- if (!FeaturePcdGet (PcdNtEmulatorEnable)) {\r
- if (CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc, sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) {\r
+ if (CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc, sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) {\r
+ //\r
+ // we've already installed to this vector\r
+ //\r
+ if (NewCallback != NULL) {\r
//\r
- // we've already installed to this vector\r
+ // if the input handler is non-null, error\r
//\r
- if (NewCallback != NULL) {\r
- //\r
- // if the input handler is non-null, error\r
- //\r
- Status = EFI_ALREADY_STARTED;\r
- } else {\r
- UnhookEntry (ExceptionType);\r
- }\r
+ Status = EFI_ALREADY_STARTED;\r
} else {\r
+ UnhookEntry (ExceptionType);\r
+ }\r
+ } else {\r
+ //\r
+ // no user handler installed on this vector\r
+ //\r
+ if (NewCallback == NULL) {\r
//\r
- // no user handler installed on this vector\r
+ // if the input handler is null, error\r
//\r
- if (NewCallback == NULL) {\r
- //\r
- // if the input handler is null, error\r
- //\r
- Status = EFI_INVALID_PARAMETER;\r
- } else {\r
- HookEntry (ExceptionType, NewCallback);\r
- }\r
+ Status = EFI_INVALID_PARAMETER;\r
+ } else {\r
+ HookEntry (ExceptionType, NewCallback);\r
}\r
}\r
\r