I'm starting developing a device driver, and have some questions:

1. How can I get address from which IRQ was invoked??
2. If I know such address, how can I get binary file (process id or
something which helps me to identify binary file)which was mapped for
this particular address??

Best
Darek

Re: IRQ, device driver development. by Maxim

Maxim
Wed Feb 09 06:26:06 CST 2005

> 1. How can I get address from which IRQ was invoked??

I think you cannot. Device drivers just do not need this.

--
Maxim Shatskih, Windows DDK MVP
StorageCraft Corporation
maxim@storagecraft.com
http://www.storagecraft.com



Re: IRQ, device driver development. by Tim

Tim
Thu Feb 10 21:11:59 CST 2005

void <chq_wp_pl@nie.spamuj.pl> wrote:
>
>I'm starting developing a device driver, and have some questions:
>
>1. How can I get address from which IRQ was invoked??

What do you mean by that? An IRQ is a hardware event. It isn't related to
a software program. Whatever program was running gets put on hold while
the operating system handles the interrupt, but the app didn't have
anything to do with generating the interrupt.
--
- Tim Roberts, timr@probo.com
Providenza & Boekelheide, Inc

Re: IRQ, device driver development. by void

void
Mon Feb 14 04:37:40 CST 2005

Tim Roberts wrote:

>
> What do you mean by that? An IRQ is a hardware event. It isn't related to
> a software program. Whatever program was running gets put on hold while
> the operating system handles the interrupt, but the app didn't have
> anything to do with generating the interrupt.

Yes I know that, but I'm trying to develop something like Intel vtune
profiler or oprofile module for linuxes(but on Windows XP/2000). It is
my graduate project. Some machines have local apic enabled and some
don't, so my idea is to use timer interrupts to generate events(when
apic is not enabled, local apic have to be enabled when we want to
generate interrupts for some kind of events e.g. cache missing and so),
get address where interrupts occurs, translate it to user space if it
occured in user space. I know that in assembly language I could use EIP
register which is pushed on stack when interrupt occurs, but my
interrupt handler is invoked by system so pushed EIP has invalid value.
So is there a function, a standard way(without reverse engineering) to
know where interrupt occured in WDM drivers??

Best
Darek
P.S. More, see internal docs for details
http://oprofile.sourceforge.net/ I'd like to develop something like this
but on Windows XP/2000.

Re: IRQ, device driver development. by Don

Don
Mon Feb 14 07:52:02 CST 2005

Have you thought about using the Execituon Profilling Native API's? They
are not documented officially, but the data is out there, look for
ZwCreateProfile, ZwSetIntervalProfile, ZwStartProfile,
and ZwStopProfile. They are a heck of a lot safer than what you are trying
to do!


--
Don Burn (MVP, Windows DDK)
Windows 2k/XP/2k3 Filesystem and Driver Consulting
Remove StopSpam from the email to reply




"void" <chq_wp_pl@nie.spamuj.pl> wrote in message
news:cupuf0$3jq$1@inews.gazeta.pl...
> Tim Roberts wrote:
>
>>
>> What do you mean by that? An IRQ is a hardware event. It isn't related
>> to
>> a software program. Whatever program was running gets put on hold while
>> the operating system handles the interrupt, but the app didn't have
>> anything to do with generating the interrupt.
>
> Yes I know that, but I'm trying to develop something like Intel vtune
> profiler or oprofile module for linuxes(but on Windows XP/2000). It is my
> graduate project. Some machines have local apic enabled and some don't, so
> my idea is to use timer interrupts to generate events(when apic is not
> enabled, local apic have to be enabled when we want to generate interrupts
> for some kind of events e.g. cache missing and so), get address where
> interrupts occurs, translate it to user space if it occured in user space.
> I know that in assembly language I could use EIP register which is pushed
> on stack when interrupt occurs, but my interrupt handler is invoked by
> system so pushed EIP has invalid value. So is there a function, a standard
> way(without reverse engineering) to know where interrupt occured in WDM
> drivers??
>
> Best
> Darek
> P.S. More, see internal docs for details http://oprofile.sourceforge.net/
> I'd like to develop something like this but on Windows XP/2000.