Commit graph

684 commits

Author SHA1 Message Date
Axel Heider
e7268f92db libsel4: check constants against types
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
11c435b803 libsel4: unify definitions in simple_types.h
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
02afe87a55 libsel4: use _Static_assert() if available
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
c3a2a87e42 libsel4: cleanup macros.h
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
e86364c975 libsel4: add missing macros.h include
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
ffa5c74666 libsel4: remove HAVE_AUTOCONF
Today the file autoconf.h is created by the CMake build system and thus
HAVE_AUTOCONF is always defined. Time to get rid of some legacy by
removing the check if HAVE_AUTOCONF is set.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Axel Heider
73bde900b1 trivial: remove empty lines
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-04-01 10:33:41 +10:00
Lukas Graber
2a0e5a2a1f Bring Raspberry Pi 4 (RPi4) support
Signed-off-by: Lukas Graber <lukas.graber@hensoldt-cyber.de>
2021-03-22 11:41:03 +11:00
Kent McLeod
4bd4bbac13 Remove HAVE_AUTOCONF guard in sel4/config.h
This option was legacy from when autoconf.h wasn't always present in the
include path. Now it causes incorrect configuration options.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-03-08 14:39:27 +11:00
Axel Heider
800b2444a1 trivial: style and formatting
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-03 11:47:23 +01:00
Oliver Scott
7f37417646 ia32: remove redundant deference
In `seL4_X86DangerousRDMSR` on ia32.
2021-02-02 13:32:26 +11:00
Kent McLeod
e798f0e7b0 libsel4: Remove weak def of __sel4_ipc_buffer
This symbol definition leads to an additional thread local storage
allocation for each object file that includes this header file. Then
when the final executable is linked, the weak symbol references are all
replaced by the global symbol declared by libsel4 in sel4_bootinfo.c.
The net result is unnecessarily large thread local storage being
required for each thread.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-12-08 09:56:49 +11:00
Curtis Millar
0d35551966
riscv: Implement benchmark log buffer
Can now perform benchmarks on the kernel using the log buffer to trace
kernel behavior.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-12-03 10:31:16 +11:00
Curtis Millar
1ce721b418
Move config header to libsel4
This makes the kernel configuration defaults public and known to the
user level. Generally shouldn't depend on these definitions outside of
code testing and benchmarking the kernel.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2020-11-10 16:24:44 +11:00
Kent McLeod
0101071f70 smmuv2: Reserve VSpace slot for holding CB count
A slot in the top level VSpace page table is used to hold the number of
SMMUv2 ContextBanks that are assigned to a VSpace. This means a
reduction of available virtual addresses at userlevel as the slot cannot
be used for holding regular mappings.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-11-03 10:14:46 +11:00
Oliver Scott
6ad15c0f45 trivial: clean up code for C parser
Remove unused cases and add break in switch statements.
Add conditions to sel4arch.xml.
Change guard in capdl printing to correct TK1_SMMU.
Set KernelArmSMMU default to off.
Add types to aarch32 syscall_stub_gen.py.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Kent McLeod
5a7d96a46c SMMU: Add initial write up of design documentation
- Add a chapter in the Hardware I/O Section
- Link API documentation back to chapter.

Co-authored-by: Qian Ge <Qian.Ge@data61.csiro.au>
Signed-off-by: Kent McLeod <kent@kry10.com>
2020-10-28 17:30:42 +11:00
Oliver Scott
c66d9cee7a trivial: style and comment
Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
81f9a88ff7 SMMU: supporting probing fault status
Providing system calls that enquiry the fault status in context
banks and in SMMU overall.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
1ef6e6c724 SMMU: supporting unbind context banks
Providing system calls on stream ID caps that unbinds its
context banks. Any future transaction using this stream ID
will result on faluts.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
38ed1046e1 SMMU: supporting unassign vspace in context banks
Providing a system call that removes an assigned vspace root from its
context bank. This operation causes the context bank being disabled
as it does not have a valid vspace root after the unassignment.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
b07ea94c0c SMMU: TLB invalidation system calls
Providing system calls for conducting TLB invalidation operations
on all TLB entries or entries in a context bank.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
6e5911172c SMMU: binding stream ID to context banks
Providing system calls that binds context banks to stream IDs.
Once the stream ID is bound, the transaction using that SID is
enabled.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
73e062bd45 SMMU: assigning vspace to context banks
Supporting user-level applications to assign vsapce root to context
banks through system calls. This commit also configures the context
bank according to stage 1 or stage 2 requirement.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
0cf122a040 SMMU: system calls for creating SID and CB caps
Providing system calls on stream ID control cap and context bank
control cap for creating stream ID and context bank caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
7316bfc676 SMMU: providing master control caps to root task
Adding the master control caps that are used to create transaction
and context banks caps. This commit includes the internal kernel
structure that required to manage any created transaction and
context bank caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
1a9756f65b SMMU: basic driver for init and probing
Introducing the driver in kernel for detecting SMMU features
and initialise the hardware.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Jesse Millwood
b77c9b2051 PolarFire SoC: Initial support for platform
Signed-off-by: Jesse Millwood <jesse.millwood@dornerworks.com>
2020-10-28 08:33:05 +10:00
Kent McLeod
b86bce2d4b aarch64,cortex-a53,hyp: Reduce seL4_UserTop value
This ensures that no frames can be mapped that would overwrite the
currently stored VMID for the vspace.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-10-16 14:38:31 +11:00
Curtis Millar
40edd02c22 trivial: Use correct configuration for TLS base
Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-10-12 15:21:43 +11:00
Gerwin Klein
5c1b81d9bb libsel4: fix license tags
These files should have been released under BSD-2-Clause in the first
place (as per parent LICENSE.md file).

