*pIoRegSel = 0x12;
ch = *pIoWin;
MmUnmapIoSpace(pAddr, 0x14);
return (int)ch;
}
/*
The PIIX3 decodes the 82093AA(IOAPIC) in memory space.
Memory Address: FEC0xy00h (xy=See APICBASE Register in the PIIX3)
Typically, IOREGSEL Register is at 00h and IOWIN Register is at 10h.
interl 82093AA has 24 I/O Redirection Table entry registers. IOREDTBL[0]-IOREDTBL[23]
Each register is a dedicated entry for each interrupt input.
IOREDTBL[1] is the entry for keyboard interrupt (IRQ1), which address offset is 12-13h.
Here IOWIN Register is used to read vector from the IOAPIC register(IOREDTBL[1])
specified by 0x12 which was written to the IOREGSEL Register.
Redirection table entries的低8位就是vector
*/
VOID OnUnload( IN PDRIVER_OBJECT DriverObject )
{
if (Sice_Protected==1) {
__asm cli
k->E9_BYTE=ss;
k->JMP_ADDR=tt;
__asm sti
DbgPrint("Anti_Softice end.");
};
DbgPrint("Welcome! by 天易love 2010-1-10");
}
NTSTATUS DriverEntry( IN PDRIVER_OBJECT theDriverObject, IN PUNICODE_STRING theRegistryPath )
{
IDTINFO idt_info;
IDTENTRY* idt_entries;
unsigned long addr;
unsigned long* addr1;
unsigned char* ch;