-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Zephyr system init functional requirements #29
Zephyr system init functional requirements #29
Conversation
1bc3e58
to
48deb4f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some of my comments depend on what we discuss and agree with the group. For example, the use of RATIONALE fields or a more active use of FREETEXT that provides context for each section's requirements.
STATUS: Draft | ||
TYPE: Functional | ||
COMPONENT: System Initialization | ||
TITLE: System Init finished notification to MMU component |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This section has many optional requirements some of which build related groups. It would be great to see them nested in the sections, such as SMP configurations
, MMU configurations
, etc. A plain list is harder to follow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Related groupings make sense for simple enable/disable. I expect many requirements will have multiple independent conditions. That seems to make document organization less predictable.
I welcome suggestions!
COMPONENT: System Initialization | ||
TITLE: Top-Level Application Return Value Ignored | ||
STATEMENT: >>> | ||
Zephyr shall explicitly ignore the return value of the call to `main()`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ignore
not understood.
Needs an explanation (COMMENT?) and a justification.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Someone else will have to justify why the code is implemented as (void)main();
.
Please reformat the statements so that the web page shows each condition on a separate line. |
48deb4f
to
1fb03f4
Compare
Please remove the Where conditionals. The 3/14/24 Focus Group decided to postpone dealing with configuration items. |
1fb03f4
to
992945a
Compare
Summary of the changes: - Add empty sections for Interface, Functional, Non-Functional requirements. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add interface requirement for build-time registration for notifications of the following system initialization events: - Pre-CPU Architecture Initialization - Pre-Kernel Initialization - Post-Kernel Initialized - Application Initialization Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for sustaining an inherited active, non-reconfigurable HW watchdog. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization using no more than the published limit of the initial CPU stack. This phrasing allows for previous executables to: - pass data on the inherited stack; - design a maximum size for the inherited stack that will support Zephyr RTOS initialization. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to allow read access during initialization to data from preceding executable. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to follow component dependecy order. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for the Pre-CPU-Architecture init event. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for the Pre-Kernel initialization event. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for the Post-Kernel initialization event. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for the Application initialization event. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for the SMP Initialized event. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to notify components registered for an event based on the notification priority indicated in the event registration. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add functional requirement for System Initialization to end with the call to `main(void)`. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add System Initialization:Notifications section Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add requirement to ignore the return value of `main()` Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add requirement to dump code coverage data upon return from `main()` and before beginning the Zephyr RTOS shutdown sequence. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add requirement to disable interrupts during system shutdown. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add requirement to end system shutdown in an empty infinte loop. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add requirement for interface for registration for SMP-INit notification. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
992945a
to
25707e3
Compare
- Pre-Kernel Initialization | ||
- Post-Kernel Initialized | ||
- Application Initialization | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhancement Request: This needs a notification that System Initialization is compete. This notification needs to be given immediately before the call to main(void)
.
This event is needed by components that change behavior upon initialization complete (e.g., user interfaces, allowing communication). Providing this through the System Initialization component allows independence from the implementation of main()
(whether defined by the test framework or the default implementation in the kernel).
- Pre-Kernel Initialization | ||
- Post-Kernel Initialized | ||
- Application Initialization | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Enhancement Request: There needs to be a symmetric set of events for system shutdown.
The shutdown event registration is needed to enable a bootloader to register a handler for handing off execution to the loaded image while still allowing a controlled, clean shutdown of the RTOS.
Where the Zephyr RTOS inherits an active hardware watchdog that cannot be reconfigured, | ||
|
||
the Zephyr RTOS shall sustain the active hardware watchdog. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This STATEMENT is an enhancement request: This requirement is needed to handle conditions that will likely occur with some existing SOCs.
This also needs another requirement to start a HW watchdog if one is not active.
TITLE: Initial CPU stack usage kept within published limits | ||
STATEMENT: >>> | ||
The Zephyr RTOS shall use no more than the published amount of the initial CPU stack. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This STATEMENT is an enhancement request: This requirement is desired to allow users to determine the size of the initial stack provided by the bootloader.
This also needs a related requirement for Zephyr Project to specify, per CPU architecture, the amount initial stack space consumed before transitioning to an internally-allocated stack.
- each SMP context has been initialized; and | ||
- each System Initialization notification has been published; and | ||
- each memory access protection has been established. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Referring specifically to the C function int main(void)
imposes a design constraint. This needs to be traced to a higher-level Architecture Definition statements to:
- Provide a C ABI to the kernel;
- Only support the function signature
int main(void)
;
- each System Initialization notification has been published; and | ||
- each memory access protection has been established. | ||
<<< | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Which sdoc fragment should hold the requirements for the default implementation of int main(void);
?
Summary of the changes: - Add System Requirements section for System Initialization with - Parent requirement for extensibility. - Child requirements for build time registration of init hooks and initialization time execution of registered init hooks. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
Summary of the changes: - Add relationships for System Requirements:System Initialization notification requirements. Verified by: 1. Visual verification of strictdoc server web page using firefox. Signed-off-by: Gregory Shue <[email protected]>
STATEMENT: >>> | ||
The Zephyr RTOS shall expose an interface to build-time registration for the following system initialization notifications: | ||
|
||
- Pre-CPU Architecture Initialization |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing the Init level INIT_LEVEL_EARLY.
While the Zephyr RTOS is in any system initialization phase, | ||
|
||
the Zephyr RTOS shall allow read access to the data provided by the preceding executable. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This STATEMENT is an enhancement request.
TITLE: Initialization Notifications given in Registration Priority Order | ||
STATEMENT: >>> | ||
The Zephyr RTOS shall publish notifications for an event following the notification priority indicated in the event registration. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this STATEMENT reflect the current implementation?
TITLE: Extensible System Initialization | ||
STATEMENT: >>> | ||
The Zephyr RTOS initialization sequence shall be extensible. | ||
<<< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This STATEMENT is an enhancement request.
Withdrawing. |
Fix #26