Closes #245

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-09-04 20:30:01 +08:00
Stefan O'Rear
5a341610c4 Do not generate data symbols for enums
With clang 11 these become bss symbols rather than commons, resulting in
multiple definition errors at link time.  gcc 10 is likely to expose the
same issue.

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>
2020-08-26 12:48:00 +10:00
Kent McLeod
e1f6cf0ab0 Add 2 new benchmark utilization syscalls
- seL4_BenchmarkDumpAllThreadsUtilisation: Prints a JSON formatted
record of total and per-thread utilisation statistics about the system.
This currently includes a thread's total cycles scheduled, total number
of times scheduled, total cycles spent in the kernel and total number of
times entering the kernel and then totals of each for all threads on the
current core.
- seL4_BenchmarkResetAllThreadsUtilisation: Resets the current counts of
every user thread on the current core.

These syscalls are only available in a Debug build configuration as they
use a kernel debug list of all of the threads that exist for a given
node.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-07-15 15:15:27 +10:00
Kent McLeod
88a7d138c4 KernelBenchmarksTrackUtilisation: Add more stats
For each thread also track number of times scheduled, number of kernel
entries and amount of cycles spent inside the kernel.  Also add
core-wide totals for each.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-07-15 15:15:27 +10:00
Kent McLeod
00a9ba9123 aarch32: Move tpidruro from vcpu to tcb context
This register is visible to software executing at PL0 but not writeable.
Storing it in the VCPU context required custom save/restore handling as
it had to be explicitly handled when switching from a VCPU thread to a
non-VCPU thread so that it didn't become a channel. It is possible to
now update this register via seL4_TCB_WriteRegisters for software
executing at PL0.

This also fixes a bug where if a vcpu-thread is switched for a
non-vcpu-thread and then switched to a different vcpu-thread the
original vcpu-thread's copy of this register will get set to 0.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-05-15 12:04:39 +10:00
Yanyan Shen
4006310e68 riscv: Add FPU state in TCB
Add FPU state storage in TCB and increase TCB size bits when FPU
is enabled.

Signed-off-by: Yanyan Shen <yanyan.shen@data61.csiro.au>
2020-05-07 13:48:26 +10:00
Kent McLeod
0c88f21aaf libsel4,riscv: Remove seL4_UserException_FLAGS
This field is unused and is never set to anything by the kernel. Other
architecture definitions of seL4_UserException_Msg contain an equivalent
field for a current-program-status-register-like register that the fault
handler can read and modify as part of fault handling. RISC-V's
equivalent register SSTATUS doesn't contain any fields that would be
useful for a fault handler to modify at this stage and so the register
isn't transferred in the fault.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-04-16 15:19:54 +10:00
Kent McLeod
7cc1142c7a aarch64,vcpu: Add CNTKCTL_EL1 register to vcpu_t
This register is accessible from EL1 and affects whether Generic Timer
registers are accessible from EL0. When switching out of guests, the
kernel needs to restore the correct access for native threads.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-04-09 15:52:31 +10:00
Saer Debel
a221ee1ca8 Enabled IPC debug features under new config
Introduced a new config flag to enable
userError format strings to be written to the IPC buffer.
Another config bool has been introduced to toggle
printing the error out and this can also be set at runtime.

Signed-off-by: Saer Debel <saer.debel@data61.csiro.au>
2020-04-06 14:21:46 +10:00
Saer Debel
9dad7382e1 userError string written to IPC buffer
The format string in userError is now written to
the IPC buffer for debugging purposes.
This requires an snprintf which reuses vprintf with
a new structure for handling how output is done.

