locked
Windows Embedded Compact 7 x86 shutdown RRS feed

  • Question

  • Hi, how to shutdown x86 Windows Embedded compact 7 device?

    I have tryied http://social.msdn.microsoft.com/Forums/en-US/1bdda48b-7d79-4ccc-84d9-a229c875bee7/windows-compact-embedded-7-shutdown?forum=winembplatdev  and it works by partially. It is reseting whole system, but I would like to turn it off and don't start .

    Thursday, July 24, 2014 3:19 PM

All replies

  • Hi guzek,

    As I know in default WinCE does not support shutdown: http://social.msdn.microsoft.com/forums/en-US/ed41b2e2-1933-4ce6-bc4c-9d5a4880553f/applying-safe-shutdown-function-in-wince unless you modify the file like the post you link.

    But you should rebuild the file you modified to apply the changes.

    If you are working with a windows mobile, you can try P/Invoke ExitWindowsEx for help.

    --James


    <THE CONTENT IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, WHETHER EXPRESS OR IMPLIED>
    Thanks
    MSDN Community Support

    Please remember to "Mark as Answer" the responses that resolved your issue. It is a common way to recognize those who have helped you, and makes it easier for other visitors to find the resolution later.

    • Marked as answer by guzek Friday, July 25, 2014 9:15 AM
    • Unmarked as answer by guzek Thursday, July 31, 2014 1:13 PM
    Friday, July 25, 2014 2:55 AM
  • It works, my mistake, I have copied wrong nk.bin image to my SD card.

    • Edited by guzek Friday, July 25, 2014 9:16 AM
    Friday, July 25, 2014 9:15 AM
  • Btw could someone clarify what's happening in the code ? 

    http://social.msdn.microsoft.com/Forums/en-US/1bdda48b-7d79-4ccc-84d9-a229c875bee7/windows-compact-embedded-7-shutdown?forum=winembplatdev

        PCIReadBusData1(0x0, 0x1f, 0x0, &deviceId,0x02, 2);
        PCIReadBusData1(0x0, 0x1f, 0x0, &pmBase, 0x40, 4);
        pmBase &= 0xffffff80;
    
    	//S5
    	data = INPORT32((PULONG)(pmBase + 0x4));
    	data |= 0x1c01; // 
    	OUTPORT32((PULONG)(pmBase + 0x4), data);
    	
    	data = INPORT32((PULONG)(pmBase + 0x4));
    	data |= 0x3c01; // 
    	OUTPORT32((PULONG)(pmBase + 0x4), data); 


    BusNumber 0,

    DeviceNumber 1F,

    FunctionNumber 0

    What I found:

    http://wiki.osdev.org/Shutdown
    http://wiki.osdev.org/PCI


    But why 0x1F device number? 


    That is what I get in enumeration on Bus 0 and I can't see 31 ( 0x1F ). Is it somehow connected to ACPI?

    PCI Device Configurations (6 PCI bus(es) present)...
    ========================================================
     Bus, Device, Function = 0, 26, 0
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 12, 3 => SERIAL_BUS_CTLR
     Interrupt             = 11
     BaseAddress[4]        = 0xb800 (I/O)
    ========================================================
     Bus, Device, Function = 0, 26, 1
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 12, 3 => SERIAL_BUS_CTLR
     Interrupt             = 3
     BaseAddress[4]        = 0xb880 (I/O)
    ========================================================
     Bus, Device, Function = 0, 26, 2
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 12, 3 => SERIAL_BUS_CTLR
     Interrupt             = 5
     BaseAddress[4]        = 0xbc00 (I/O)
    ========================================================
     Bus, Device, Function = 0, 27, 0
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 4, 3 => MULTIMEDIA_DEV
     Interrupt             = 15
     BaseAddress[0]        = 0xfe7f8000 (Memory)
    ========================================================
     Bus, Device, Function = 0, 29, 0
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 12, 3 => SERIAL_BUS_CTLR
     Interrupt             = 7
     BaseAddress[4]        = 0xb080 (I/O)
    ========================================================
     Bus, Device, Function = 0, 29, 1
     Vendor ID, Device ID  = 0x Base Class, Subclass  = 12, 3 => SERIAL_BUS_CTLR
     Interrupt             = 14
     BaseAddress[4]        = 0xb400 (I/O)
    What are 0x1c01,  0x3c01 and other magic values?




    • Edited by guzek Friday, July 25, 2014 11:52 AM
    Friday, July 25, 2014 10:53 AM
  • up up
    Thursday, July 31, 2014 1:13 PM
  • up up
    Thursday, August 14, 2014 1:36 PM