GSoC2020: RTEMS OpenFirmWare FDT Implementation (outline)

Niteesh G. S. niteesh.gs at gmail.com
Sat Aug 8 19:22:32 UTC 2020


Hello,

I have created a basic outline of how the RTEMS openfirm API would
look like. The implementation is inspired by the openfirm.h implementation
in FreeBSD.

Please a have look at the last 2 commits
https://github.com/gs-niteesh/rtems/commits/ofw-rtems6-fdt-implementation-v1

Since we are concerned only about the FDT implementation (also libBSD)
I have removed all functions that are not supported by the FDT
implementation
for eg: OF_write, OF_call etc.

I have a few questions regarding the API.

1) Should we 100% conform with the OFW API? As mentioned above the
current idea will not implement functions like OF_call, OF_write etc.

2) For libBSD drivers to work we need to support the following functions

device_t OF_device_from_xref(phandle_t xref);
phandle_t OF_xref_from_device(device_t dev);
int OF_device_register_xref(phandle_t xref, device_t dev);

And implementing these functons in RTEMS is not possible.

One way to handle this, mentioned in the past is to let the openfirm.c
in libBSD handle the implementations and openfirm.h in RTEMS provide
the interface. This caused us to forward declare the device_t structure
in openfirm.h in RTEMS.
Is this approach OK? Is there any other better approach?

3) There are a few functions unimplemented in libBSD should we implement
them in the RTEMS API?

Thanks,
Niteesh.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20200809/744dceac/attachment.html>


More information about the devel mailing list