Signed-off-by: Saer Debel <saer.debel@data61.csiro.au>
2020-04-06 12:57:04 +10:00
Qian Ge
c0a2b666d4 fixing missed header files
This is the second commit for replacing ifndef with pargma
once in kernel header files. A few header files are missed
in the first round, hence this commit.
2020-03-23 13:11:51 +11:00
Qian Ge
512a0200de replacing all ifndef with pargma once
All the kernel header files now use pargma once rather than the ifndef,
as the pre-processed C files do not change while header files
are protected with pargma once. This will also solve any naming issues
caused by ifndef.
2020-03-23 11:04:46 +11:00
Stephen Sherratt
39dd11b113 Fix python warning in syscall stub generator
The "is" keyword compares addresses. "==" compares values.
2020-03-11 14:55:40 +11: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
Alison Felizzi
bddd405417 arm: Added define for VMPIDR and VMPIDR_EL2
Added constant definitions for the VMPIDR (arm32) and VMPIDR_EL2
(arm64) registers. These being vcpu registers that can be
written, read, saved and restored. The 'Virtualization Multiprocessor
ID Register' (VMPIDR) is needed to program a vcpu's affinity during
initialisation. This is currently only exposed on SMP configurations.

Co-authored-by: Anna Lyons <anna@gh.st>
2020-02-20 12:52:59 +11:00
Kent McLeod
232b0e86b5 arm_hyp: Move PGD definitions out of libsel4
The PGD constants refer to the top level mapping object used by the
kernel for its own private mappings. Userlevel cannot create any PGD
objects and so these constants don't belong in libsel4.
2020-02-20 11:41:00 +11:00
Alison Felizzi
71d636f8b3 arm_hyp: Save and restore vtimer state on switches
Added support for reading and writing additional virtual timer
registers for vcpu hw read and write accesses. These include the
compare value register (CNTV_CVAL) and offset register (CNTV_OFF),
each represented as two 32 bit (high and low) registers on aarch32 and
as single 64 bit registers on aarch64.

Added support for explicitly saving and restoring the virtual
timer registers when the vcpu is enabled and disabled. This
ensures when the vcpu is switched in and out, the virtual timer
registers are restored to a state that is consistent to when
it was last run.

By default the CNTVOFF register will be updated by the kernel to
accumulate the time the VCPU is not running. From the guest this will
result in the VCNT register not increasing when the VCPU is suspended.
This behavior can be turned off by disabling the
KernelArmVtimerUpdateVOffset config option.
2020-02-20 11:40:59 +11:00
Alison Felizzi
f795e7c0ec arm: New virtual PPI event fault type
This commit introduces a new fault type, seL4_Fault_VPPIEvent.

This change means the kernel can reserve PPI interrupts and virtualise
them via delivering the irq to the active vcpu through a
specific fault. This enables multiplexing PPI IRQs across multiple VCPUS
which requires correctly masking and unmasking the IRQ depending on
which VCPU is running.

A new VCPU invocation, seL4_ARM_VCPU_AckVPPI is also added for
acknowledging the handling of the IRQ. This takes an IRQ as a parameter
but will only accept IRQ numbers that are sent as VPPIEvent faults.

Co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
Co-authored-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-02-20 11:40:59 +11:00
Kent McLeod
4cb3414def aarch64: Add missing faults to seL4_getArchFault
seL4_getArchFault is a libsel4 helper that constructs fault messages out
of the IPC buffer message registers. Aarch64 was missing a few types.
2020-02-20 11:40:59 +11:00
Siwei Zhuang
dadfb1b6f3 trivial: Bugfix, use the correct config macro
Use the correct config macro to enable code injection.
2020-02-12 12:36:57 +11:00
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
Curtis Millar
2d40b0d5df riscv32 does not support huge pages
For some reason the kernel documented and maintained constants for a
512MiB 'huge page' in riscv32 which is not part of the specification.

The references and constants are removed
2020-02-10 15:01:43 +11:00
Jimmy Brush
b4e529ab2c trivial: arm: Improve object method docs 2020-01-06 16:14:02 +11:00
Jimmy Brush
7b44ef9277 aarch64: Fix seL4_ARM_PageDirectory interface doc
It is passed a vspace cap not an upper page directory cap
2020-01-06 16:14:01 +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
Siwei Zhuang
249bcdab63 riscv: Add support for Rocketchip SoC
Support Rocketchip SoC maps to Xilinx ZC706 board and ZCU102 board
2019-11-26 18:34:50 +11:00
Siwei Zhuang
6e3606d056 RISCV: Add support for Ariane SoC
Support Ariane SoC platform running on Genesys 2 FPGA board.
2019-11-05 12:15:31 +11:00
Oliver Scott
9abe8a4f0b add support for rockpro64
Kernel support for 64 bit rockpro board.
Dts was taken from the linux kernel.
2019-10-25 14:18:20 +11:00
Sylvain Gauthier
5ffb2a1bc1 Added the new virt platform
`virt` is a QEMU virtual platform that support 3 ARM CPUs.
2019-10-14 15:46:08 +11:00
amrzar
a4d6bf850c SELFOUR-161: Merge Page_Remap with Page_Map
- Remove Remap function from seL4 API for arm, x86, riscv and the
respective invocation implementation.
- Update Map as replacement for Remap
- Update manual

This allows a change of rights if the frame being mapped is already
mapped in at the given vaddr. To map a page to a different address,
unmap it first.

