Using a host PC running Windbg connected to a Target PC via RS232 I want to get number of interrupts occured in the target PC from all possible sources.
This is likely a scenario where you’d receive better feedback if you were to start off with sharing what you’re actually trying to accomplish. You *think* you need to know interrupt count, but that may not be the right direction to go.
If you simply want to analyze interrupt rate of a CPU you can use the built-in Performance Monitor.
Run perfmon.exe, add a counter, select interrupts/sec under the Processor category and select which processor you want to monitor.
you could so something like this you can employ -x switch to .shell
for an independent shell
lkd> .shell typeperf "\processor(0)\Interrupts/sec
<.shell waiting 1 second(s) for process>
“(PDH-CSV 4.0)”,“\xxxxxxx\processor(0)\Interrupts/sec”<.shell waiting
1 second(s) for process>
“06/10/2015 13:07:23.718”,“1073.026619”<.shell waiting 1 second(s) for process>
“06/10/2015 13:07:24.734”,“1106.985580”<.shell waiting 1 second(s) for process>
“06/10/2015 13:07:25.734”,“1118.187933”<.shell waiting 1 second(s) for process>
“06/10/2015 13:07:26.734”,“1062.560832”<.shell waiting 1 second(s) for process>
“06/10/2015 13:07:27.750”,“1081.813188”<.shell waiting 1 second(s) for process>
Exiting please wait…
The command completed successfully.
.shell: Process exited
<.shell waiting 1 second(s) for process>
<.shell process may need input>Press ENTER to continue
On 6/9/15, xxxxx@hotmail.com wrote: > This is likely a scenario where you’d receive better feedback if you were to > start off with sharing what you’re actually trying to accomplish. You > think you need to know interrupt count, but that may not be the right > direction to go. > > If you simply want to analyze interrupt rate of a CPU you can use the > built-in Performance Monitor. > > Run perfmon.exe, add a counter, select interrupts/sec under the Processor > category and select which processor you want to monitor. > > — > NTDEV is sponsored by OSR > > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev > > OSR is HIRING!! See http://www.osr.com/careers > > For our schedule of WDF, WDM, debugging and other seminars visit: > http://www.osr.com/seminars > > To unsubscribe, visit the List Server section of OSR Online at > http://www.osronline.com/page.cfm?name=ListServer >
What I’m trying to do is wrong and ugly but it seems I do not have an alternative.
My FPGA is connected to the chipset via LPC bus.
The FPGA creates a SERIRQ interrupt (which is part of LPC) every TBD msec.
By using the vendor’s library I should get the vector of this interrupt from BIOS. But currently the vendor can not provide such library.
Can I get this information manually using kernel debugger ?
That depends. In a situation like that, the IRQ vector is often
declared in the ACPI DSDT. Assuming you are being loaded via ACPI, you
should be able to fetch that using the ACPI interfaces.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
Classic 16550 does not like to share its interrupt.
If you want to map your device on IRQ4 you have to disable it:
from bios
no serial driver should attach to that isr
On Fri, Jun 12, 2015 at 4:36 PM, Pavel A. wrote:
> Do you have a real COM1 in this system, or other device that > uses this IRQ? > > – pa > > > > On 12-Jun-2015 12:25, veredz72@ wrote: > >> Hi Tim, All, >> >> According to the BIOS, COM1 uses IRQ 4. >> In the target PC we do not need COM1. >> We can program the FPGA to use IRQ 4. >> >> How can we wait for IRQ 4 in a kernel driver ? >> We will probably have to write an upper driver for a driver supplied by >> Microsoft. >> Am I right ? >> >> Best regards, >> Z.V >> >> >> >> > > — > NTDEV is sponsored by OSR > > Visit the list at: http://www.osronline.com/showlists.cfm?list=ntdev > > OSR is HIRING!! See http://www.osr.com/careers > > For our schedule of WDF, WDM, debugging and other seminars visit: > http://www.osr.com/seminars > > To unsubscribe, visit the List Server section of OSR Online at > http://www.osronline.com/page.cfm?name=ListServer >
Where is Jake Oshins, Old School COM Port Guy when you need him?
mm
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Friday, June 12, 2015 10:05 AM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WinDbg: Getting number of interrupts from target PC
Hello Delmondo & Pavel. All,
I have a real COM1 which can be disabled in BIOS or in Windows device
manager.
I have a real COM1 which can be disabled in BIOS or in Windows device manager.
If this is the case, can I use IRQ 4 ? How ?
That clears the hardware hurdle, but it’s not quite that easy. In order
for you to claim IRQ 4 in your driver, some bus has to assign that
resource to you. That means you either need to modify the ACPI DSDT to
assign it to you or you need to declare it as a legacy in your INF.
–
Tim Roberts, xxxxx@probo.com
Providenza & Boekelheide, Inc.
I have a real COM1 which can be disabled in BIOS or in Windows device manager.
If this is the case, can I use IRQ 4 ? How ?
If you can disable the COM port in the BIOS, then maybe you can claim
this IRQ.
I haven’t tried this with PCI drivers though. If this would disturb the
PCI (or whatever) driver, maybe a second small “legacy” driver can
handle the IRQ for you.
Filter drivers don’t own interrupts. It sounds like a strange device that
only has an interrupt and no registers or other resources. Is this really a
device, or are you trying to grab a particular interrupt? If it is a
device, how do you stop it from interrupting, etc?
For a sample take something like the KMDF version of PCIDRV and then rip out
most of it.
-----Original Message-----
From: xxxxx@lists.osr.com
[mailto:xxxxx@lists.osr.com] On Behalf Of xxxxx@gmail.com
Sent: Sunday, June 14, 2015 1:53 PM
To: Windows System Software Devs Interest List
Subject: RE:[ntdev] WinDbg: Getting number of interrupts from target PC
Hi Pavel,
This small “legacy” driver is a filter for existing windows driver or an
independent one ?
Is there a similar driver in WinDDK\7600.16385.1\src ?
I’m looking for a sample for an ISA hardware that claims its resources in
the INF (in my case only IRQ).
This small “legacy” driver is a filter for existing windows driver or an independent one ?
Is there a similar driver in WinDDK\7600.16385.1\src ?
I’m looking for a sample for an ISA hardware that claims its resources in the INF (in my case only IRQ).
What I’m thinking about is an “independent” ISA-like driver, and this is
quite a hack. Not sure in which WDK such a sample was included,
for a good consultant this should be quicker to do than explain.
Then I installed the sys+inf using the device manger with: Add legacy hardware
The installation was OK. According to the device manager the driver’s resource is IRQ3.
There is also a message that:
Interrupt request 0x3 used by: ACPI x86-based PC
In PLxPrepareHardware I called to:
for (i=0; i < WdfCmResourceListGetCount(ResourcesTranslated); i++) {
desc = WdfCmResourceListGetDescriptor( ResourcesTranslated, i );
switch (desc->Type) {
case CmResourceTypeInterrupt: