How to send a shutdown signal to QEMU from RTEMS?

Hesham Moustafa heshamelmatary at gmail.com
Fri Oct 10 16:56:50 UTC 2014


On Wed, Oct 8, 2014 at 4:20 PM, Joel Sherrill <joel.sherrill at oarcorp.com>
wrote:

>
> On 10/8/2014 12:15 AM, Sebastian Huber wrote:
> > On 07/10/14 15:53, Hesham Moustafa wrote:
> >> Hi,
> >>
> >> I want to send shutdown signal from RTEMS to qemu. Joel said that
> >> qemu-system-i386 does so; can anyone refers me to how to implement that
> for
> >> qemu-system-or32 (openrisc)?
> > This is target dependent.  Some targets implement the registers of the
> reset
> > module.  The easiest thing to figure this out is looking at the Qemu
> sources.
> >
> We need to ask Christian. There is a command line option to qemu
> which turns on "exit on reset" (--no-reboot).  If the simulated target
> hardware has a way to reset it from software, the target specific
> simulation
> can honor the command line option and just exit rather than start over.
>
> We use this on at least the pc386.
>
> Would you please provide the related QEMU code so that I can try to
imitate for or1k?

> The questions for Christian are:
>
> + Does the or1ksim have a software reset capability? If not, can we
> add one?
>
> There is a single assembly instruction that shutdowns the whole or1ksim
simulator process. We can use it from RTEMS. The question is where is the
best place to put in this instruction? It's BSP related, and I was thinking
of _CPU_Fatal_Halt, but it's not BSP related. However only or1ksim
simulator recognizes this instruction, and it has no effect on other
(future) target (QEMU, FPGA board, etc).

> + Can qemu be modified to support this?
>
> It should only be a few lines of code in qemu and one write to the
> magic location in the BSP.
>
> It will be of great value in speeding the testing procedure.
>
> --
> Joel Sherrill, Ph.D.             Director of Research & Development
> joel.sherrill at OARcorp.com        On-Line Applications Research
> Ask me about RTEMS: a free RTOS  Huntsville AL 35805
> Support Available                (256) 722-9985
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20141010/7f14a2f2/attachment-0002.html>


More information about the devel mailing list