Co-authored-by: Hesham Almatary <hesham.almatary@data61.csiro.au>
Co-authored-by: Anna Lyons <Anna.Lyons@data61.csiro.au>
Co-authored-by: Victor Phan <Victor.Phan@data61.csiro.au>
Co-authored-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2019-10-10 15:54:23 +11:00
Kent McLeod
8234026c1f aarch64: Move tpidrro_el0 from vcpu to tcb context
This register is visible to software executing at EL0 but not writeable.
Storing it in the VCPU context required custom save/restore handling as
it had to be explicitly handled when switching from a VCPU thread to a
non-VCPU thread so that it didn't become a channel. It is possible to
now update this register via seL4_TCB_WriteRegisters for software
executing at EL0.

This also fixes a potential bug where if a vcpu-thread is switched for a
non-vcpu-thread and then switched to a different vcpu-thread the
original vcpu-thread's copy of this register will get set to 0.
2019-09-19 11:39:14 +10:00
Curtis Millar
97782dcfb0 mcs: Update size constants for RISC-V
Update the notification size constant for the larger notification of MCS
and add the constant for the size of the reply object.
2019-08-27 10:46:13 +10:00
Curtis Millar
d869b3adb7 mcs: Timeout fault and reply for RISC-V
Add fault and reply for timeout faults on RISC-V.
2019-08-27 10:46:13 +10:00
Curtis Millar
c45f2f0169 mcs: libsel4 for RISC-V
This uses the aarch64 code as a basis for implementing the full set of
new and updated libsel4 functions for RISC-V.
2019-08-27 10:46:13 +10: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
Kent McLeod
258d9d0b64 libsel4: Correct call for seL4_X86DangerousRDMSR
x64_sys_recv now requires an additional argument that is used for MCS
and ignored for mainline.
2019-08-22 13:24:52 +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
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
Kent McLeod
c8b81c28ba libsel4: Don't use userData for storing IPC buffer
userData is no longer needed to hold a reference to the IPC buffer. The
IPC buffer is now available as a thread local variable.
2019-08-13 15:31:11 +10:00
Anna Lyons
bc61a7f3bd python2 --> python3
Update all scripts and build system to call python3, given python2's
upcoming doom. Use sys.maxsize instead of sys.maxint in one script
(maxint does not exist in python3).
2019-08-08 10:19:24 +10:00
Anna Lyons
b1788e02d5 aarch64: add support for 40-bit PA
This commit adds support for using a 40-bit physical addresses in
aarch64-hyp mode.

40-bit PA support is implemented by using a 3-stage translation, with a
13 bit page upper directory as the vspace root. PageGlobalDirectories
are not used in this configuration.

To use 40-bit PAs, platforms should set KernelArmPASizeBits40 to ON.

Co-authored-by: Yanyan Shen <yanyan.shen@data61.csiro.au>
Co-authored-by: Chris Guikema <chris.guikema@dornerworks.com>
2019-07-25 10:30:45 +10:00
Anna Lyons
d1153fbed8 aarch64: abstract vspace in libsel4
Depending on the physical address range the top level translation table
may be a page upper directory or a page global directory. Rename in
libsel4 the invocations on top level structures to be on an
seL4_ARM_VSpace rather than an seL4_ARM_PageGlobalDirectory.
2019-07-25 09:59:17 +10:00
Anna Lyons
8af1aa77f6 aarch64: abstract vspace_root in vspace code
On aarch64-hyp the virtual address translation structure can differ
depending on the physical address range. This commit prepares to support
more than a single physical address range by removing the assumption
that the top-level structure in a vspace is a PGD, replacing it with the
concept of a vspace_root.

Specifically:
    - add and use macros to refer to vtable bitfield generator functions
    - use the existing vspace_root_t type rather than pgde_t
    - pull performASIDPoolInvocation into header
    - add and use VSPACE_PTR rather than PGDE_PTR
    - rename decodeARMVPageGlobalDirectoryInvocation to refer to VSpace
    - update comments/error messages
    - rename variables
2019-07-25 09:59:17 +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
Kent McLeod
9b1877de21 Add initial i.MX8M Mini evk 64-bit Support
This adds support for the 64-bit i.MX8M Mini evaluation kit.
Currently only AArch64 EL1 is supported.
2019-07-19 14:32:53 +10:00
Kent McLeod
a368e64234 imx8mq-evk: initial support for aarch32 2019-07-19 14:32:50 +10:00
Yanyan Shen
7900b6dccd aarch64: Add initial Arm FVP platform config
This platform assumes 2 clusters of A57 processors as described in
tools/dts/fvp.dts. This configuration is for running on FVP simulators.
2019-07-10 06:59:25 +10:00
Kent McLeod
051d32beab Add initial i.MX8M Quad evk 64-bit Support
This adds support for the 64-bit i.MX8M Quad evaluation kit.
Currently only AArch64 EL1 is supported.
2019-07-01 23:31:47 +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
5646f77463 RFC-3: Update user context for ARM with thread IDs
Switched appropriate naming conventions.
Was using the aarch64, have switched to aarch64 names.

