void _cplb_miss_all_locked(void) { interrupt_info iinfo[1]; get_interrupt_info(ik_exception, iinfo); _ex_report_event(iinfo); _Exit(); /* NOTREACHED */ }
void _cplb_miss_without_replacement(void) { interrupt_info iinfo[1]; get_interrupt_info(ik_exception, iinfo); _ex_report_event(iinfo); _Exit(); /* NOTREACHED */ }
NTSTATUS onClose(PDEVICE_OBJECT device_object, PIRP irp) { /* Would hold the return code of the function */ NTSTATUS return_ntstatus = STATUS_SUCCESS; UNREFERENCED_PARAMETER(device_object); UNREFERENCED_PARAMETER(irp); PAGED_CODE(); KdPrint(( "Oregano: on_close: Start\r\n" )); /* Stop any active trace */ stopTracing(); /* Unhook poor trap interrupt, if needed to... */ if( 0 != orgTrapInterrupt ) { /* Would hold the current IDT address */ idt_t idt = {0}; /* Would hold int1 info, original and new one */ interrupt_info_t int1_info = {0}; /* Used only for setting the int address in the int1 info structure */ MACHINE_LONG trap_interrupt_address = 0; KdPrint(( "Oregano: on_close: Unhooking trap interrupt\r\n" )); /* First get the idt address */ #ifndef AMD64 load_idt( &idt ); #else loadIdt64( &idt ); #endif /* Get the current int1 function */ get_interrupt_info( &idt, 1, &int1_info ); /* Set back the old int1 */ #ifdef i386 trap_interrupt_address = (MACHINE_LONG)orgTrapInterrupt; int1_info.low_offset = (unsigned short)trap_interrupt_address; trap_interrupt_address >>= 16; int1_info.high_offset = (unsigned short)trap_interrupt_address; #elif AMD64 trap_interrupt_address = (MACHINE_LONG)orgTrapInterrupt; int1_info.low_offset = (unsigned short)trap_interrupt_address; trap_interrupt_address >>= 16; int1_info.middle_offset = (unsigned short)trap_interrupt_address; trap_interrupt_address >>= 16; int1_info.high_offset = (unsigned long)trap_interrupt_address; #endif hookAllCPUs( 1, &int1_info ); orgTrapInterrupt = NULL; KdPrint(( "Oregano: on_close: Unhook done.\r\n" )); }