<div dir="ltr"><div class="gmail_default" style="font-size:small">Ping.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Sorry for pinging so quickly but please understand that this is hampering my progress.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Niteesh.</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Aug 9, 2020 at 12:52 AM Niteesh G. S. <<a href="mailto:niteesh.gs@gmail.com" target="_blank">niteesh.gs@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div class="gmail_default" style="font-size:small">Hello,<br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have created a basic outline of how the RTEMS openfirm API would</div><div class="gmail_default" style="font-size:small">look like. The implementation is inspired by the openfirm.h implementation</div><div class="gmail_default" style="font-size:small">in FreeBSD.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Please a have look at the last 2 commits</div><div class="gmail_default" style="font-size:small"><a href="https://github.com/gs-niteesh/rtems/commits/ofw-rtems6-fdt-implementation-v1" target="_blank">https://github.com/gs-niteesh/rtems/commits/ofw-rtems6-fdt-implementation-v1</a><br></div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Since we are concerned only about the FDT implementation (also libBSD)</div><div class="gmail_default" style="font-size:small">I have removed all functions that are not supported by the FDT implementation</div><div class="gmail_default" style="font-size:small">for eg: OF_write, OF_call etc.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">I have a few questions regarding the API.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">1) Should we 100% conform with the OFW API? As mentioned above the</div><div class="gmail_default" style="font-size:small">current idea will not implement functions like OF_call, OF_write etc.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">2) For libBSD drivers to work we need to support the following functions</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div class="gmail_default" style="font-size:small">device_t OF_device_from_xref(phandle_t xref);</div><div class="gmail_default" style="font-size:small">phandle_t OF_xref_from_device(device_t dev);</div><div class="gmail_default" style="font-size:small">int OF_device_register_xref(phandle_t xref, device_t dev);</div></blockquote><div class="gmail_default" style="font-size:small">And implementing these functons in RTEMS is not possible.</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">One way to handle this, mentioned in the past is to let the openfirm.c</div><div class="gmail_default" style="font-size:small">in libBSD handle the implementations and openfirm.h in RTEMS provide</div><div class="gmail_default" style="font-size:small">the interface. This caused us to forward declare the device_t structure</div><div class="gmail_default" style="font-size:small">in openfirm.h in RTEMS.</div><div class="gmail_default" style="font-size:small">Is this approach OK? Is there any other better approach?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">3) There are a few functions unimplemented in libBSD should we implement</div><div class="gmail_default" style="font-size:small">them in the RTEMS API?</div><div class="gmail_default" style="font-size:small"><br></div><div class="gmail_default" style="font-size:small">Thanks,</div><div class="gmail_default" style="font-size:small">Niteesh.</div><br></div>
</blockquote></div>