TIPDRURW -> tpidr_el0
TPIDRURO -> tpidrro_el0
TPIDRPRW -> tpidr_el1

Switch TLS register on aarch32 from TPIDURO (tpidrro_el0) to tpidr_ro so
that it can be written to from user-land.

Thread ID registers tpidr_el0 have been added to the user context for
aarch32 and aarch64.

Only the thread ID that is writeable from EL0 is saved in the TCB and
saved/restored on context switch.

Thread IDs that are only changed within a VM (the read-only thread ID
for exception level 0 and the thread ID for exception level 1) are
stored in the VCPU and saved and stored as part of VM enable/disable.

Thread IDs that are only changed with VMs have been separated out into
hypervisor code.
2019-07-01 11:00:37 +10:00
Curtis Millar
fd83c0a3eb Replace IPC_BUF_GLOBALS_FRAME with KERNEL_GLOBALS_FRAME
The globals frame no longer serves its original purpose of informing a
thread of its IPC buffer address, and instead as a virtual
implementation of thread ID registers.
2019-07-01 11:00:18 +10:00
Curtis Millar
3207abeeb7 RFC-3: Update context for x86 to use FS and GS.
TLS_BASE virtual register is replaced with FS_BASE and GS_BASE virtual
registers.

The FS_BASE and GS_BASE virtual registers are moved to the end of the
context so they need not be considered in the kernel exit and entry
implementation.

Removed tracking of ES, DS, FS, and GS segment selectors on kernel entry
and exit.

ES and DS are clobbered on kernel entry with the RPL 3 selector for a
DPL 3 linear data segment.

FS is clobbered on exit with the RPL 3 selector for the DPL 3 segment
with FS_BASE as the base. This is done on exit to reload the value from
the GDT.

GS is clobbered on exit with the RPL 3 selector for the DPL 3 segment
with GS_BASE as the base. This is done on exit to reload the value from
the GDT.

Kernel entry and exit code is refactored, simplified, and improved in
light of the above changes.

x64: update verified config to use fsgsbase instr

The verification platform for x64 relies on the fsgsbase instruction.
2019-07-01 10:46:46 +10:00
Curtis Millar
09d5e2454c Fix RISC-V registers to reflect calling convention 2019-07-01 10:46:46 +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
Siwei Zhuang
8b4ed9941a RISCV: Add Hifive unleashed platform
This change adds support for Hifive unleashed board. It also removes the
outdated hifive suport from the spike platform.
2019-06-26 15:11:47 +10:00
James Ye
4e965162c3 am335x: use correct boneblack memory size
Overlay the incorrect memory size in the device tree, and enlarge the
kernel window appropriately.
BeagleBone Black has 512MiB memory.
2019-06-24 11:28:20 +10:00
Anna Lyons
5f8e361522 trivial: VspaceBits -> VSpaceBits on riscv32 2019-06-20 14:11:50 +10:00
Anna Lyons
90c49746a3 x86/ept: return correct MappingFailedLookupLevel
Prior to this change, seL4_MappingFailedLookupLevel() would retrun '22'
after any failed EPT mapping operation. This change fixes this to return
the correct amount of unresolved bits in the address.
2019-06-20 12:12:50 +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
Kent McLeod
4ce8f0a9f5 Add RISC-V IRQ invocations
We add support for seL4_IRQControlGet and seL4_IRQControlGetTrigger. If
a platform doesn't support setting the trigger, then
seL4_IRQControlGetTrigger will return an error. If the platform doesn't
have a PLIC driver, then it won't have any IRQs that can be requested.

Also authored by: Siwei Zhuang <siwei.zhuang@data61.csiro.au>
2019-06-18 10:22:47 +10:00
Anna Lyons
f3fbf85544 libsel4: add seL4_VspaceBits
This constant represents the size of the root page table.
2019-06-17 17:36:11 +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
Sylvain Gauthier
84e6d4cdb1 Added IRQ routing to specific core for ARM
Add a new syscall, `seL4_IRQControl_GetTriggerCore`, to get a IRQHandler
with specific target core(s) and trigger method. Only available in SMP
mode.
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
James Ye
a16cc57e21 Add Odroid-C2 support
Add support for the Hardkernel Odroid-C2 board.

