I have an instance where I would like to soft Reset the device when the power
button is pressed. I have tried to use the Power off call in a devce driver
to call the KernelIoControl function with the IOCT_HAL_REBOOT code but have
not had any success. Does anyone have other suggestions?

Re: Soft Reset using power button by Bruce

Bruce
Tue Dec 14 11:08:54 CST 2004

Don't do system calls in the power functions.

You need to do that KernelIoControl call from where you read the power
button. Probably the driver's IST.

--
Bruce Eitman (eMVP)
Senior Engineer
beitman AT applieddata DOT net

Applied Data Systems
www.applieddata.net
An ISO 9001:2000 Registered Company
Microsoft WEP Gold-level Member

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/community/newsgroups



Re: Soft Reset using power button by K

K
Tue Dec 14 11:21:41 CST 2004

Dose your OAL implement the IOCTL_HAL_REBOOT??

"Greenhorn" <Greenhorn@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:10913955-E023-4754-A718-C3F2A003BB16@microsoft.com...
>I have an instance where I would like to soft Reset the device when the
>power
> button is pressed. I have tried to use the Power off call in a devce
> driver
> to call the KernelIoControl function with the IOCT_HAL_REBOOT code but
> have
> not had any success. Does anyone have other suggestions?



Re: Soft Reset using power button by Greenhorn

Greenhorn
Tue Dec 14 13:41:01 CST 2004

It does seem that the system call in the PowerUp or PowerDown causes the
system to hang. I guess by saying that I should do the KernelIoControl call
in the IST you want me to register the driver to receive the SYSINTR_POWER
interrupt?

"Bruce Eitman (eMVP)" wrote:

> Don't do system calls in the power functions.
>
> You need to do that KernelIoControl call from where you read the power
> button. Probably the driver's IST.
>
> --
> Bruce Eitman (eMVP)
> Senior Engineer
> beitman AT applieddata DOT net
>
> Applied Data Systems
> www.applieddata.net
> An ISO 9001:2000 Registered Company
> Microsoft WEP Gold-level Member
>
> Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> Embedded newsgroups? Let us know!
> https://www.windowsembeddedeval.com/community/newsgroups
>
>
>

Re: Soft Reset using power button by Greenhorn

Greenhorn
Tue Dec 14 13:43:02 CST 2004

Yes I'm using an Ipaq actually that supporst the reboot control code

"K. S. Huang" wrote:

> Dose your OAL implement the IOCTL_HAL_REBOOT??
>
> "Greenhorn" <Greenhorn@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D:10913955-E023-4754-A718-C3F2A003BB16@microsoft.com...
> >I have an instance where I would like to soft Reset the device when the
> >power
> > button is pressed. I have tried to use the Power off call in a devce
> > driver
> > to call the KernelIoControl function with the IOCT_HAL_REBOOT code but
> > have
> > not had any success. Does anyone have other suggestions?
>
>
>

Re: Soft Reset using power button by K

K
Wed Dec 15 00:08:27 CST 2004

In PowerUp/Down Handler, driver can not use system APU execpt some of the
API for special pupose.
So create a IST to receive the Power Event and invoke the KernelIoControl is
a good choice.

"Greenhorn" <Greenhorn@discussions.microsoft.com> ¼¶¼g©ó¶l¥ó·s»D
:CE3CEDE5-34A7-4F1F-A123-D44849FAD374@microsoft.com...
> It does seem that the system call in the PowerUp or PowerDown causes the
> system to hang. I guess by saying that I should do the KernelIoControl
call
> in the IST you want me to register the driver to receive the SYSINTR_POWER
> interrupt?
>
> "Bruce Eitman (eMVP)" wrote:
>
> > Don't do system calls in the power functions.
> >
> > You need to do that KernelIoControl call from where you read the power
> > button. Probably the driver's IST.
> >
> > --
> > Bruce Eitman (eMVP)
> > Senior Engineer
> > beitman AT applieddata DOT net
> >
> > Applied Data Systems
> > www.applieddata.net
> > An ISO 9001:2000 Registered Company
> > Microsoft WEP Gold-level Member
> >
> > Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> > Embedded newsgroups? Let us know!
> > https://www.windowsembeddedeval.com/community/newsgroups
> >
> >
> >



Re: Soft Reset using power button by Greenhorn

Greenhorn
Wed Dec 15 07:27:03 CST 2004

Just out of curiosity??? Would it be possible to force a soft reset by
doing it in assembly. I assume that the code would start in user mode and
you would have to switch to Supervsor mode, possilby set the RCSR (reset
status register) then branch to the Reset vector. I tried to do this from an
application but couldn't get it to work.

"Greenhorn" wrote:

> It does seem that the system call in the PowerUp or PowerDown causes the
> system to hang. I guess by saying that I should do the KernelIoControl call
> in the IST you want me to register the driver to receive the SYSINTR_POWER
> interrupt?
>
> "Bruce Eitman (eMVP)" wrote:
>
> > Don't do system calls in the power functions.
> >
> > You need to do that KernelIoControl call from where you read the power
> > button. Probably the driver's IST.
> >
> > --
> > Bruce Eitman (eMVP)
> > Senior Engineer
> > beitman AT applieddata DOT net
> >
> > Applied Data Systems
> > www.applieddata.net
> > An ISO 9001:2000 Registered Company
> > Microsoft WEP Gold-level Member
> >
> > Do have an opinion on the effectiveness of Microsoft Windows Mobile and
> > Embedded newsgroups? Let us know!
> > https://www.windowsembeddedeval.com/community/newsgroups
> >
> >
> >

