GSoC 2020 PATCH: Import OpenFirmWare API to RTEMS

2020-07-14 Thread G S Niteesh Babu
Hello, This series of patches import OpenFirmWare to RTEMS from FreeBSD. These patches are based on the new build system, so it will require the person building this patch to pull Sebastian's 'build' branch from his git repo. Sebastian's git repo: https://git.rtems.org/sebh/rtems.git/log/?h=build

[PATCH RTEMS 2/7] libfreebsd: Import OFW files from FreeBSD.

2020-07-14 Thread G S Niteesh Babu
freebsd head: b8c57b4 The following files have been imported from FreeBSD to implement OF_* functions into RTEMS. 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/include/dev/ofw/openfirm.h| 187 cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c | 479 +++ cpukit/libfreebsd

[PATCH RTEMS 6/7] spec/build/cpukit: Added spec file for OpenFirmWare

2020-07-14 Thread G S Niteesh Babu
--- spec/build/cpukit/librtemscpu.yml | 5 + spec/build/cpukit/objfreebsd.yml | 17 + 2 files changed, 22 insertions(+) create mode 100644 spec/build/cpukit/objfreebsd.yml diff --git a/spec/build/cpukit/librtemscpu.yml b/spec/build/cpukit/librtemscpu.yml index 403662b97d..

[PATCH RTEMS 3/7] libfreebsd: Added ofw_if.h

2020-07-14 Thread G S Niteesh Babu
This file is the RTEMS implementation of ofw_if.h in FreeBSD. The ofw_if.h in FreeBSD is an autogenerated header file that maps the OF_function calls to their respective implementation. But in RTEMS this file maps the OF_functions directly to their FDT implementation. --- cpukit/libfreebsd/freebsd

[PATCH RTEMS 7/7] libtests/openfirmware: Added a testsuite for openfirmware

2020-07-14 Thread G S Niteesh Babu
--- spec/build/testsuites/libtests/grp.yml| 3 + .../testsuites/libtests/openfirmware01.yml| 20 +++ testsuites/libtests/openfirmware01/init.c | 147 ++ .../openfirmware01/openfirmware01.doc | 29 .../openfirmware01/openfirmware01.scn | 2

[PATCH RTEMS 1/7] bsp/fdt.h: Move bsp/fdt.h to cpukit

2020-07-14 Thread G S Niteesh Babu
This commit move the bsp/fdt.h header to cpukit/include/rtems. The reason for this is, with inclusion of libfreebsd there are cases where their is need for bsp_fdt_get(). And with this header under bsps directory it is not possible to include it under a cpukit directory. --- bsps/include/bsp/fdt.h

[PATCH RTEMS 4/7] libfreebsd: FreeBSD porting helper header

2020-07-14 Thread G S Niteesh Babu
This file serve the purpose as rtems-bsd-kernel-space.h in the rtems-libbsd. This file is intended to be included in every source file that is to imported from FreeBSD. This is to reduce the number of redefinitions for commonly used functions like malloc, free and KASSERT. --- cpukit/libfreebsd/rt

[PATCH RTEMS 5/7] libfreebsd: Port OFW to RTEMS

2020-07-14 Thread G S Niteesh Babu
The following files have been ported to RTEMS 1) openfirm.h 2) openfirm.c 3) ofw_fdt.c --- cpukit/include/dev/ofw/openfirm.h| 16 ++ cpukit/libfreebsd/freebsd/dev/ofw/ofw_fdt.c | 149 ++- cpukit/libfreebsd/freebsd/dev/ofw/openfirm.c | 58 +++- 3 files changed, 22

Re: [GSoC 2020]: Weekly thread update

2020-07-14 Thread Chris Johns
On 15/7/20 1:57 pm, Mritunjay Sharma wrote: > On Wed, Jul 15, 2020 at 5:33 AM Chris Johns > wrote: > > On 15/7/20 4:30 am, Mritunjay Sharma wrote: > > Hello everyone, > > > > Pardon my mistake for that long thread. From now on the daily updates > will be

Re: [GSoC 2020]: Weekly thread update

2020-07-14 Thread Gedare Bloom
On Tue, Jul 14, 2020 at 9:57 PM Mritunjay Sharma wrote: > > > > On Wed, Jul 15, 2020 at 5:33 AM Chris Johns wrote: >> >> On 15/7/20 4:30 am, Mritunjay Sharma wrote: >> > Hello everyone, >> > >> > Pardon my mistake for that long thread. From now on the daily updates will >> > be >> > given on a t

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Gedare Bloom
On Tue, Jul 14, 2020 at 10:59 AM Utkarsh Rai wrote: > > > > On Tue, Jul 14, 2020 at 7:36 PM Gedare Bloom wrote: >> >> I won't comment on the namespace and coding conventions, other than to >> say you should focus on doing them correctly as you code, rather than >> going back and fixing them later

Re: [GSoC 2020]: Weekly thread update

