Commit graph

178 commits

Author SHA1 Message Date
Luca(Wei) Chen
c06df578f2 ARM: Add support to flush L1 caches
Extend the existing seL4_BenchmarkFlushCaches without modifing the usage
of it. Will be used in sel4bench to measure the cold cache performance.
2020-02-11 11:23:04 +11:00
Edward Pierzchalski
335b4497aa Make padding word-size independent
An unfortunate hack that lets us specify padding within one
`sizeof(seL4_Word)`-sized chunk of a struct, indpendently of the size of
a word.
2019-12-19 15:50:40 +11:00
Edward Pierzchalski
7054225e8f Name anonymous structs
Translation validation reports errors using the "real" struct type name
instead of the typedef name, so having anonymous structs makes debugging
translation validation harder.
2019-12-18 18:20:45 +11:00
maybe-sybr
735b154abb Use autoconf definition for RetypeMaxObjects def
Relates to #168. The definition for `seL4_UntypedRetypeMaxObjects` lives
in the UAPI `types.h` but appears to have no link to the value actually
used by the kernel, which is configurable. This change sets the UAPI
definition to the generated definition from the kernel config steps and
defaults to the previous fixed value if, for some reason, the configured
definition is not available.
2019-12-02 17:42:13 +11:00
Kent McLeod
3b12f529d7 libsel4: Expose mcs constants to non-C files
Use the __ASSEMBLER__ macro to suppress C definitions from appearing in
non-C files when the preprocessor is used. Other libsel4/*/constants.h
files use this strategy to avoid duplicating definitions for seL4 object
sizes that can changed based on kernel configuration.
2019-08-22 13:32:11 +10: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
Sylvain Gauthier
49d3f2202d [SMP/Debug] New syscall to send arbitrary SGIs
Created a new syscall, seL4_DebugSendIPI for ARM to send arbitrary SGIs
(software generated interrupts) to arbitrary cores. As SGIs are
specifically PPIs (private interrupts), this syscall effectively allows
to trigger PPIs on arbitrary cores, for debug/testing purposes.
2019-07-19 16:35:57 +10:00
Curtis Millar
150916640e Add syscall for setting the current TLS register.
Some platforms and configurations do not allow user code to change the
value of the register used for TLS. On these architectures a syscall can
be used to allow the kernel to update the register on their behalf.

This does not immediately update the value in the user context on many
configurations as the values are only stored in the user context on a
context switch.
2019-07-01 11:17:49 +10:00
Curtis Millar
b6417f2150 Remove platform IPC buffer register.
This removes the assumption that each platform sotres the IPC buffer
address in a platform-specific register. The IPC buffer address is
instead stored in a thread-local variable in libsel4 which must be
initialised by the runtime.
2019-07-01 10:46:46 +10:00
Damon Lee
f4f375ff59 trivial: Add SEL4_BOOTINFO_HEADER_NUM 2019-06-17 16:52:38 +10:00
Sylvain Gauthier
d2eeace9ed Benchmark: specify on which core IRQ was delivered
Add a core field in the log entries to log on which core an interrupt
was delivered.
2019-05-20 10:01:40 +10:00
Sylvain Gauthier
0ab7f00188 Preliminary fix in benchmark_track_types
A few fixes in the benchmark code: missing include of <stdint.h> and a
a PACKED macro that should be SEL4_PACKED.
2019-05-20 10:01:40 +10:00
Simon Shields
d8c9069c0a add FDT extended bootinfo type
FDT is not platform specific (and used on RISC-V and ARM), so this
bootinfo type isn't either.
2019-05-01 12:18:52 +10:00
Kent McLeod
f85774e36f Rename shared_types*.bf files to be consistent
Now these bitfield definitions are generated from the same source file
in the kernel and libsel4, and also result in the same include path: <sel4/shared_types_gen.h>
2019-03-21 12:43:43 +11:00
Anna Lyons
7fc45c4ef1 style: set code width to 120 2019-03-19 14:05:44 +11:00
Anna Lyons
d0930f67de style: consistently attach return type
Add attach-return-type to astyle
2019-03-19 14:05:36 +11:00
Anna Lyons
761006e03b style: consistently align pointer with name
Run astyle with align-pointer=name
2019-03-19 14:04:54 +11:00
Anna Lyons
3d10ef0c4d style: correct parenthesis padding
Use astyle's unpad-paren to unpad all parentheses that are not included
by pad-header, pad-oper, and pad-comma.
2019-03-19 14:02:59 +11:00
Japheth Lim
a8879f0159 manual: document badge range for 64-bit platforms 2019-02-19 12:16:27 +11:00
Thibaut Pérami
2f43788b82 libsel4: add seL4_CapRightsBits 2018-12-12 14:20:37 +11:00
Thibaut Perami
3df00ea4d7 SELFOUR-6: Add GrantReply to the rights system.
GrantReply is a new access right added to endpoint capabilities, which
allows seL4_Call to be used on those capabilities (specifically, it
allows reply caps *only* to be granted across endpoints).

Prior to the addition of GrantReply, endpoint capabilities required the
Grant access right, which allowed any arbitrary capabilitiy to be
transferred over an endpoint. Using GrantReply, systems can now be
constructed where threads using seL4_Call over an endpoint do not need to be in the same
security subsystem.
2018-12-12 14:04:28 +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
Thomas Sewell
fa4568ed2d Drop SEL4_PACKED from types used by seL4.
It has become clear that the 'packed' GCC attribute affects the
memory semantics of C in a way that the verification tools do not
understand. The bootinfo types are used by kernel boot code (not
currently verified, but covered by binary verification) and should
not use this attribute.

This is a source-compatible but not binary-compatible change.
2018-08-10 16:18:58 +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
Anna Lyons
1b0a7181fc manual: s/Polling Send/Non-Blocking Send
Clearer terminology
2018-05-08 14:50:36 +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
Adrian Danis
de42f82691 x86: Introduce IO port control caps
Changes the way IO ports work such that instead of 'minting' IO port caps down into new
IO port caps with smaller ranges new IO port ranges must be allocated centrally from
an IO port control cap. This mechanism acts in a very similar fashion as IRQ handler/control
capabilities and ensures that allocated IO ports do not overlap. Disallowing overlapping
IO ports is necessary to ensure the CDT remains valid as capabilities are deleted.
2018-04-24 14:04:46 +10:00
Matthew Brecknell
6f3f2579e6 x64: extend label bitfield to remove padding from seL4_MessageInfo
Although the C kernel examines (and may modify) some bits of the message
info register, all remaining bits are treated as user data, which the
kernel passes through IPC unmodified.

The seL4_MessageInfo register describes the message info register. The
kernel examines fields `length`, `extraCaps` and `capsUnwrapped`, while
the `label` field represents bits available to the user. However, in
reality, the user may also use any padding bits for user data, since the
kernel also passes these through IPC unmodified.

For verification, we would like to phrase specifications in terms of the
bitfield definition, and so we would like the `label` field to
incorporate all of the bits which the kernel treats as user data.

This commit therefore extends the `label` field across the bits which
were previously marked as padding.
2018-04-13 08:09:21 +10:00
Bruce Mitchener
b942a50441 Fix trivial comment typos. 2018-03-27 10:51:26 +11: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
ce2efb33c8 Remove archInfo from bootinfo
With extended bootinfo providing a more flexible and extensible form of archInfo this
member can be retired.
2018-02-23 13:55:26 +11:00
Adrian Danis
9a10cfac3d x86: Define tsc frequency bootinfo header 2018-02-23 13:54:04 +11:00
Adrian Danis
eec02fd223 x86: Dangerous read/write MSR interface
Provides a syscall interface for reading and writing arbitrary MSR values. This is
being introduced as an alternative to the DebugRun, as the main purpose of debug run
is for modifying the performance monitoring events via read/write MSR.
2018-01-17 16:35:39 +11:00
Anna Lyons
4e620499c8 Minor fixes to syscall.xml
- update comment to reflect behaviour (it's #if condition not #ifdef
name)
- remove redundant xml
2018-01-15 14:16:47 +11:00
Hesham Almatary
3f862cbfe0 Fix: Guard seL4_DebugDumpScheduler with PRINTING instead of DEBUG
Definitions of seL4_DebugDumpScheduler (for each arch) guard
seL4_DebugDumpScheduler with PRINTING and not DEBUG.
2017-12-07 14:55:34 +11:00
Alexander Boettcher
734320d717 x86: add framebuffer info of MBI2 via boot_info 2017-11-30 22:54:01 +01:00