#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:
- Add a Memory Handler which provides support for low level handling of memory areas which are handed over to the higher level Heap Handler.
- 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
comment:2 follow-up: 3 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 follow-up: 4 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 formal BSP interface that cannot be touched without careful consideration?
comment:4 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:10 Changed on 02/04/20 at 06:03:37 by Sebastian Huber <sebastian.huber@…>
In 34a7a12f/rtems:
comment:13 Changed on 02/04/20 at 06:03:48 by Sebastian Huber <sebastian.huber@…>
In eea21eac/rtems:
comment:16 Changed on 02/04/20 at 06:22:23 by Sebastian Huber <sebastian.huber@…>
comment:17 Changed on 02/04/20 at 08:58:48 by Sebastian Huber <sebastian.huber@…>
comment:18 Changed on 02/04/20 at 10:26:04 by Sebastian Huber <sebastian.huber@…>
In ccaec966/rtems:
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: | assigned → closed |
comment:22 Changed on 06/23/21 at 07:16:03 by Sebastian Huber
Keywords: | qualification added |
---|
This needs to be explained in more detail.
What happens to BSPs that are not in the tree?