none
Why writing ACPI register failed in driver? RRS feed

  • Question

  • I wrote a driver and an application. The application sends IOCTL to the driver to ask the driver to write a value to a ACPI register(intel platform, the register is mapped to IO port: 0x0402), and the driver uses WRITE_PORT_USHORT to do the port writing. I use the popular tool RW.exe to monitor the register value changing.

    When I sent the writing command, the RW showed the register changed to my value at that moment, but immediately restored to its original value in a second.

    The OS is Windows 7 X64 and driver is built in WDK 7600.16385.0.

    I suspect Windows 7 has blocked the writing. But how should I do to accomplish this job. I use this method to implement the wakeup function from completely system power off. Furthermore, Windows must allow users to access hardware in some way when they need indeed.

    Can anybody help?

    Thanks a lot.

    Tuesday, December 18, 2012 3:46 AM

Answers

  • You can't touch HW resources you don't own. There is no way for you to synchronize with the owner, both with access and power state


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, December 20, 2012 7:01 AM

All replies

  • Is the resource assigned to your pnp device stack? If not, which device is the resource assigned to? You are not allowed to touch HW resources not assigned to your pnp device

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Tuesday, December 18, 2012 4:23 AM
  • I didn't assign the port to my device stack. My driver is a non-pnp driver not associating with any hardware. It's actually the sample driver "kmdf" in "ioctl" from WinDDK, I just add the WRITE_PORT_USHORT command to the driver src.

    If I assign the port 0x0402 through inf, the driver property reports the resource conflicts.

    Thursday, December 20, 2012 6:54 AM
  • You can't touch HW resources you don't own. There is no way for you to synchronize with the owner, both with access and power state


    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Thursday, December 20, 2012 7:01 AM
  • Thanks Doron,

    OK, then, is there any API or other way that I can set the system wakeup time? I don't want SetWaitableTimer which can't support power state S5(completely poweroff).

    Thanks.

    Friday, December 21, 2012 5:53 AM
  • I don't think the OS supports wake from off.

    d -- This posting is provided "AS IS" with no warranties, and confers no rights.

    Friday, December 21, 2012 7:24 AM