<div dir="ltr"><div dir="ltr">Hi Mazaya,</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 18, 2023 at 8:35 PM Muhammad Sulthan Mazaya <<a href="mailto:msulthanmazaya@gmail.com">msulthanmazaya@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Alan,<br><br>> Also, as you mentioned, the renode Zephyr example runs directly from RAM without a prom image. Is it that the RTEMS LEON3 BSP relies on initialization done by the boot prom (GRMON or MKPROM2 based boot code)?<br><br>Do you or anyone on the devel mailing list know where/how can I check which kind of initialization rtems leon3 bsp rely on? Sorry, I am fairly new to this<br><br></div></blockquote><div>The prom image source code is pretty simple, but it would take a little bit of time (for me at least) to decode since it is in SPARC assembly language:</div><div>The code:</div><div><a href="https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S">https://github.com/TUT-ASI/leon3-grlib-gpl-mirror/blob/master/software/leon3/prom.S</a></div><div>And the prom.h header they use for the renode prom image:</div><div><a href="https://github.com/antmicro/renode-rtems-leon3/blob/main/prom.h">https://github.com/antmicro/renode-rtems-leon3/blob/main/prom.h</a></div><div><br></div><div>Essentially, it is setting up the processor including the stack pointer, and minimal configuration (AMBA Plug and play?). The idea would be to translate what the prom.S assembly program is doing into a set of .resc statements to program configuration registers and set up anything that RTEMS may need to run. It may be a subset of everything that the assembly code does - It may come down to just one or two statements. I'm not being specific with the steps, because I'm not sure myself.. I would have to take some time to figure out exactly what it's doing.</div><div><br></div><div>Here is an example for the K210 where some of the peripheral registers are programmed in the renode resc script:</div><div><a href="https://github.com/renode/renode/blob/master/scripts/single-node/kendryte_k210.resc#L10">https://github.com/renode/renode/blob/master/scripts/single-node/kendryte_k210.resc#L10</a><br></div><div><br></div><div>Replacing the prom with resc statements is one way to solve the problem - by understanding the assembly and the memory mapped registers that are being programmed. The other way to solve the problem is by figuring out the way to supply the prom.bin file to users that need to run RTEMS/LEON3 binaries on renode. One is an embedded programming problem and the other is an automation problem. I think both are valid solutions.</div><div><br></div><div>Regards,</div><div>Alan</div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Thank you,<br>Mazaya</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 18, 2023 at 11:27 PM Alan Cudmore <<a href="mailto:alan.cudmore@gmail.com" target="_blank">alan.cudmore@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi Mazaya,<div>I wonder if it is possible to initialize the processor to the state where it can run the RTEMS image in RAM without using the prom image? The processor initialization would have to go in the resc script before the image is loaded and started.</div><div>Also, as you mentioned, the renode Zephyr example runs directly from RAM without a prom image. Is it that the RTEMS LEON3 BSP relies on initialization done by the boot prom (GRMON or MKPROM2 based boot code)?</div><div><a href="https://github.com/renode/renode/blob/master/scripts/single-node/leon3_zephyr.resc" target="_blank">https://github.com/renode/renode/blob/master/scripts/single-node/leon3_zephyr.resc</a><br></div><div><br></div><div>I guess it ends up being a trade off of tooling vs. trying to program the necessary initialization in the resc script.</div><div><br></div><div>Regards,</div><div>Alan</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jul 18, 2023 at 2:46 AM Muhammad Sulthan Mazaya <<a href="mailto:msulthanmazaya@gmail.com" target="_blank">msulthanmazaya@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">Hi,<br><br>I was trying to implement renode for testing leon3 using rtems-test. I noticed that from the example they provide <a href="https://github.com/antmicro/renode-rtems-leon3/blob/main/leon3_rtems.resc" target="_blank">https://github.com/antmicro/renode-rtems-leon3/blob/main/leon3_rtems.resc</a>, it seems like the renode simulator needs the prom image of leon3 to do so. I don't think an additional build step before testing a particular bsp is something supported by the build config of rtems-tools <a class="gmail_plusreply" id="m_-6626371683867750072m_2942996465874831380m_5516817280554681471plusReplyChip-0">+</a> my mentors also said it shouldn't be on the rtems-tools. Is it okay to have RSB build that for us as part of the BSP?<br><br>Thank you,<br>Mazaya</div>
_______________________________________________<br>
devel mailing list<br>
<a href="mailto:devel@rtems.org" target="_blank">devel@rtems.org</a><br>
<a href="http://lists.rtems.org/mailman/listinfo/devel" rel="noreferrer" target="_blank">http://lists.rtems.org/mailman/listinfo/devel</a></blockquote></div>
</blockquote></div>
</blockquote></div></div>