11IA32_IDT_GATE_DESCRIPTOR NullDesc = {
25 IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDecriptor
28 UINTN InterruptHandle;
35 InterruptHandle = ((
UINTN)IdtGateDecriptor->Bits.OffsetLow) |
36 (((
UINTN)IdtGateDecriptor->Bits.OffsetHigh) << 16) |
37 (((
UINTN)IdtGateDecriptor->Bits.OffsetUpper) << 32);
39 return InterruptHandle;
77 StubCopy[0x1] = (UINT8)ExceptionType;
107 CALLBACK_FUNC NewCallback,
115 if (
CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc,
sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) {
119 if (NewCallback !=
NULL) {
123 Status = EFI_ALREADY_STARTED;
131 if (NewCallback ==
NULL) {
135 Status = EFI_INVALID_PARAMETER;
INTN EFIAPI CompareMem(IN CONST VOID *DestinationBuffer, IN CONST VOID *SourceBuffer, IN UINTN Length)
VOID HookEntry(IN EFI_EXCEPTION_TYPE ExceptionType, IN CALLBACK_FUNC NewCallback)
VOID CommonIdtEntry(VOID)
VOID UnhookEntry(IN EFI_EXCEPTION_TYPE ExceptionType)
EFI_STATUS ManageIdtEntryTable(CALLBACK_FUNC NewCallback, EFI_EXCEPTION_TYPE ExceptionType)
UINTN GetInterruptHandleFromIdt(IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDecriptor)
VOID CreateEntryStub(IN EFI_EXCEPTION_TYPE ExceptionType, OUT VOID **Stub)