Skip to content

Instantly share code, notes, and snippets.

View GwenNelson's full-sized avatar

Gwen Nelson GwenNelson

View GitHub Profile
@andreiw
andreiw / cgate.c
Created February 8, 2016 20:07
x64 override idt handlers in existing system (useful for UEFI)
void c_gate_entry(uint64_t *regs)
{
uint64_t gate = regs[15];
unsigned ix = 0;
uint64_t pc;
uint64_t sp;
uint64_t cr2;
warn("Gate = 0x%lx", gate);
warn("----------------------");