I also checked for loaded symbols with: !lmi
It seams that Wdf01000.pdb symbols are loaded.
kd> !lmi wdf01000
Loaded Module Info: [wdf01000]
(…)
Symbol Type: PDB - Symbols loaded successfully from symbol server.
c:\symbols\Wdf01000.pdb\FABEC58794454D0D9B539B58E2D0A0922\Wdf01000.pdb
Load Report: public symbols , not source indexed
(…)
It also seams that my driver symbols are also loaded. However the output of
the lmi is different in the remote computer and in the local computer.
For the touchpad.sys driver in the local computer:
0: kd> !lmi touchpad
Loaded Module Info: [touchpad]
(…)
Image Type: MEMORY - Image read successfully from loaded memory.
Symbol Type: NONE - No error - symbol load deferred from symbol
server.
Load Report: no symbols loaded
It says that symbols are not loaded.
However in the local computer I can get the logdump with:
0: kd> !wdflogdump touchpad
(…)There are 74 log entries
— start of log —
111: FxPkgPnp::PowerEnterNewState - WDFDEVICE 0x0000057FFA4A0948 !devobj
0xFFFFFA8005AD9790 entering Power State WdfDevStatePowerWakingDmaEnable
from (…)
In the remote computer !lmi touchpad tells me the symbols are loaded but I
can not get the logdump giving the error mentioned in my previous email.
Here is the output of lmi touchpad in the remote computer:
kd> !lmi touchpad
Loaded Module Info: [touchpad]
Image Type: MEMORY - Image read successfully from loaded memory.
Symbol Type: PDB - Symbols loaded successfully from image header.
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\touchpad.pdb\699AE22C7EAE49DA9DE2C12270434A421\touchpad.pdb
Compiler: C - front end [17.0 bld 60315] - back end [17.0 bld 60315]
Load Report: private symbols & lines, not source indexed
C:\Program Files (x86)\Windows
Kits\8.0\Debuggers\x64\sym\touchpad.pdb\699AE22C7EAE49DA9DE2C12270434A421\touchpad.pdb
0: kd> !wdflogdump touchpad
On 7 July 2013 19:29, Helder Daniel wrote:
> OK I did it but the log is still inaccessible. I check if the driver is
> loaded with:
> !wdfkd.wdfldr
> (…)
> ImageName Ver WdfGlobals FxGlobals
> ImageAddress ImageSize
> rtc.sys v0.0 0xfffffa801925dea0 0xfffffa801925dd20
> 0xfffff88005fcb000 0x0000b000
> peauth.sys v0.0
>
> It seams to be.
> Previously I was using livekd on a single computer. Now I am using two
> computers The local computer runs the debugger and the remote computer is
> where the driver is being installed.
>
> Maybe there is a problem with symbols path but I can not find what it is.
> I check your blog at:
>
> http://blogs.msdn.com/b/doronh/archive/2006/07/31/684531.aspx#step1
>
> but it seams to be for a different version. I am using WDK 8 on Windows 8.
>
> When I try to dump the log it says:
>
> kd> !wdfkd.wdflogdump rtc
> Trace searchpath is:
>
> Trace format prefix is: %7!u!: %!FUNC! -
> Trying to extract TMF information from -
> c:\symbols\Wdf01000.pdb\FABEC58794454D0D9B539B58E2D0A0922\Wdf01000.pdb
> Log at fffffa801aad35e0
> Gather log: Please wait, this may take a moment (reading 68635 bytes).
> % read so far …
> warn: The log could not be accessed
> hint: Are the symbols the WDF library available?
> hint: The log is inaccessable after driver unload.
>
> It says it is trying to extract TMF info from:
> c:\symbols\Wdf01000.pdb\FABEC58794454D0D9B539B58E2D0A0922\Wdf01000.pdb
>
> I checked and the file exists on the local computer.
> Also .chain finds wdfkd DLL:
>
> .chain
> (…)
>
> Extension DLL chain:
> C:\Program Files (x86)\Windows Kits\8.0\Debuggers\x64\winext\wdfkd:
> image 6.2.9200.16384, API 1.0.0, built Thu Jul 26 02:53:41 2012
> [path: C:\Program Files (x86)\Windows
> Kits\8.0\Debuggers\x64\winext\wdfkd.dll]
> (…)
>
>
> Maybe it is not finding the driver symbols (rtc.pdb).
> I have it in the build directory of the driver package of local computer:
>
> \rtc\x64\Win8Debug\rtc.pdb
>
> And I copy this folder to the remote computer from where driver is
> installed.
>
> Maybe there is a way to set the search symbol path for this directory?
> However when it breaks WinDbg shows the code of the driver at the
> breakpoint (from the local computer):
>
> (…)
> KdPrint ((“–> EvtDeviceD0Exit - moving to %s\n”,
> DbgDevicePowerString(targetState)));
> KdBreakPoint();
> deviceContext = DeviceGetContext(device);
> (…)
>
>
>
>
>
> On 7 July 2013 15:01, Doron Holan wrote:
>
>> Run wdflogdump on the rtc driver while it is still loaded, so put a bp
>> on d0exit() and run it then
>>
>>
>> d
>>
>> Bent from my Phone
>> ------------------------------
>> From: Helder Daniel
>> Sent: 7/7/2013 8:34 AM
>>
>> To: Windows System Software Devs Interest List
>> Subject: Re: [ntdev] Issue interrupt from kernel space on x64 Windows
>>
>> On 7 July 2013 12:43, Doron Holan wrote:
>>
>>> Are you creating a WDFINTERRUPT and have an assigned interrupt
>>> resource?
>>>
>> That could cause the power up path to fail. Run
>>>
>>
>> The interrupt IRQ8 was assigned to the windows rtc/cmos driver.
>> But I update it with my driver and rebooted as windows asked so I assume
>> that after reboot IRQ8 is assigned to my driver only.
>> (I did the same for the touchpad an it worked).
>> In device manager listing resources by type it shows IRQ 8 assigned to my
>> driver.
>>
>> Running !wdfkd.wdflogdump rtc (rtc driver) it gives me an error.
>> But ruuning !wdfkd.wdflogdump touchpad (touchpad driver) it gives me a
>> trace list which seams ok.
>> Vlow are the output for both drivers:
>>
>> 1) RTC
>> 0: kd> !wdfkd.wdflogdump rtc
>> warning: could not retreive framework image for client driver rtc
>> Trace searchpath is:
>>
>> Trace format prefix is: %7!u!: %!FUNC! -
>> warning: could not retreive framework image for client driver rtc
>> hint: Are symbols available for this driver?
>> hint: Did you exclude the .sys extension in the drivername parameter?
>>
>> Could not find rtc in wdfldr client list
>>
>>
>>
>> 2) TOUCHPAD
>>
>> 0: kd> !wdfkd.wdflogdump touchpad
>> Trace searchpath is:
>>
>> Trace format prefix is: %7!u!: %!FUNC! -
>> Trying to extract TMF information from -
>> c:\symbols\Wdf01000.pdb\8F5E6B80E9924A2A8568FF5016979B7A2\Wdf01000.pdb
>> Log at fffffa800957e000
>> Gather log: Please wait, this may take a moment (reading 4024 bytes).
>> % read so far … 10, 20, 30, 100
>> There are 29 log entries
>> — start of log —
>> 1: FxIFRStart - FxIFR logging started
>> 2: FxPkgPnp::PnpEnterNewState - WDFDEVICE 0x0000057FFB591B48 !devobj
>>
> (…)
>
>>
>>
>>
>>
>>
>> Run !wdfkd.wdflogdump (your driver name)
>>>
>>> With correct symbols for ntos, wdf and your driver. You may need to set
>>> the tmf file path as well. That should tell you where the failure is coming
>>> from
>>>
>>> d
>>>
>>> Bent from my Phone
>>> ------------------------------
>>> From: Helder Daniel
>>> Sent: 7/7/2013 5:04 AM
>>>
>>> To: Windows System Software Devs Interest List
>>> Subject: Re: [ntdev] Issue interrupt from kernel space on x64 Windows
>>>
>>> On 5 July 2013 17:29, Doron Holan wrote:
>>>
>>>> If you want your ps2 driver to report input, you might as well just use
>>>> the pnpi8042 sample from the vista wdk. It is a lot work to get to that
>>>> point and you will have rewritten the existing sample
>>>>
>>>
>>> I tried to find the vista wdk download but I only find wdk 7 and wdk
>>> 8. I think the vista wdk is version 6 however in my searches I did not find
>>> it. I am continuing to search.
>>>
>>> This means EvtDeviceD0Exit returned failure. Did you trace what you
>>>> returned from this function?
>>>>
>>>
>>> it is returning STATUS_SUCCESS, the code is:
>>>
>>> NTSTATUS rtcEvtDeviceD0Exit(IN WDFDEVICE device, IN
>>> WDF_POWER_DEVICE_STATE targetState) {
>>>
>>> KdPrint ((“–> EvtDeviceD0Exit - moving to %s\n”,
>>> DbgDevicePowerString(targetState)));
>>> //Needed hardware power down here?
>>> KdPrint (( “<– EvtDeviceD0Exit\n”));
>>>
>>> return STATUS_SUCCESS;
>>> }
>>>
>>> When trying to install the driver for the RTC the sequence of call
>>> backs is this:
>>>
>>> <– EvtDevicePrepareHardware
>>> –> EvtDeviceD0Entry - comming from WdfPowerDeviceD3Final
>>> <– EvtDeviceD0Entry
>>> –> EvtDeviceD0Exit - moving to WdfPowerDeviceD3Final
>>> <– EvtDeviceD0Exit
>>> –> EvtDeviceReleaseHardware
>>>
>>> The question is why it runs EvtDeviceD0Exit immediatly after
>>> EvtDeviceD0Entry.
>>> When installing the driver for the touchpad device the call backs are:
>>>
>>> <– EvtDevicePrepareHardware
>>> –> EvtDeviceD0Entry - comming from WdfPowerDeviceD3Final
>>> <– EvtDeviceD0Entry
>>>
>>> and then go into EvtInterruptEnabled and the driver is installed.
>>> Only when uninstalling runs:
>>>
>>> –> EvtDeviceD0Exit - moving to WdfPowerDeviceD3Final
>>> <– EvtDeviceD0Exit
>>> –> EvtDeviceReleaseHardware
>>>
>>> So it seams that for the RTC after trying to install it goes to the
>>> uninstall sequence(or power down).
>>> Maybe there is need to power up the RTC hardware somehow and for the
>>> touchpad it is not required. The touchpad hardware is ps2 i8042. And the
>>> keyboard used is also a ps/2. So maybe the prt8042 driver inits the
>>> hardware when installing the keyboard driver and in the touchpad case the
>>> hardware is already power up.
>>> But in the case of the RTC maybe it is necessary some code to power it
>>> up?
>>> The code of rtcEvtDeviceD0Entry is:
>>>
>>> NTSTATUS rtcEvtDeviceD0Entry(IN WDFDEVICE device, IN
>>> WDF_POWER_DEVICE_STATE previousState) {
>>> KdPrint ((" –> EvtDeviceD0Entry - comming from %s\n",
>>> DbgDevicePowerString(previousState)));
>>> //Needed hardware power up here?
>>> KdPrint ((“<–EvtDeviceD0Entry\n”));
>>> return STATUS_SUCCESS;
>>> }
>>>
>>>
>>>
>>>
>>>> d
>>>>
>>>> Bent from my Phone
>>>> ------------------------------
>>>> From: Helder Daniel
>>>> Sent: 7/5/2013 12:04 PM
>>>>
>>>> To: Windows System Software Devs Interest List
>>>> Subject: Re: [ntdev] Issue interrupt from kernel space on x64 Windows
>>>>
>>>> While I am following your notes to implement a touchpad driver (I
>>>> need to find a way to pass info to the system yet, maybe an HID driver do
>>>> the trick. I am looking at it), I also tried to implement an RTC alarm
>>>> driver as well (It was my original goal).
>>>>
>>>> The driver code is essential the same I used for mouse (without the
>>>> mouse hardware init part in EvtInterruptEnable() ).
>>>> I also changed on the inf file the hardware ID to match the RTC/CMOS.
>>>>
>>>> When installing the driver (it is needed to update the cmos/RTC
>>>> driver) a reboot is required to complete install. After reboot the device
>>>> does not work properly:
>>>> In device manager going to the device -> properties it shows in the
>>>> general TAB an error:
>>>>
>>>> This device cannot start. (Code 10)
>>>>
>>>> STATUS_DEVICE_POWER_FAILURE
>>>>
>>>> Tracing the callbacks after EvtDevicePrepareHardware it runs
>>>> EvtDeviceD0Entry and immediatly runs EvtDeviceD0Exit and
>>>> EvtDeviceReleaseHardware.
>>>>
>>>> So it does not start the device properly.
>>>>
>>>>