Skip to content
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

kernel attributes: explain their location #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions src/doc/kernel_attributes.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,14 @@ allocated flash region. These attributes describe properties of the flashed
kernel on a particular hardware board. External tools can read these attributes
to learn about the kernel installed on the board.

The attributes are stored at the end of the kernel's allocated flash region to
help with discoverability. Tock tools generally assume that 1) userspace
applications are installed immediately after the end of the kernel region in
flash, and 2) that the address for the start of userspace applications is known.
By placing the kernel attributes at the end of the kernel flash region, Tock
tools can find the attributes by starting at the start of userspace applications
in flash and working backwards.

Comment on lines +14 to +15
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
in flash and working backwards.
in flash and working backwards.
Storing attributes at the end also has a secondary benefit of zero-filling the rest of
the flash region. While not essential for correct operation, as unused flash should
always be inaccessible, this provides an additional defense-in-depth step for the
Tock platform by default.

## Format

Kernel attributes are stored in a descending TLV (type-length-value) structure.
Expand Down