11IA32_IDT_GATE_DESCRIPTOR NullDesc = {
25 IN IA32_IDT_GATE_DESCRIPTOR *IdtGateDescriptor
28 UINTN InterruptHandle;
34 ((UINT16 *)&InterruptHandle)[0] = (UINT16)IdtGateDescriptor->Bits.OffsetLow;
35 ((UINT16 *)&InterruptHandle)[1] = (UINT16)IdtGateDescriptor->Bits.OffsetHigh;
37 return InterruptHandle;
77 StubCopy[0x0c] = (UINT8)ExceptionType;
82 *(UINT32 *)&StubCopy[0x0e] = (UINT32)
CommonIdtEntry - (UINT32)&StubCopy[StubSize];
106 CALLBACK_FUNC NewCallback,
114 if (
CompareMem (&IdtEntryTable[ExceptionType].NewDesc, &NullDesc,
sizeof (IA32_IDT_GATE_DESCRIPTOR)) != 0) {
118 if (NewCallback !=
NULL) {
122 Status = EFI_ALREADY_STARTED;
130 if (NewCallback ==
NULL) {
134 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 *IdtGateDescriptor)
VOID CreateEntryStub(IN EFI_EXCEPTION_TYPE ExceptionType, OUT VOID **Stub)