<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 8, 2014 at 4:20 PM, Joel Sherrill <span dir="ltr"><<a href="mailto:joel.sherrill@oarcorp.com" target="_blank">joel.sherrill@oarcorp.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
On 10/8/2014 12:15 AM, Sebastian Huber wrote:<br>
> On 07/10/14 15:53, Hesham Moustafa wrote:<br>
>> Hi,<br>
>><br>
>> I want to send shutdown signal from RTEMS to qemu. Joel said that<br>
>> qemu-system-i386 does so; can anyone refers me to how to implement that for<br>
>> qemu-system-or32 (openrisc)?<br>
> This is target dependent. Some targets implement the registers of the reset<br>
> module. The easiest thing to figure this out is looking at the Qemu sources.<br>
><br>
</span>We need to ask Christian. There is a command line option to qemu<br>
which turns on "exit on reset" (--no-reboot). If the simulated target<br>
hardware has a way to reset it from software, the target specific<br>
simulation<br>
can honor the command line option and just exit rather than start over.<br>
<br>
We use this on at least the pc386.<br>
<br></blockquote><div>Would you please provide the related QEMU code so that I can try to imitate for or1k? </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
The questions for Christian are:<br>
<br>
+ Does the or1ksim have a software reset capability? If not, can we<br>
add one?<br>
<br></blockquote><div>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).</div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
+ Can qemu be modified to support this?<br>
<br>
It should only be a few lines of code in qemu and one write to the<br>
magic location in the BSP.<br>
<br>
It will be of great value in speeding the testing procedure.<br>
<span class="HOEnZb"><font color="#888888"><br>
--<br>
Joel Sherrill, Ph.D. Director of Research & Development<br>
joel.sherrill@OARcorp.com On-Line Applications Research<br>
Ask me about RTEMS: a free RTOS Huntsville AL 35805<br>
Support Available (256) 722-9985<br>
<br>
</font></span></blockquote></div><br></div></div>