Commit graph

128 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
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
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
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
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
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
Anna Lyons
1b0a7181fc manual: s/Polling Send/Non-Blocking Send
Clearer terminology
2018-05-08 14:50:36 +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
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
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
Bamboo
bbb9717cd8 [STYLE_FIX] 2017-10-27 01:30:35 +00:00
Adrian Danis
b5854775a5 Increase size of guards on 64-bit platforms
The maximum guard size was unnecessarily restricted to 18 bits as it is on 32-bit
platforms. This change increases it to the current maximum possible of 58 bits.
The 58-bit limitation exists due to the need to encode a guard+guardsize into a
single word for cnode invocations.
2017-10-27 12:15:09 +11:00
Adrian Danis
2a70716833 libsel4: Make guard and badge definitions mode specific
The definitions of guard and badge sizes is going to be changed for 64-bit platforms,
this change provides an easy way of providing different definitions
2017-10-27 12:15:09 +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
Adrian Danis
2e6cadd9f0 Rename cnode_capdata to seL4_CNode_CapData
The purpose of renaming this type is to match the style of the other shared types in libsel4.
Previously its name was fine as this was a private kernel type.
2017-10-27 12:14:44 +11:00
Adrian Danis
5f4640dc6c Move cnode_capdata to libsel4 shared types bitfield
This data structure is meant to be the user visible format of the data for a cnode_cap,
yet it is defined in a kernel only bitfield file. Moving it to libsel4 opens up the
possibility of consolidating the definitions in libsel4
2017-10-27 12:14:44 +11:00
Alexander Boettcher
023977fc4b x86: Provide copy of RSDP in bootinfo
This gives a rootserver a way to find the ACPI tables in cases where there is no BIOS region
to scan for an RSDP.
2017-10-06 10:08:46 +11:00
Adrian Danis
7468ed450c Merge branch benchmark into master 2017-10-04 17:41:04 +11:00
Adrian Danis
567127defe manual: Expand parts of the x86 virtualisation documentation
This provides documentation for kernel design of the x86 virtualisation, the additional
syscall and object invocations. The ARM design is not fully expanded.
2017-09-18 14:01:46 +10:00
Alexander Boettcher
a3b0bd5c4f benchmark: support reading out idle cpu time on remote cpu
Fixes #68
2017-09-04 12:50:42 +02: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
Anna Lyons
1b9b1292c7 seL4_DebugDumpScheduler: add docs 2017-06-19 14:44:22 +10:00
Anna Lyons
10801bd891 SELFOUR-962: allow API level description in manual 2017-06-19 13:59:08 +10:00