Commit graph

69 commits

Author SHA1 Message Date
Indan Zupancic
27a52ddd4c Runtime Domain Schedules
Implementation of RFC-20.

Signed-off-by: Indan Zupancic <indan@nul.nu>
2026-03-24 15:03:39 +11:00
Julia Vassiliki
c55f50b6e5 manual: correct alignment of IPC buffer
Not all platforms are 512-byte aligned. Specifically, 64-bit
platforms are 1024-byte byte aligned.

Signed-off-by: Julia Vassiliki <julia.vassiliki@unsw.edu.au>
2026-01-30 12:13:59 +00:00
Indan Zupancic
1415cac443 Add seL4_TCB_SetFlags Syscall
Add flags to tcb_t and the seL4_TCBFlag_fpuDisabled flag.

Enums are signed, make TCB flags word_t to make it unsigned.

Signed-off-by: Indan Zupancic <indan@nul.nu>
Signed-off-by: Corey Lewis <corey.lewis@proofcraft.systems>
2025-07-24 16:44:08 +10:00
Alwin Joshy
1253115999 hw debug api: aarch64 port
Adding support for the hardware debug API to
aarch64.

Signed-off-by: Alwin Joshy <joshyalwin@gmail.com>
2024-07-18 16:09:52 +10:00
Nick Spinale
a3f6be3c7c libsel4: add links in place of renamed XML files
This commit's parent renames the interface XML files.

The symlinks added in this commit serve to ease the transition to the
new names for downstream projects.

These links are added:

- include/interfaces/{sel4.xml -> object-api.xml}
- arch_include/*/interfaces/{sel4arch.xml -> object-api-arch.xml}
- sel4_arch_include/*/interfaces/{
    sel4arch.xml -> object-api-sel4-arch.xml
  }

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-06-30 18:28:12 +10:00
Nick Spinale
dbd6efc507 libsel4: rename interface XML files
Before, some object API XML files conflicted when the include,
arch_include, and sel4_arch_include directories were combined:

- include/interfaces/sel4.xml
- arch_include/*/interfaces/sel4arch.xml
- sel4_arch_include/*/interfaces/sel4arch.xml

This commit renames them to:

- include/interfaces/object-api.xml
- arch_include/*/interfaces/object-api-arch.xml
- sel4_arch_include/*/interfaces/object-api-sel4-arch.xml

Now, when the include, arch_include, and sel4_arch_include directories
are combined, we are left with:

- interfaces/object-api.xml
- interfaces/object-api-arch.xml
- interfaces/object-api-sel4-arch.xml

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2024-06-30 18:28:12 +10:00
hexcoder
15fa2cf9c2 manual: typos and style/grammar corrections
Co-authored-by: Gerwin Klein <gerwin.klein@proofcraft.systems>

