Commit graph

118 commits

Author SHA1 Message Date
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
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
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
Adrian Danis
d2644e8ab7 Declare and check IPC buffer size
Adds a named constant of the IPC buffer size bits that can be used when checking the
size/alignment of an IPC buffer. This constant has a compile time assertion to ensure
it corresponds to the actual IPC buffer
2017-10-27 16:12:18 +11:00
Adrian Danis
cfb30f34b9 libsel4: Remove unused argument in seL4_VMEnter syscall
This VCPU argument does not make sense given semantics of the VMEnter syscall,
and as a result the argument is ignored by the kernel.
2017-09-06 15:48:37 +10:00
Adrian Danis
4c8be8f4f9 x86: Increase TCB size for debug builds
Debug builds require one additional byte in the TCB to have a NULL terminated tcb name.
2017-08-22 14:51:10 +10:00
Hesham Almatary
72478f3606 Manual: document mode/arm object invocations 2017-08-09 10:01:00 +10:00
Adrian Danis
ae9fe9b5d1 aarch64: Use tpidrro_el0 for IPC buffer instead of tpidr_el0
Changing the register used for the IPC buffer is useful as the standard TLS model for
aarch64 is to use tpidr_el0 for the thread pointer, which we are presently using
for the IPC buffer. This therefore paves the way for implementing proper TLS support
on aarch64.

Since we are not using tpidr_el0 for the IPC buffer we need to save/restore (or at
least clear) this register on thread switch to prevent it being a user channel. Saving
and restoring of it is achieved by ensuring CONFIG_IPC_BUF_TPIDRURW is not set, which
as we are no longer using this strategy this will be the case. To that end as aarch64
only has one IPC buffer strategy this commit makes the choice of IPC buffer strategy
dependeont on aarch32.
2017-08-07 22:52:46 +10:00
Hesham Almatary
64d576fb47 SELFOUR-806: aarch32 - Implement lazy FP save/restore
This commit implements lazy FP save/restore mechanism, required for user threads
when they use the FPU. The following caveats take place:

