Notice: We have migrated to GitLab launching 2024-05-01 see here: https://gitlab.rtems.org/

#3838 closed enhancement (fixed)

Rework work area initialization

Reported by: Sebastian Huber Owned by: Sebastian Huber
Priority: normal Milestone: 5.1
Component: bsps Version: 5
Severity: normal Keywords: qualification
Cc: Blocked By:
Blocking: #3835, #3843, #3861, #3925

Description (last modified by Sebastian Huber)

The work area initialization is done by the BSP through bsp_work_area_initialize(). This approach predates the system initialization through the system initialization linker set. The workspace and C program heap are unconditionally initialized. With the availability of statically initialized threads a system without workspace and C program heap is feasible. Change the work area initialization so that components are initialized on demand. To achieve this:

  1. Add a Memory Handler which provides support for low level handling of memory areas which are handed over to the higher level Heap Handler.
  1. Add an implementation of _Memory_Get() to each BSP (basically a restructuring of the bsp_work_area_initialize() implementations).

See optimization opportunity in #3925.

Change History (22)

comment:1 Changed on 12/11/19 at 16:01:24 by Chris Johns

This needs to be explained in more detail.

What happens to BSPs that are not in the tree?

comment:2 Changed on 12/11/19 at 16:31:41 by Sebastian Huber

I am not sure what needs to be explained in more detail. This is mostly a mechanical change which just rearranges existing things a bit differently.

As usual, maintainers of BSPs which are not in the mainline RTEMS source have to pay a price and have to update their BSPs by themself. With an updated documentation, this shouldn't be an issue.

comment:3 in reply to:  2 ; Changed on 12/12/19 at 18:08:47 by Chris Johns

Replying to Sebastian Huber:

I am not sure what needs to be explained in more detail. This is mostly a mechanical change which just rearranges existing things a bit differently.

I think there are somethings, for example take "components are initialized on demand", what is a "component" and what does "initialized on demand" mean?

I am OK with working through the detail but this will have to wait until I find the time. If you do not mind waiting let me know.

As usual, maintainers of BSPs which are not in the mainline RTEMS source have to pay a price and have to update their BSPs by themself. With an updated documentation, this shouldn't be an issue.

A number of users cannot submit their BSPs and we have attempted to maintain a BSP API. Maybe we should define a format BSP interface that cannot be touched without careful consideration?

Version 0, edited on 12/12/19 at 18:08:47 by Chris Johns (next)

comment:4 in reply to:  3 Changed on 12/12/19 at 18:48:09 by Sebastian Huber

Replying to Chris Johns:

Replying to Sebastian Huber:

I am not sure what needs to be explained in more detail. This is mostly a mechanical change which just rearranges existing things a bit differently.

I think there are somethings, for example take "components are initialized on demand", what is a "component" and what does "initialized on demand" mean?

The two components are the workspace and the C program heap. On demand means that they are only initialized if functions of these components are used by the application.

I am OK with working through the detail but this will have to wait until I find the time. If you do not mind waiting let me know.

As usual, maintainers of BSPs which are not in the mainline RTEMS source have to pay a price and have to update their BSPs by themself. With an updated documentation, this shouldn't be an issue.

A number of users cannot submit their BSPs and we have attempted to maintain a BSP API. Maybe we should define a formal BSP interface that cannot be touched without careful consideration?

I do this with careful consideration. This change request is the result of a multi year work consisting of lots of small steps to make it possible to fully statically initialize RTEMS. Yes, it breaks the API, but adopting an existing BSP can be done easily in less than one hour. Also if you use a standard linker command file, then you can use the default implementation in your external BSP.

comment:5 Changed on 12/16/19 at 07:51:32 by Sebastian Huber

Blocking: 3843 added

comment:6 Changed on 02/04/20 at 05:23:46 by Sebastian Huber

Blocking: 3861 added

comment:7 Changed on 02/04/20 at 06:03:26 by Sebastian Huber <sebastian.huber@…>

In [changeset:"1cb925717e77910ef5250c83e0d03f13285f33a8/rtems" 1cb9257/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:8 Changed on 02/04/20 at 06:03:30 by Sebastian Huber <sebastian.huber@…>

In [changeset:"c477d927e8578adfb35a77ff39542b96da7c2a37/rtems" c477d927/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:9 Changed on 02/04/20 at 06:03:34 by Sebastian Huber <sebastian.huber@…>

In [changeset:"ffa11531700fca97a9be177bac54562de385401f/rtems" ffa1153/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:10 Changed on 02/04/20 at 06:03:37 by Sebastian Huber <sebastian.huber@…>

In [changeset:"34a7a12f48b62f959029172d5e8ffbd2a73739d2/rtems" 34a7a12f/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:11 Changed on 02/04/20 at 06:03:41 by Sebastian Huber <sebastian.huber@…>

In [changeset:"c184b0cf3117c7872f465ef5e41aeb3fc65d1adb/rtems" c184b0c/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:12 Changed on 02/04/20 at 06:03:45 by Sebastian Huber <sebastian.huber@…>

In [changeset:"07e2eacf8977121ef342e2d3c323ea6c997307b8/rtems" 07e2eac/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:13 Changed on 02/04/20 at 06:03:48 by Sebastian Huber <sebastian.huber@…>

In [changeset:"eea21eaca117ecd98afea164e1808d6530ef487f/rtems" eea21eac/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:14 Changed on 02/04/20 at 06:03:52 by Sebastian Huber <sebastian.huber@…>

In [changeset:"f7c5f9436031702bb8cbc25bb54aad3d3425b028/rtems" f7c5f94/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:15 Changed on 02/04/20 at 06:03:56 by Sebastian Huber <sebastian.huber@…>

In [changeset:"c344e5828c3e8447a6164402f5786c8b0fbfb6a2/rtems" c344e58/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:16 Changed on 02/04/20 at 06:22:23 by Sebastian Huber <sebastian.huber@…>

In [changeset:"813ada57f7efa3fb6a4a50616c4cd4abe45cec59/rtems-docs" 813ada5/rtems-docs]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-docs.git does not appear to be a Git repository.

comment:17 Changed on 02/04/20 at 08:58:48 by Sebastian Huber <sebastian.huber@…>

In [changeset:"420525079c4b66025b1a924be13f29f54d288942/rtems-docs" 4205250/rtems-docs]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems-docs.git does not appear to be a Git repository.

comment:18 Changed on 02/04/20 at 10:26:04 by Sebastian Huber <sebastian.huber@…>

In [changeset:"ccaec9661f66089e45ee34c53ec4519e803fe444/rtems" ccaec966/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:19 Changed on 02/14/20 at 09:06:57 by Sebastian Huber <sebastian.huber@…>

In [changeset:"33d89aff99a01f970d03e4bc1a0d958b4c7db868/rtems" 33d89af/rtems]:

Error: Processor CommitTicketReference failed
/data/trac/repo/rtems.git does not appear to be a Git repository.

comment:20 Changed on 04/02/20 at 08:48:23 by Sebastian Huber

Blocking: 3925 added

comment:21 Changed on 04/02/20 at 08:49:21 by Sebastian Huber

Description: modified (diff)
Resolution: fixed
Status: assignedclosed

comment:22 Changed on 06/23/21 at 07:16:03 by Sebastian Huber

Keywords: qualification added
Note: See TracTickets for help on using tickets.