|
RDFU
1.0
|
Functions for IDT and GDT parsing. More...

Go to the source code of this file.
Classes | |
| struct | _gdt_type_text |
Macros | |
| #define | IDT_GET_BASE(IdtE) (UINT_ARCH)(IdtE->OffsetLow | (IdtE->OffsetHigh << 16)) |
Typedefs | |
| typedef struct _gdt_type_text | gdt_type_text |
Functions | |
| EFI_STATUS | DumpGDT (VOID) |
| idt_entry * | GetIdtEntry (ULONG IdtVectorNum) |
| EFI_STATUS | IdtHookInterrupt (C_PTR NewIntHandlerAddr, ULONG IdtVectorNum, C_PTR *OutOldIntAddr) |
| EFI_STATUS | IdtHookTest (VOID) |
| EFI_STATUS | DumpIDT (VOID) |
Variables | |
| const gdt_type_text | GdtTypeText [] |
Functions for IDT and GDT parsing.
Definition in file IdtGdt.c.
| #define IDT_GET_BASE | ( | IdtE | ) | (UINT_ARCH)(IdtE->OffsetLow | (IdtE->OffsetHigh << 16)) |
Definition at line 118 of file IdtGdt.c.
Referenced by DumpIDT(), and IdtHookInterrupt().
| typedef struct _gdt_type_text gdt_type_text |
| EFI_STATUS DumpGDT | ( | VOID | ) |
Functions dump the GDT. (even on x64 efi platform the GDT entries are not extended - meaning the GDT format stays the same)
| EFI_SUCCESS |
Definition at line 56 of file IdtGdt.c.
References ASMGetGdtBase(), ASMGetGdtLimit(), _gdt_entry::Base0, _gdt_entry::Base1, _gdt_entry::Base2, _gdt_entry::DPL, _gdt_entry::LimitHigh, _gdt_entry::LimitLow, LogFullAscii(), _gdt_entry::Present, _gdt_entry::s, _gdt_entry::System, and _gdt_entry::Type.
Referenced by DrawBoxAndMenu(), ProcessCommand(), and TestDumpHandles().


| EFI_STATUS DumpIDT | ( | VOID | ) |
Functions dump the IDT. This function works with both x86 and x64. (on x64 the idt base calulation algo changes)
| EFI_SUCCESS |
Definition at line 191 of file IdtGdt.c.
References ASMGetIdtBase(), ASMGetIdtLimit(), idt_entry::Dpl, IDT_GET_BASE, LogFullAscii(), idt_entry::Present, idt_entry::SegmentSelector, and idt_entry::Type.
Referenced by DrawBoxAndMenu(), ProcessCommand(), and TestDumpHandles().


Returns IDT entry for selected entry.
| IdtVectorNum | index of wanted entry |
| ptr | to idt_entry |
Definition at line 106 of file IdtGdt.c.
References ASMGetIdtBase().
Referenced by IdtHookInterrupt().


| EFI_STATUS IdtHookInterrupt | ( | C_PTR | NewIntHandlerAddr, |
| ULONG | IdtVectorNum, | ||
| C_PTR * | OutOldIntAddr | ||
| ) |
Function hooks selected IDT entry (vector) and points it to the NewIntHandlerAddr (supplied by the requestor).
| NewIntHandlerAddr | New interrupt vector handler |
| IdtVectorNum | Specified vector number |
| OutOldIntAddr | Pointer to variable which will hold the old interrupt vector handler |
| EFI_SUCCESS | On success |
| EFI_ERROR* | On error |
Definition at line 137 of file IdtGdt.c.
References GetIdtEntry(), IDT_GET_BASE, LogFullAscii(), idt_entry::OffsetHigh, and idt_entry::OffsetLow.
Referenced by IdtHookTest().


| EFI_STATUS IdtHookTest | ( | VOID | ) |
Definition at line 171 of file IdtGdt.c.
References ASMDbgBreak(), IdtHookInterrupt(), and Int03Handler().

| const gdt_type_text GdtTypeText[] |
Ascii GDT entry type values.