Signed-off-by: hexcoder <heiko@hexco.de>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2024-06-17 19:24:20 +10:00
Birgit Brecknell
43690234f1 fix white spaces in <docref> tags
Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-22 09:02:23 +00:00
Birgit Brecknell
31e82e81da wrap docref references in <docref> tag
Signed-off-by: Birgit Brecknell <bbrcknl@gmail.com>
2024-03-22 09:02:23 +00:00
bbrcknl
cbf25791b7
make method names consistent (#1144)
* make method names consistent; delete duplicates

Signed-off-by: Birg <bbrcknl@github.com>
2024-01-19 14:25:02 +11:00
Birg
9a532efc15 change CPTR to CPtr
Signed-off-by: Birg <bbrcknl@github.com>
2023-12-06 10:41:28 +00:00
Birg
391bfb15f8 update some manual todos
Signed-off-by: Birg <bbrcknl@github.com>
2023-11-29 10:21:32 +00:00
Gerwin Klein
355f9abc15
sel4.xml: mark Set Space as MCS in the manual
Disambiguate (for the reader) between normal and mcs versions of
SetSpace in the manual. This does not yet solve doxygen confusion.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-11-07 16:13:28 +11:00
Ivan Velickovic
8fad907adc docs: clarify arch_flags in TCB register syscalls
For writing/reading/copying TCB registers, the
arch_flags parameter is not used on RISC-V (in
addition to x86 and ARM).

Signed-off-by: Ivan Velickovic <i.velickovic@unsw.edu.au>
2022-05-19 19:09:47 +10:00
matt rice
97610e1249 xml: remove condition attribute
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
accccf3dbb add condition elem, test it against condition attr
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
Axel Heider
649b63d32f align conditional syntax in xml
Use the same style everywhere to simplify parsing.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-01-19 09:32:01 +11:00
Gerwin Klein
51d3b824b8 manual: fix explanation of CNode_Mutate
Mutate cannot be used to badge endpoints (many years ago, before the
first public release, this was possible, but was removed).

Also explain why Mutate is not always replaceable with Mint+Delete.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-19 15:50:47 +11:00
Gerwin Klein
526206aabe libsel4 idl: error conditions of SchedContext bind
Add error conditions for the lazy bind of SchedContexts to
notifications or TCBs (introduced in e18e32e28e).

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-10-18 18:08:32 +11:00
Jimmy Brush
45344a9503 libsel4: idl: Fix more punctuation in errors
Signed-off-by: Jimmy Brush <code@jimmah.com>
2021-10-17 15:02:45 +11:00
Jimmy Brush
062eb3cb45 libsel4: idl: Fix punctuation in errors
Signed-off-by: Jimmy Brush <code@jimmah.com>
2021-10-17 15:02:45 +11:00
Jimmy Brush
33212ab556 libsel4: idl: Fix incorrect errors
Signed-off-by: Jimmy Brush <code@jimmah.com>
2021-10-17 15:02:45 +11:00
Jimmy Brush
73180e0e8d libsel4: Document errors in IDL
Also, remove any detailed discussion of error codes from method
descriptions.

Fixes #499

Signed-off-by: Jimmy Brush <code@jimmah.com>
2021-10-17 15:02:45 +11:00
Curtis Millar
afbea15710 mcs: Add sporadic flag to SchedControl_Configure
This adds a flags parameter to SchedControl_Configure to enable
configuration of a sporadic SC.

This also allows flags to be added in the future as needed without
breaking the API.

This allows the user to configure an SC either to be constrained as a
sporadic task where accumulated time is only delayed to when a task has
become runnable (implementing the sporadic server algorithm) or
whenever the task becomes the current executing task (implementing the
sliding-window constraint as in constant-bandwidth servers).

This can be used to prevent non-realtime tasks from exceeding bandwidth
under any circumstances, even in an over-committed configuration, whilst
also allowing work-conserving tasks to be configured in the same system.

To implement sporadic servers, we need to ensure that the suspension of
a task cannot be used as a mechanism to amplify budget of a task by
granting that task access to effectively multiple periods worth of
replenishments within a single period.

To align the implementation of SCs with the model of sporadic servers we
must delay available time until the release of a task. Within seL4, a
release would be any time where an SC changes from not being associated
with a Running, RunningVM, or Restart thread to one that is.

This can occur when an SC is bound to a new thread in such a state or
when a thread changes to such a state from any non-running states.

Critically, replenishments should not be delayed at the point when an SC
becomes the current SC (as was the case prior to this commit). This has
the effect of enforcing a continuous, constant bandwidth which is a
restriction that is incompatible with standard scheduling logic.

Accounting for this requires inserting a new refill_unblock_check
call whenever a sporadic SC is unblocked and removing the
refill_unblock_check call from when said SC is scheduled.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-14 15:24:40 +10:00
Gerwin Klein
79da079239 Convert license tags to SPDX identifiers
This commit also converts our own copyright headers to directly use
SPDX, but leaves all other copyright header intact, only adding the
SPDX ident. As far as possible this commit also merges multiple
Data61 copyright statements/headers into one for consistency.
2020-03-09 13:21:49 +08:00
Anna Lyons
7286a3f0a0 trivial: add correct section in docs 2019-08-22 11:22:39 +10:00
Anna Lyons
2329cd81dc mcs: add seL4_SchedContext_YieldTo
Implement seL4_SchedContext_YieldTo, which allows users to manipulate
the scheduling queues up to their MCP and can be used for user level
scheduling.
2019-08-22 11:22:38 +10:00
Anna Lyons
a38e62f2f9 mcs: timeout exceptions
- Add seL4_TCB_SetTimeoutEndpoint
- implement timeout exceptions
2019-08-22 11:22:38 +10:00
Anna Lyons
c405ef53d2 mcs: install fault endpoint into tcb cnode
- seL4_TCB_Configure no longer takes a fault endpoint.
- seL4_TCB_SetSpace takes a cap in the callers cspace for the
  fault endpoint, not the target tcbs.
- seL4_TCB_SetSchedParams now also takes a fault endpoint as above.

This change installs the fault endpoint cap into the tcb cnode
first validating it.

This means either of the functions that set it will now return an error
if the cap is not either a null cap or an endpoint with send and
grant rights.

Significantly, the cap passed to the function should be in the callers
cspace, not the target tcbs.
2019-08-22 11:22:38 +10:00
Anna Lyons
106b893ee0 mcs: configurable scheduling context size
This allows users to define custom amounts of refills without
increasing the scheduling context size system wide.

also add libsel4 functions for refill size
2019-08-22 11:22:38 +10:00
Anna Lyons
b3fca26ba8 trivial: fix error tags in sel4.xml 2019-08-22 11:22:37 +10:00
Anna Lyons
abcd5affb1 mcs: update manual
Major manual update with details of the MCS configuration option of the
kernel.
2019-08-22 11:22:37 +10:00
Anna Lyons
554f812da3 mcs: scheduling context donation over ipc
After this commit, threads blocked on an endpoint can recieve a
scheduling context from the thread that wakes the blocked thread.
2019-08-22 11:22:37 +10:00
Anna Lyons
34c1f920b1 mcs: add periodic scheduling
This commit adds periodic scheduling with sporadic servers.
2019-08-22 11:22:35 +10:00
Anna Lyons
952134d1b8 mcs: Add a scheduling context object
This is the first part of the seL4 MCS. This commit:

    * adds a scheduling context object. Threads without scheduling
      context objects cannot be scheduled.
    * replaces tcbTimeSlice with the scheduling context object
    * adds seL4_SchedControl caps for each core
    * adds seL4_SchedControl_Configure which allows users to configure
      amount of ticks a scheduling context has, and set a core for the
      scheduling context.
    * adds seL4_SchedContext_Bind, Unbind and UnbindObject, which allows
      a tcb to be bound to a scheduling context.
2019-08-22 11:22:34 +10:00
Japheth Lim
a8879f0159 manual: document badge range for 64-bit platforms 2019-02-19 12:16:27 +11:00
Kofi Doku Atuah
fb854a7b14 Strongly type these interface arguments 2018-12-05 10:43:40 +11:00
Kofi Doku Atuah
a96e005924 TCB API: Fix minor discrepancy: seL4_CNode was used for VSpace roots 2018-11-06 10:40:17 +11:00
Anna Lyons
5539b9e8b3 docs: s/depth of 32/depth equivalent to the wordsize 2018-09-19 12:06:35 +10:00
Adrian Danis
e20e8e05ac SELFOUR-823: Provide TCB invocation for setting TLS_BASE
This provides a common invocation for all architectures for setting their respective
TLS_BASE virtual register. As you frequently want to modify your *own* TLS_BASE, and
doing read/write registers to modify your own registers is tricky to impossible
depending on which register and how they are ordered in seL4_UserContext, this is a
separate invocation.
2018-07-03 13:34:59 +10:00
Adam Felizzi
c232025629 libsel4: Removed use of parentheses in XML docs
Removed use of parentheses in sel4.xml around \texttt tag as it
deforms markdown generated output.
2018-05-01 16:09:13 +10:00
Adam Felizzi
8fd604eb13 manual: Added <docref> XML Tag to Doxygen
Introduced a new Doxygen XML tag '<docref>'. The intention of
this tag is to indicate a section of text in the Doxygen XML that
will contain a reference to another section in the Manual e.g.
"See \autoref<sec:x>". As other generation formats aren't aware of
other chapters/sections in the manual, the <docref> encapsulation
allows it to omit the text from the output. The Latex generator
has been modified to continue parsing the 'docref' contents.
2018-05-01 12:28:03 +10:00
Anna Lyons
33398f2191 SELFOUR-331: add seL4_TCB_SetSchedParams
This allows the prio and mcp to be set in one system call.
2018-02-26 11:24:42 +11:00
Anna Lyons
46ddf1ab6b Change prio, mcp to seL4_Word from Uint8_t
Although seL4_MaxPrio does fit into 8 bits, making
the argument 8 bits is not saving us anything.
2018-02-26 11:24:22 +11:00
Anna Lyons
05b83acd95 SELFOUR-1016: Require auth cap to set prio/mcp
This fixes confused deputy problem when setting priorities/mcps.
2018-02-26 11:24:22 +11:00
Adrian Danis
8108c811ed libsel4: Remove bitfield type unifying Guard and Badge construction
Using the bitfield generator to treat guards and badges as a union type can be convenient,
but it requires reserving a bit in the data for the bitfield run time type information.
This type information is not needed by the kernel as it knows implicitly whether the passed
data is a badge or a guard based on the kind of cap being operated on. However, with the
type information present we cannot pass a word sized piece of data to the kernel.

The solution here is to go back to using a plain seL4_Word as the type for invocations
that want a capdata and let the user either construct a badge as a plain word, or use
the seL4_CNode_CapData bitfield for constructing a guard, although they have to manually extract
the word representation out of it.
2017-10-27 12:15:09 +11:00
Anna Lyons
192a4162ee manual: allow non sec autorefs
Previously anything in an autoref block was assumed to reference
a section, which isn't true. Change 'sec' to 'label' and move the
'sec' prefix into the label itself.
2017-06-27 16:22:34 +10:00
Anna Lyons
07f948331f libsel4: fix licenses
- some were incorrectly marked GPL (libsel4 is BSD)
- update NICTA --> DATA61 etc
- fix tags D61 --> DATA61
- update year to 2017
2017-06-22 15:27:29 +10:00
Stephen Sherratt
c206dda4c7 manual: Remove errorenumdesc docs from sel4 idl
Methods with no output params return an error. Previously each such
method had a line of documentation in its interface definition
explaining this. This commit removes this. The documentation is
for such cases is generated implicitly.
2017-06-02 15:34:45 +10:00
Anna Lyons
3230c90076 SELFOUR-708: fix priority docs on TCBConfigure 2017-05-25 10:57:55 +10:00