* Only support synchronous exceptions. No support for asynchronous ones.
* VFP opcodes are used instead of normal instructions to discard compiler warnings/errors.
* Support is limited to specific ARM subarchitectures we support and tested this commit on.
* Disable the FPU by default if users are not using it to avoid channels.
* FPU support is not verified yet.
* Will not work properly if using a VM that's running besides other VMs/threads that are using the FPU.
2017-06-29 13:42:10 +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
61f1bd5efc seL4_DebugDumpScheduler: remove unused argument 2017-06-19 14:43:03 +10:00
Stephen Sherratt
c2ca76a3eb manual: Friendly names for arch-specific methods 2017-06-02 15:34:45 +10:00
Stephen Sherratt
3498705f50 manual: Add basic names and labels to interfaces 2017-06-02 15:34:45 +10:00
Stephen Sherratt
c7471db9b5 manual: Trivial whitespace 2017-06-02 15:34:45 +10:00
Anna Lyons
af1e8762d4 tk1: increase seL4_TCBBits in debug mode
Otherwise there is not enough space for tcbName
2017-06-01 15:11:51 +10:00
Anna Lyons
bb5ecb1b3e SELFOUR-880: add seL4_DebugDumpScheduler
- when CONFIG_DEBUG is enabled, track all threads
- when CONFIG_PRINTING is enabled, provide seL4_DebugDumpScheduler which
allows the user to dump the state of the kernel scheduler.
2017-05-30 15:22:23 +10:00
Anna Lyons
9ca253a3d0 SELFOUR-879: expose index and entry constants 2017-05-09 11:35:52 +10:00
Anna Lyons
50d72007c6 SELFOUR-862: CONFIG_PRINTING --> seL4_DebugPutChar
seL4_DebugPutChar is only available when CONFIG_PRINTING is enabled
2017-05-04 16:07:16 +10:00
Anna Lyons
beddca16cd libsel4: Add seL4_FastMessageRegisters
This allows benchmarks and utility code to only set registers in the ipc
buffer as required.
2017-05-02 11:08:11 +10:00
Anna Lyons
90b3e757bf libsel4: fix warning in seL4_BenchmarkSetLogBuffer 2017-04-11 14:14:10 +10:00
Anna Lyons
8c02bc1301 x64: implement seL4_BenchmarkFlushCaches
by moving the ia32 implementation up a level to x86
and implementing the syscall stub.
2017-04-11 14:14:10 +10:00
Hesham Almatary
2cd909b2e9 ia32: remove unsued ia32KSGlobalPDPT and PDPT defines 2017-03-17 09:50:52 +11:00
Kent McLeod
aa656604db Modify FinalizeLog syscall
There is no way to know how many entries the syscall log contains
otherwise.  One option was iterating through until finding a 0
terminator, however this requires the log to be zeroed before each
trial.  This changes the FinalizeLog syscall to return the number of
entries.
2017-02-24 15:55:34 +11:00
Kent McLeod
e937d96801 Change debug #ifdefs to be from autoconf.h
Previously the #ifdefs for some debug syscalls relied on definitions
from Makefile.flags in sel4_tools.  This changes them to use configs
defined in autoconf.h which makes them easier to import when building
projects that don't use sel4_tools.
2017-02-24 14:15:59 +11:00
Adrian Danis
eccaae51dc s/D61/DATA61/ in license headers for consistency 2017-02-21 16:38:51 +11:00
Hesham Almatary
3e57e647e9 SELFOUR-501: x86 - Remove PAE support 2017-02-17 13:13:43 +11:00
amrzar
6428e959b4 aarch64: Add aarch64 libsel4 implementation 2017-02-10 16:43:46 +11:00
amrzar
efb28fec20 Unify arch_shared_types.bf from the libsel 2017-02-06 09:08:35 +11:00
Adrian Danis
2e5ce5a257 arm: VCPU interface for manipulating banked registers
Adds extra fields to the Read/Write VCPU Register invocations to read and write
the banked the registers
2017-01-30 09:47:51 +11:00
Adrian Danis
191b44656a arm: Introduce constant for VCPU register 2017-01-30 09:47:51 +11:00
Hesham Almatary
ff8c48d651 Benchmark: ARM - Fix typos in syscalls.h 2017-01-11 12:30:39 +11:00
Adrian Danis
55d7a38641 libsel4: seL4_VMEnter syscall for x86-64 2016-12-16 10:39:40 +11:00
Adrian Danis
017d786317 x64: VT-x related cap and object definitions
* Adds object and cap definitions for VT-x structures (VCPU and EPT).
* Extends the asid_map implementation to support ASIDs in the EPT
* Adds size definitions for VCPU and EPT objects
2016-12-16 10:39:40 +11:00
Kent McLeod
e537ee1d67 libsel4: add void to function prototypes 2016-12-15 15:04:44 +11:00
Jeff Waugh
803dd5c2ae libsel4: Optional public symbols for external interfaces
CONFIG_LIB_SEL4_PUBLIC_SYMBOLS=y will disable inlining for external
interfaces (except deprecated functions), thereby providing public
symbols for easy linkage with other languages.
2016-12-06 18:08:39 +11:00
Adrian Danis
80ae3286dc ia32: Support larger XSAVE region sizes 2016-11-30 17:44:24 +11:00
Adrian Danis
f9f360a747 Merge pull request #552 in SEL4/sel4 from ~ADANIS/sel4:fault to master
* commit '0435985eca5117a9df272e991fd0f8c421515831':
  arm: Use new cap rights structures in iospace
  libsel4: Correct VGIC and VCPU fault types
  libsel4: Correct deprecated macro for in unknown syscall
2016-11-30 14:43:37 +11:00
Adrian Danis
78009dd245 SELFOUR-675: x64: Increase message registers from 2 to 4 2016-11-30 12:04:54 +11:00
Adrian Danis
8b0e63f09d libsel4: Correct VGIC and VCPU fault types 2016-11-30 11:59:48 +11:00
Adrian Danis
fe0f417789 libsel4: Correct deprecated macro for in unknown syscall 2016-11-30 11:57:47 +11:00
Anna Lyons
ed95f84a43 SELFOUR-413: changes for verification
Avoid using ptrs to arrays at all

Another macrofull change brought to your by verification. This should
avoid nasty proofs about const pointers.
2016-11-25 12:30:29 +11:00
Anna Lyons
2fea9a0fe2 SELFOUR-567: use seL4_CapRights_t from libsel4
This change

* changes seL4_CapRights from the kernel to be seL4_CapRights_t in
libsel4
* deprecates the duplicated seL4_CapRights in libsel4, which is
  now the bitfield generated type seL4_CapRights_t.
* fixes all usages in kernel and libsel4

Impact: for verification, this will require the type to change name
from cap_rights to seL4_CapRights_t.
This is a breaking libsel4 API change, although most code uses
seL4_AllRights or similar constants, which will not break
at a source level as these constants have been updated.
2016-11-25 12:29:07 +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