Co-Authored-By: Anna Lyons <Anna.Lyons@data61.csiro.au>
2019-04-18 11:14:17 +10:00
Kent McLeod
8c17f0f0c9 libsel4,riscv: Hide enums for non-C preprocessing
sel4/sel4_arch/constants.h gets used to provide constants in linker
files and we want to avoid generation of enum definitions
2019-04-15 15:37:10 +10:00
Curtis Millar
f99f6790ab Use more robust check for TCB size
The complex conditions for the AARCH32 TCB size are updated to better
reflect the circumstances in which the TCB will have a particular size.
2019-04-08 11:18:41 +10:00
Sylvain Gauthier
8c27637d4a Fixed riscv64 ASID constants to avoid asid pool overflow 2019-03-27 13:17:08 +11:00
Anna Lyons
cf57914c7f style: run autopep8 on python files 2019-03-27 10:43:58 +11:00
Sylvain Gauthier
142bf9b127 More standard constant name, moved ASID constants to arch generic files 2019-03-22 17:34:39 +11:00
Anna Lyons
ffa9fda8f0 style: use consistent styling for all cmake files
Add .cmake-format.yaml which defines custom functions with kwargs to
style nicely
2019-03-22 11:52:06 +11:00
Anna Lyons
86ed25b8c0 cmake: use snake_case for RegisterDriver & CPPFile
Our upcoming cmake styling tool requires any custom functions you want
styled nicely to be lower case. We only need to style these two nicely,
as they have kwargs we would like aligned.
2019-03-22 11:50:04 +11: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
Anna Lyons
9b6464621f libsel4: consistent definition of seL4_PGDBits
Previously seL4_PGDBits was calculated, which is inconstent with the rest
of the composite constants in libsel4, and makes size constants harder
to parse from the C.

This commit makes seL4_PGDBits consistant with other definitions, by making the definition an integer and checking it with a compile time assert.
2019-02-14 10:44:38 +11:00
Kent McLeod
a5da502b13 riscv,RV64,bf: Correct cannonical address to 39
We currently only support Sv39 on RV64. Sv39 has a cannonical address
range of -2^38 and 2^38-1. This means that bits 63-39 must be equal to
bit 38, or that we sign extend from bit 39 to 63 based on the value of
bit 38. It also means that we only have 39 bits of addressable space,
which limits our max untype size.
2019-02-08 17:17:02 +11:00
Anna Lyons
5fe6d0bcef riscv/spike: fix seL4_UserTop for riscv
Use correct values and document them.
2018-12-20 12:27:23 +11:00
Anna Lyons
76faadc923 Add seL4_UserTop and move kernelBase to the arch level
- seL4_UserTop is a new constant which represents the top of virtual
memory available to user level
- this commit also rationalises several constants (USER_TOP, kernelBase)
and moves them to the arch level, such that ports only need to define
seL4_UserTop.
2018-12-12 16:24:31 +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
Edward Pierzchalski
4ea62e5158 riscv: add remaining registers to user context.
The registers a7, s2-11, and t3-6 were missing from seL4_UserContext.
We also add these to frameRegisters and gpRegisters, which are used
to implement the TCB invocations for reading and writing these
registers.

Zero-length arrays aren't valid expressions or types in ISO C, so
to keep the c parser happy we need to either remove gpRegisters or
provide some contents for it.

In the past, frameRegisters and gpRegisters distinguished between
those registers preserved across a syscall and those that weren't.
TCB_CopyRegisters allows the caller to choose which set to copy.

Since we preserve all non-return registers, this distinction isn't
relevant anymore and there's no easy way to justify the members of
frameRegisters and gpRegisters.

We arbitrarily choose to put the 'last' register t6 in gpRegisters,
for consistency with the register list in registerset.h and with the
order that registers are restored.
2018-12-06 15:04:41 +11:00
Kofi Doku Atuah
fb854a7b14 Strongly type these interface arguments 2018-12-05 10:43:40 +11:00
Jimmy Brush
71a2c5384e
[libsel4] fix building with LibSel4FunctionAttributes
Correct exported functions that were still defined as 'static inline' to
use LIBSEL4_INLINE_FUNC so that they can be controlled by
LibSel4FunctionAttributes.