2020-07-14 Thread Mritunjay Sharma
On Wed, Jul 15, 2020 at 5:33 AM Chris Johns wrote: > On 15/7/20 4:30 am, Mritunjay Sharma wrote: > > Hello everyone, > > > > Pardon my mistake for that long thread. From now on the daily updates > will be > > given on a thread that will end every week. > > Thank you :) > > > 1) I studied about ht

Re: [GSoC 2020]: Weekly thread update

2020-07-14 Thread Chris Johns
On 15/7/20 4:30 am, Mritunjay Sharma wrote: > Hello everyone, > > Pardon my mistake for that long thread. From now on the daily updates will be > given on a thread that will end every week. Thank you :) > 1) I studied about https://github.com/RTEMS/rtems-libbsd > 2) Tried to fix the error that

[GSoC 2020]: Weekly thread update

2020-07-14 Thread Mritunjay Sharma
Hello everyone, Pardon my mistake for that long thread. From now on the daily updates will be given on a thread that will end every week. 1) I studied about https://github.com/RTEMS/rtems-libbsd 2) Tried to fix the error that I reported yesterday: ``` ../posix/rtems_init.c:38:10: fatal error: rt

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Utkarsh Rai
On Tue, Jul 14, 2020 at 7:36 PM Gedare Bloom wrote: > I won't comment on the namespace and coding conventions, other than to > say you should focus on doing them correctly as you code, rather than > going back and fixing them later. More below. > > On Mon, Jul 13, 2020 at 10:34 AM Utkarsh Rai >

Strong APA Scheduler : First Draft

2020-07-14 Thread Richi Dubey
Hi, I'm excited to present to you my first draft of the Strong APA scheduler that we've all been working so hard on. The link for the repository containing the code and the doxygen config is: https://github.com/richidubey/Strong-APA-Documentation and the documentation can be viewed directly from

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Richi Dubey
I understand. Thank you. On Tue, Jul 14, 2020 at 7:05 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > On 14/07/2020 13:37, Richi Dubey wrote: > > > Here we remove the affine ready queue if it > > exists from the chain of affine queues since now an affine thread is > >

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Gedare Bloom
I won't comment on the namespace and coding conventions, other than to say you should focus on doing them correctly as you code, rather than going back and fixing them later. More below. On Mon, Jul 13, 2020 at 10:34 AM Utkarsh Rai wrote: > > - This is the complete set of changes for strict isola

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Sebastian Huber
On 14/07/2020 13:37, Richi Dubey wrote: Here we remove the affine ready queue if it exists from the chain of affine queues since now an affine thread is scheduled on a processor. Why are we removing the entire affine queue corresponding to a CPU when a single node of the queue gets

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Richi Dubey
> > Here we remove the affine ready queue if it > exists from the chain of affine queues since now an affine thread is > scheduled on a processor. Why are we removing the entire affine queue corresponding to a CPU when a single node of the queue gets scheduled? On Tue, Jul 14, 2020 at 2:51 PM Seb

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Utkarsh Rai
On Tue, Jul 14, 2020 at 1:13 PM Sebastian Huber < sebastian.hu...@embedded-brains.de> wrote: > Hello Utkarsh, > > if you look a the stuff you added to the score and compare it with > something existing in the score, do you notice differences in the naming > conventions and the code format? Have yo

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Sebastian Huber
On 14/07/2020 11:11, Sebastian Huber wrote: On 14/07/2020 10:47, Richi Dubey wrote: Can someone please help me understand how this (https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c#n385) if condition works. Why are we removing the ready queue Node from the chain of Affine

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Sebastian Huber
On 14/07/2020 10:47, Richi Dubey wrote: Can someone please help me understand how this (https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c#n385) if condition works. Why are we removing the ready queue Node from the chain of Affine queues when we are allocating a different proc

Re: Need help in understanding some of the existing code in RTEMS

2020-07-14 Thread Richi Dubey
Hi, Can someone please help me understand how this ( https://git.rtems.org/rtems/tree/cpukit/score/src/scheduleredfsmp.c#n385) if condition works. Why are we removing the ready queue Node from the chain of Affine queues when we are allocating a different processor ( https://git.rtems.org/rtems/tre

Re: [PATCH] Strict thread-stack isolation

2020-07-14 Thread Sebastian Huber
Hello Utkarsh, if you look a the stuff you added to the score and compare it with something existing in the score, do you notice differences in the naming conventions and the code format? Have you looked at https://docs.rtems.org/branches/master/eng/coding.html ? On 13/07/2020 18:33, Utkars

[PATCH] user: Mention replacements for removed APIs

2020-07-14 Thread Sebastian Huber
--- user/migration/v5-to-v6.rst | 51 + 1 file changed, 51 insertions(+) diff --git a/user/migration/v5-to-v6.rst b/user/migration/v5-to-v6.rst index 5997057..d4691ff 100644 --- a/user/migration/v5-to-v6.rst +++ b/user/migration/v5-to-v6.rst @@ -18,3 +18,54 @@