It’s not nearly that simple. NT drivers are written in a way that allows
them to be compiled for different processor architectures. As such, the ISR
must be defined in a way that works cross-platform, which means that the
driver’s ISR isn’t actually what gets put into the IDT, which is definitely
not a cross-platform data structure. You won’t find a routine within i8042
in the IDT.
I know it looks like you did because !idt printed it out that way. When I
wrote !idt, I decided to make it simplify things and just print out the
driver’s routine, not the actual ISR from the IDT.
Furthermore, on machines with APICs, the IDT entry occupied by a particular
driver’s ISR is fairly random, tied mostly to driver load order. (Believe
me. I wrote the code.) It’s a little less random in Longhorn, but it’s
still non-deterministic. If somebody inserts another driver into the
system, your IDT entry can easily change at next boot.
You’re fighting a losing battle. There is no way, documented or not, to
ensure that you will always be able to guarantee the things that you’re
trying to guarantee.
–
Jake Oshins
Windows Kernel Group
This posting is provided “AS IS” with no warranties, and confers no rights.
“Raja Reddy” wrote in message news:xxxxx@ntdev…
I can check whether the ISR,address, found in the IDT entry, is part of the
i8024prt.sys adress space or not.
Eventhough I can’t replace, I can detect atleast. If we know how to find a
particular IRQ’s entry in IDT, we can hook the kernel for fun.
Thanks,
&Raj.
Doron Holan wrote:
What makes you think you can figure out the original entry? What if they are
already replaced when you are loaded?
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Raja Reddy
Sent: Tuesday, August 09, 2005 10:56 AM
To: Windows System Software Devs Interest List
Subject: RE: [ntdev] Keyboard IRQ & IDT mapping
Other drivers can replace the IDT entries. I want to keep checking whether
the ISR replaced or not. If replaced means, I want to replace with original
ISR.
I want to do this for keboard ISR and hard disk ISR and few more also. I
can’t do this by simply writing a keyboard upper filter driver. If it is
possible, let me know the way.
Thanks,
&Raj.
Doron Holan wrote:
Why do you need the IDT? If you need to hook the i8042prt ISR and do your
own processing, install yourself as a device upper filter on the keyboard
and respond to IOCTL_INTERNAL_I8042_HOOK_KEYBOARD and insert a callback into
the structure.
d
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of Raja Reddy
Sent: Tuesday, August 09, 2005 1:57 AM
To: Windows System Software Devs Interest List
Subject: [ntdev] Keyboard IRQ & IDT mapping
Hello,
In my driver, I need to get the address of ISR registered by i8042prt.sys(
or any keyboard device driver).
I checked through WinDbg and I found that, 0x93 index is using by keyboard
ISR.
I observed !opapic extension’s output also. It is givign the following info.
lkd> !ioapic
IoApic @ FEC00000 ID:2 (20) Arb:0
Inti00.: 000100ff Vec:FF FixedDel PhysDest:00 edg high masked
Inti01.: 00000993 Vec:93 LowestDl Lg:01000000 edg high
Inti02.: 000100ff Vec:FF FixedDel PhysDest:00 edg high masked
lkd> !idt
…
…
93: ff995dd4
(Vector:193,Irql:8,SyncIrql:9,Connected:TRUE,No:0,ShareVector:FALSE,Mode:Latched,ISR:i8042prt!I8042KeyboardInterruptService(f96684a2))
…
…
How can I get that IDT index value programatically on Multiprocessor &
Uniprocessor systems?
Please help me.
Thanks in Advance,
&Raj.
Keep Faith on the Supreme Lord Sri Sri Sri Krishna. He will take care of
you.
__________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com — Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256 You are currently subscribed to
ntdev as: xxxxx@windows.microsoft.com To unsubscribe send a blank email to
xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Keep Faith on the Supreme Lord Sri Sri Sri Krishna. He will take care of
you.
Start your day with Yahoo! - make it your home page — Questions? First
check the Kernel Driver FAQ at http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: xxxxx@windows.microsoft.com To
unsubscribe send a blank email to xxxxx@lists.osr.com
—
Questions? First check the Kernel Driver FAQ at
http://www.osronline.com/article.cfm?id=256
You are currently subscribed to ntdev as: unknown lmsubst tag argument: ‘’
To unsubscribe send a blank email to xxxxx@lists.osr.com
Keep Faith on the Supreme Lord Sri Sri Sri Krishna. He will take care of
you.
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com