Friday, April 23, 2010

Cold booting Windows CE 6.0 Terminal

Hi All,
Yesterday I was trying to find how to cold boot a CE6.0 terminal from a Application.
You could call KerneIoctl function with IOCTL_HAL_REBOOT to warm boot the system (Soft Reset) and if you call SetCleanRebootFlag() beofore the Ioctl call, so you can do Cold Boot (Hard Reset).
In CE5.0, WM6.1 and WM 6.5, these calls were directly possible from the application itself. But in CE 6.0 as the memory architecture was changed, only limited IOCTLs are supported by default from user Mode Applications and Drivers. (But OEMs can modify this behavior and may support more IOCTLs).

There is a simple alternate method worked for me, which is using PM API SetSystemPowerState().
PM has two state called coldreboot (Cold Boot) and reboot(Warm Boot).
Warm Boot has a state defined in PM.H as POWER_STATE_RESET, but I believe Cold boot is not documented properly. POWER_STATE_BOOT didn't do Cold boot as expected.


Cold Boot:
SetSystemPowerState(L"coldreboot",FALSE,POWER_FORCE);

WarmBoot:
SetSystemPowerState(L"reboot",FALSE,POWER_FORCE); or
SetSystemPowerState(NULL,POWER_STATE_RESET,POWER_FORCE);

when the SetSysmPowerstate is called with coldreboot string, PM does call SetCleanRebootFlag and KernelIoctl with IOCTL_HAL_REBOOT.

I believe Application developers can make use of PM API to do Cold and Warm Boots.

I have tested these APIs on Motorola MPA 2.0 CE Terminal.

Please correct me, If Iam Wrong.

No comments:

Post a Comment