This is important to other languages that want to bind to the libsel4
static library instead of using the inline C functions.
2018-11-27 01:17:45 -05:00
Peter Chubb
896e864431 TX2: Add initial TX2 support
See CHANGES and https://docs.sel4.systems/Hardware/ for more information
2018-11-07 11:52:51 +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
Mitchell Buckley
f4f6b156e3 SELFOUR-1491: verification updates
- renamed an architecture label so that it begins with ARM.
- changed setIRQTrigger so that it takes a boolean value instead of an int.
- Arch_decodeIRQControlInvocation converts the second argument (trigger)
to a boolean immediately.
2018-09-19 12:06:35 +10:00
Anna Lyons
eb0553fa75 SELFOUR-1491: add seL4_IRQCOntrol_GetTrigger
Add a new invocation which allows an irq handler capability to be
obtained with a specific trigger method (edge or level). Obtaining
this capability modifies the GIC state.
2018-09-19 12:06:35 +10:00
Anna Lyons
5539b9e8b3 docs: s/depth of 32/depth equivalent to the wordsize 2018-09-19 12:06:35 +10:00
Ilya Yanok
03a07bef6e libsel4: rename sel4_gen custom target to sel4_generated
add_config_library for sel4 adds sel4_Gen custom target. Having two targets with
names that only differ in case results in strange build problems on systems with
case insensitive file systems (I've seen it only on OS X but I assume Win is
affected too).
2018-09-10 15:57:19 +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
Adam Felizzi
72e675f1da Kbuild: Removed Kbuild
Removed all Kbuild/Kconfig/Makefiles from the kernel as we migrate
to a CMake only build system. Kbuild is no longer supported.
2018-08-10 10:38:53 +10:00
Adrian Danis
723aa0ead3 arm: Use TCB version of TPIDRUR[OW] state
These registers are part of the 'regular' TCB state and are saved and restored as part
of normal thread switching. As such it is conflicting to have a duplicate idea of the value
of these registers, especially as it is not kept in sync with the version in the TCB,
which is what is actually being loaded into the hardware.
2018-07-13 10:12:18 +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
8a413b276a aarch32: trivial - fix typo 2018-06-27 16:23:52 +10:00
Yanyan Shen
d6b3321186 arm/hyp: Fix typo TTBRC -> TTBCR 2018-06-19 16:08:31 +10:00
Yanyan Shen
822ebd7dea arm/hyp: Remove CNTV_CVAL 2018-06-19 16:08:31 +10:00
Yanyan Shen
81317fb645 arm/hyp: refactor VCPU states
Use an array and constants to replace register names in the VCPU.
2018-06-19 16:08:31 +10:00
Anna Lyons
f17a80ed7f manual: remove duplicated word 2018-05-11 16:14:13 +10:00
Anna Lyons
996cb73d74 manual: correct vspace/pd usage for ARM invocations
Use vspace for the top-level paging structure and page directory specifically for page directories.
2018-05-11 16:14:11 +10:00
Anna Lyons
17b901d79f manual: clarify VSpace as top-level paging structure
This change updates the vspace chapter to separate the high-level concept of a VSpace from the
architectually defined objects. It also updates the various names for the vspace parameter to all be
vspace.
2018-05-11 16:14:09 +10:00
Anna Lyons
804fc54942 manual: update Page map documentation
- remove PD, PT references
- make clear that the middle level structures need mapping or an error is returned
2018-05-11 16:13:17 +10:00
Anna Lyons
ac01547562 manual: remove hard-coded PD, PT and Page invocations
- increases the maintainability of the docs
- move descriptions of methods to the API reference
- remove hardcoded invocations in manual