Re: Soft Reset using power button by bytekeeper

bytekeeper
Wed Dec 15 09:23:07 CST 2004

You should:

1. Go SVC mode
2. Disable interrupts
3. Turn off MMU
4. Clear reset status register (because Your bootloader possibly checks
reset cause)
5. Brunch to the address 0x00000000

At least it worked for me from the OAL code.


"Greenhorn" <Greenhorn@discussions.microsoft.com> wrote in message
news:37CDA4B1-AF42-45AD-A07A-9187738D066A@microsoft.com...
> Just out of curiosity??? Would it be possible to force a soft reset by
> doing it in assembly. I assume that the code would start in user mode and
> you would have to switch to Supervsor mode, possilby set the RCSR (reset
> status register) then branch to the Reset vector. I tried to do this from
an
> application but couldn't get it to work.
>
> "Greenhorn" wrote:
>
> > It does seem that the system call in the PowerUp or PowerDown causes the
> > system to hang. I guess by saying that I should do the KernelIoControl
call
> > in the IST you want me to register the driver to receive the
SYSINTR_POWER
> > interrupt?
> >
> > "Bruce Eitman (eMVP)" wrote:
> >
> > > Don't do system calls in the power functions.
> > >
> > > You need to do that KernelIoControl call from where you read the power
> > > button. Probably the driver's IST.
> > >
> > > --
> > > Bruce Eitman (eMVP)
> > > Senior Engineer
> > > beitman AT applieddata DOT net
> > >
> > > Applied Data Systems
> > > www.applieddata.net
> > > An ISO 9001:2000 Registered Company
> > > Microsoft WEP Gold-level Member
> > >
> > > Do have an opinion on the effectiveness of Microsoft Windows Mobile
and
> > > Embedded newsgroups? Let us know!
> > > https://www.windowsembeddedeval.com/community/newsgroups
> > >
> > >
> > >



Re: Soft Reset using power button by Greenhorn

Greenhorn
Wed Dec 15 16:23:07 CST 2004

When you are in OAL mode does it start from User mode or from another mode
say system or IRQ??

"bytekeeper" wrote:

> You should:
>
> 1. Go SVC mode
> 2. Disable interrupts
> 3. Turn off MMU
> 4. Clear reset status register (because Your bootloader possibly checks
> reset cause)
> 5. Brunch to the address 0x00000000
>
> At least it worked for me from the OAL code.
>
>
> "Greenhorn" <Greenhorn@discussions.microsoft.com> wrote in message
> news:37CDA4B1-AF42-45AD-A07A-9187738D066A@microsoft.com...
> > Just out of curiosity??? Would it be possible to force a soft reset by
> > doing it in assembly. I assume that the code would start in user mode and
> > you would have to switch to Supervsor mode, possilby set the RCSR (reset
> > status register) then branch to the Reset vector. I tried to do this from
> an
> > application but couldn't get it to work.
> >
> > "Greenhorn" wrote:
> >
> > > It does seem that the system call in the PowerUp or PowerDown causes the
> > > system to hang. I guess by saying that I should do the KernelIoControl
> call
> > > in the IST you want me to register the driver to receive the
> SYSINTR_POWER
> > > interrupt?
> > >
> > > "Bruce Eitman (eMVP)" wrote:
> > >
> > > > Don't do system calls in the power functions.
> > > >
> > > > You need to do that KernelIoControl call from where you read the power
> > > > button. Probably the driver's IST.
> > > >
> > > > --
> > > > Bruce Eitman (eMVP)
> > > > Senior Engineer
> > > > beitman AT applieddata DOT net
> > > >
> > > > Applied Data Systems
> > > > www.applieddata.net
> > > > An ISO 9001:2000 Registered Company
> > > > Microsoft WEP Gold-level Member
> > > >
> > > > Do have an opinion on the effectiveness of Microsoft Windows Mobile
> and
> > > > Embedded newsgroups? Let us know!
> > > > https://www.windowsembeddedeval.com/community/newsgroups
> > > >
> > > >
> > > >
>
>
>

Re: Soft Reset using power button by Dean

Dean
Wed Dec 15 16:56:43 CST 2004

Then use that. Just don't call it from an ISR or power handler.

--
Dean Ramsier - eMVP


"Greenhorn" <Greenhorn@discussions.microsoft.com> wrote in message
news:49035273-27BC-42E2-BBC5-8317B5FDC875@microsoft.com...
> Yes I'm using an Ipaq actually that supporst the reboot control code
>
> "K. S. Huang" wrote:
>
> > Dose your OAL implement the IOCTL_HAL_REBOOT??
> >
> > "Greenhorn" <Greenhorn@discussions.microsoft.com>
¼¶¼g©ó¶l¥ó·s»D:10913955-E023-4754-A718-C3F2A003BB16@microsoft.com...
> > >I have an instance where I would like to soft Reset the device when the
> > >power
> > > button is pressed. I have tried to use the Power off call in a devce
> > > driver
> > > to call the KernelIoControl function with the IOCT_HAL_REBOOT code but
> > > have
> > > not had any success. Does anyone have other suggestions?
> >
> >
> >