Commit graph

27 commits

Author SHA1 Message Date
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
Curtis Millar
18219bbedf mcs: RISC-V uses 39-bit addressing in stuctures.bf
RISC-V uses 39-bit virtual addressing rather than 48 bits so the
'high' bits of a pointer can be 39 or fewer bits on RISCV rather than
48.
2019-08-27 10:46:13 +10:00
Curtis Millar
af34037edb trivial: spelling of the word 'canonical' 2019-08-27 10:46:13 +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
a22cb3d102 mcs: associate scheduling context + ntfn
This commit allows scheduling contexts to be bound
to notification objects. When a passive server
receives a notification it will receive the scheduling
context from the notification. When the server
blocks the scheduling context is returned.
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
121943c3c7 [SMP] Added PPI support for gic_v2
Correctly defined the macros to translate between virtual and hardware
IRQs such that PPIs can be properly handled on gic_v2. It is now
possible to create a per-core handler for PPIs on platforms using this
GIC.
2019-07-19 16:37:03 +10:00
Anna Lyons
f3d0eb20f6 Update seL4_FaultType to 4
With the increased faults on various configurations (hyp, mcs) we need
more bits to identify faults.
2019-06-18 15:14:03 +10:00
Jesse Millwood
76bf1d2bcd Changed padding and capIRQ in irq_hander_cap structure
This is for the new GIC code

Change-Id: I64fd20767e9b46b3300d87397c72e4e55d386746
2019-03-27 11:16:12 +11:00
Kent McLeod
c1b1d07579 bitfields: Split definition cannonical addresses
These shared objects have different definitions based on the cannonical
address of the virtual memory system.
2019-02-08 17:17:02 +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
Adrian Danis
ee96314840 x64: Declare virtual addresses as 48-bits instead of 49-bits
In f6d367e8df virtual addresses were changed from 48
bits to 49 bits, but this does not seem necessary and the commit does not have enough
detail to justify the change. As such it is being changed back to 48 bits in this
commit, which is far less confusing and results on the bitfield generated functions
switching on bit 47 to determine sign extension (instead of bit 48), which matches
what the hardware description says should be done.
2017-12-19 16:13:08 +11:00
Adrian Danis
15c0f0eb75 Increase badge size for endpoints on 64-bit platforms
This unifies the badge size of endpoints and notifications on 64-bit platforms to a
consistent 64-bits, and also changes the libsel4 definitions to match for both.
2017-10-27 12:15:09 +11: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
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
Anna Lyons
40c61e5c18 Fix licenses (the rest) 2017-06-22 15:29:12 +10:00
Anna Lyons
37fef55a27 trivial: remove unused 'bound' field from ntfn 2017-04-11 13:59:54 +10:00
Adrian Danis
f6d367e8df x64: Allow full 48bits of virtual address space to be used
Prior to this commit virtual addresses in the bitfield were considered
to be 48-bits, with sign extension to 64-bits. This meant that we were
actually sign extended bit number 47. Whilst this gives correct cannonical
addresses it prevents a portion of the address space from being used.

This commit changes the bitfield to use 49-bit virtual addresses, so that
after the bit 48 is used for sign extension there is still 48-bits of
usable address.
2017-01-27 12:21:07 +11:00
Donny Yang
df977382f0 x64: Rearrange endpoint_cap structure to improve fastpath speed
This looks like we're just swapping the positions of capEPBadge and capEPPtr,
but it turns out that the bitwise op being performed on capEPPtr to set the
high bits were part of the data dependency critical path, so this actually
does improve the speed by moving the bitwise op to capEPBadge (albeit it's
now an AND instead of an OR)

I initially set the field size to 32 bits, but it turns out that causes gcc
to emit an instruction (mov r32, r32) that causes the instruction decoder
to switch to the legacy decode path for the rest of the fast path for some
reason.
2017-01-10 17:17:20 +11:00
Donny Yang
c68a69f82a x64: Rearrange cnode_cap structure to improve fastpath speed 2017-01-10 16:57:57 +11:00
Adrian Danis
811800da3e x64: Efficiently pack objects for fastpath
Improves the packing of structures used in the fastpath
2016-11-25 16:26:24 +11:00
Anna Lyons
b827ad37ba SELFOUR-413: refactor libsel4 fault API
This is a *breaking API change*

This commit:

* makes seL4_Fault_tag_t common between the kernel and libsel4
* deprecates the existing functions from sel4/messages.h includes
* introduces a new fault API in sel4/faults.h and
* sel4/sel4_arch/faults.h
* deprecates seL4_GetTag(), as the function did not work without
  the user calling seL4_SetTag() first (seL4_MessageInfo is passed
  in registers and not set in the IPC buffer)
* removes previously deprecated functions (deprecated prior to 3.0.0)
* updates the seL4 manual to reflect the changes
2016-11-25 12:29:07 +11:00
Adrian Danis
6d07c44329 x64: Partial hardware breakpoint support
This only implementes debug support if using the SYSCALL kernel invocation
method, will not work yet with SYSENTER
2016-10-12 13:38:37 +11:00
Adrian Danis
7f9970e5e2 x64: Add x86_64 support 2016-10-12 12:22:31 +11:00