This commit removes the content completely from vspace.tex, as it is out of date and needs
restructuring. The next commit does the restructuring.
2018-05-11 16:13:08 +10:00
Anna Lyons
56abae43fb manual: remove hard-coded ASID invocations
- move documentation to API ref
- create tables pointing to the API ref for these objects
2018-05-11 16:13:06 +10:00
Anna Lyons
b5ee12f00c manual: group generated API methods by object type
This change generates doxygen groups for each object type, which allows us to create sections in
output documents for each object. This has the advantage that we can later label those sections and
link to them from the main document. Additionally, it improves nagivation of the API docs.
2018-05-10 11:36:01 +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
fcff7ee2c4 manual: Updated Read VMCS description for docs
Changed \texttt{vmread} to `vmread`. Generated doxygen would strip
the latex command '\texttt', leaving just {vmread}.
2018-05-01 12:28:03 +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
Adrian Danis
fa6e8a8238 libsel4: Generate in build directory
Corrects arch and sel4_arch invocation.h generation to place files in the build directory
and not in the source directory.
2018-04-23 13:40:59 +10:00
Anna Lyons
d3feb06cdd riscv: fix licenses
- add files from elsewhere to the license ignore
- s/D61_BSD/DATA61_BSD
2018-04-18 10:52:02 +10:00
Anna Lyons
1b68590b3f riscv: use one definition of page bits 2018-04-18 10:10:14 +10:00
Anna Lyons
00cf62bb09 riscv: remove unneccessary #if CONFIG_PT_LEVELS
This guard is only required for object types to avoid
seL4 thinking they are valid objects. Defining the size constants does
not need to be guarded.
2018-04-18 10:10:14 +10:00
Adrian Danis
0e4eddf60f riscv: Remove incorrect error
Regardless of the number of PT levels SEL4_MAPPING_LOOKUP_NO_PT always represents the
bits at which we don't have a PT as with more PT levels the number of bits a PT translates
does not change.
2018-04-18 10:10:14 +10:00
Anna Lyons
74b220158a trivial: fix whitespace 2018-04-18 10:10:14 +10:00
Anna Lyons
aae12426e9 riscv: document API methods 2018-04-18 10:10:14 +10:00
Anna Lyons
0764d2ac7d riscv: build on 32 bit 2018-04-18 10:10:14 +10:00
Anna Lyons
e58d076a58 riscv: make sel4arch.xml follow dtd 2018-04-18 10:10:14 +10:00
Anna Lyons
937d042395 riscv: fix style 2018-04-18 10:10:14 +10:00
Adrian Danis
fc0740b8f4 riscv: Remove extranous lookupg definitions
This definitions don't really make sense as it is just PTs all the way down. Any resolution
that has >=SEL4_MAPPING_LOOKUP_NO_PT is a missing PT.
2018-04-18 10:10:14 +10:00
Anna Lyons
90d3a694bd riscv: s/x3/gp and s/x4/tp in seL4_UserContext
This makes seL4_UserContext consistent with frameRegisters
2018-04-18 10:10:14 +10:00
Anna Lyons
6114fd3081 SELFOUR-1277: implement PageRemap for riscv 2018-04-18 10:10:14 +10:00
Anna Lyons
1dcd652546 riscv: kill tabs in sel4arch.xml 2018-04-18 10:10:14 +10:00
Anna Lyons
05a914b6fc SELFOUR-1276: set PrefetchFault MR for riscv
This was being tracked in the fault_t, but not set as part of the
message to the user.
2018-04-18 10:10:14 +10:00
Adrian Danis
3d99437609 SELFOUR-1264: riscv: Missing brace
Adds missing brace in syscalls.h and restyle the code accordingly.
2018-04-18 10:10:14 +10:00
Kent McLeod
28bf273856 libsel4: Fix RISC-V type definitions 2018-04-18 10:10:14 +10:00
Adrian Danis
a8b2e0f919 riscv: seL4_RISCV_VMAttributes matches vm_attributes_t
Updates the user visible seL4_RISCV_VMAttributes definitions to match what is declared
in vm_attributes_t, which is just the executeNever attribute.
2018-04-18 10:10:14 +10:00
Adrian Danis
4a98d1498a riscv: TCB size no longer excessive
TCB was declared as being larger than needed, which is an error now when building the kernel
2018-04-18 10:10:14 +10:00
Adrian Danis
aafa594258 RISCV: Place TODOs in the source 2018-04-18 10:10:14 +10:00
Hesham Almatary
83ba084713 [SELFOUR-1156] RISC-V Port
Experimental release that supports both RV32 and RV64
2018-04-18 10:10:14 +10:00
Yanyan Shen
afa9ad9c8c armv8/hyp: Put CNTV_CTL before CNTV_TVAL 2018-04-13 09:51:41 +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
Yanyan Shen
3a21701a71 libsel4/arm: Move VCPU to the common interface 2018-04-06 13:40:47 +10:00
Yanyan Shen
6bfc46311c libsel4/armv8: Add seL4_ARM_VCPU for aarch64 2018-03-28 12:15:09 +11:00
Yanyan Shen
0ab42919dd libsel4/armv8: Add seL4_VCPUReg for EL2 2018-03-28 12:15:09 +11:00
Yanyan Shen
a4fef8f4d9 libsel4/armv8: Add VGICMaintenance_/VCPUFault_Msg 2018-03-28 12:15:09 +11:00
Yanyan Shen
28cc72e972 libsel4/armv8: Add seL4_ARM_VCPUBits&seL4_VCPUBits 2018-03-28 12:15:09 +11:00
Adrian Danis
a7a6d9e229 x86: Increase TCB size for large xsave regions 2018-03-27 13:42:09 +11:00
Bruce Mitchener
b942a50441 Fix trivial comment typos. 2018-03-27 10:51:26 +11:00
Adrian Danis
cc9ccb497b arm: Correct TCB size under multicore 2018-03-27 10:25:07 +11:00
Adrian Danis
f5d0b93ccf arm: Correct TCB size when using FPU and virtualisation 2018-03-26 14:41:28 +11:00
Yanyan Shen
bdbe4866ce armv8/libsel4: Add VGICMaintenance and VCPUFault 2018-03-23 17:39:49 +11:00
Adrian Danis
f12d6fdc98 Increase seL4_TCBBits ready for alignment increase
The alignment of the tcb_t portion of a TCB object is going to be increased, this will
cause the total TCB size to overflow in some cases. This updates the definition of
seL4_TCBBits such that TCBs will be large enough after the alignment change.
2018-03-23 12:28:54 +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
40ce1b11f1 libsel4: remove unused extra_cflags
This is now unused due to the usage of CPPFile which allows us to just use the includes
via the `include_directories`
2018-02-22 14:51:48 +11:00
Adrian Danis
08b29f30f0 libsel4: Replace GenCPPCommand with CPPFile
CPPFile is a much more robust version of GenCPP command. We drop the `extra_cflags`
as the CPPFile command uses regular cmake compilation and will use the include
directories added by `include_directories`, which includes all the directories from
 `extra_cflags`
2018-02-22 14:51:48 +11:00
Adrian Danis
596d4c6239 libsel4: Provide includes directly to include_directories
include_directories makes these directories directly available to all compilation that
happens, without needing to provide additional target link directories. This is the
first step to removing the `extra_cflags` variable
2018-02-22 14:51:48 +11:00
Kent McLeod
a82b066c36 libsel4: Correct type typo in syscalls.h 2018-02-06 17:17:13 +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