Commit graph

489 commits

Author SHA1 Message Date
Hesham Almatary
d84029305e [SELFOUR-911]: Document benchmarking system calls 2017-06-16 11:26:42 +10:00
Stephen Sherratt
5090a26474 manual: Add missing return doc for seL4_Poll 2017-06-06 13:52:48 +10:00
Stephen Sherratt
f39f925612 manual: Better inference of method manual labels
Manual labels for methods are inferred unless specified in the api
description. This change extends this inference to prevent slashes
appearing in method labels. It also refactors the logic for label
inference to be more readable.
2017-06-02 16:34:49 +10:00
Stephen Sherratt
e283e390d3 manual: In API docs, expand EPT* acronyms 2017-06-02 15:34:45 +10:00
Stephen Sherratt
161b841a9e manual: In api docs, rename "IO" to "I/O" 2017-06-02 15:34:45 +10:00
Stephen Sherratt
c206dda4c7 manual: Remove errorenumdesc docs from sel4 idl
Methods with no output params return an error. Previously each such
method had a line of documentation in its interface definition
explaining this. This commit removes this. The documentation is
for such cases is generated implicitly.
2017-06-02 15:34:45 +10:00
Stephen Sherratt
d8e6a00115 manual: Improve handling of return type docs
If no documentation is provided for the return value of a function, the
documentation generator will attempt to infer the documentation based on
the return type.
2017-06-02 15:34:45 +10:00
Stephen Sherratt
32af54221f manual: Docs for debugg and benchmark syscalls 2017-06-02 15:34:45 +10:00
Stephen Sherratt
447e924337 manual: Undocumented return defaults to error enum 2017-06-02 15:34:45 +10:00
Stephen Sherratt
c2ca76a3eb manual: Friendly names for arch-specific methods 2017-06-02 15:34:45 +10:00
Stephen Sherratt
c662c2effe manual: Tweak manual label inference 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
ec3b640248 manual: Add label_prefix to method names 2017-06-02 15:34:45 +10:00
Stephen Sherratt
7af79c555a manual: Allow label_prefix to be set in idl 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
3230c90076 SELFOUR-708: fix priority docs on TCBConfigure 2017-05-25 10:57:55 +10:00
Stephen Sherratt
f739cc89eb manual: Python3-compatible relative imports 2017-05-24 16:02:39 +10:00
Kent McLeod
b9f2a7600c libsel4: Add constant for multiboot region type 2017-05-16 15:45:58 +10:00
Kent McLeod
56e9e28d49 libsel4: add comments to multiboot fields 2017-05-15 15:41:32 +10:00
Anna Lyons
f8f25d7fd0 trivial: fix #ifdef guard
it was duplicating another one
2017-05-09 11:35:52 +10:00
Anna Lyons
9ca253a3d0 SELFOUR-879: expose index and entry constants 2017-05-09 11:35:52 +10:00
Anna Lyons
fc0f1eec76 kernel entry tracking: track VMExit and VCPUfault 2017-05-08 10:10:37 +10:00
Kent McLeod
108c325b0f libsel4: Change PACKED to SEL4_PACKED 2017-05-05 14:49:46 +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
Kent McLeod
d13544c737 SELFOUR-865: Pass memory map information to user 2017-05-03 16:17:03 +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
Adrian Danis
77616ac43d Check for CONFIG_ variables being 'defined' instead of 'true'
This is to conform with existing style of checking configuration options
2017-04-06 10:43:24 +10:00
Kofi Doku Atuah
4b491dcf0c SELFOUR-836: arm-hyp: Config option for saving/loading vs trapping debug state
Provides a configuration option for enabling HDCR.TD* traps, or saving and loading debug
state on VCPU switches. Currently verification only plans to support the trap setting.

As this option complicates all of the #ifdef's related to debug registers even further,
abstractions for enabling/disabling each individual piece of the debug code for different
configuration options are also implemented.

Part of these refactored #ifdef guards was to remove the guards completely from libsel4
around the definitions of the number of breakpoints and watchpoints.
2017-04-03 14:21:27 +10:00
Luke Mondy
eed691d5e5 Add comment explaining env var 2017-03-31 16:59:14 +11:00
Luke Mondy
13f1a00c74 Set environment var to force Python not generate cached bytecode (pyc) files 2017-03-31 16:59:14 +11:00
Kofi Doku Atuah
725d0dacfd SELFOUR-836: Disable debug context save/restore between VMs
This patch disables the debug register state save and restore on ARM-hyp,
such that Guest VMs can now interfere with one another and trigger
one another for certain limited scenarios. This will be undone later on.
2017-03-21 15:31:23 +11:00
Hesham Almatary
2cd909b2e9 ia32: remove unsued ia32KSGlobalPDPT and PDPT defines 2017-03-17 09:50:52 +11:00
Adrian Danis
099b45074f libsel4: Deprecate bootinfo management 2017-03-08 09:25:47 +11:00
Kofi Doku Atuah
469bdd6156 ARM-HYP: Add support for save/restore of debug registers
As things are now, the Guest VMs can modify the debug registers at will
from non-secure PL1, and the kernel does nothing to ensure that guest VM
debug coprocessor registers are preserved.

This is a preliminary patch that simply hooks into vcpu_save and saves the
CPU's debug coprocessor registers when saving VCPU state.

For restoring the debug registers on switching to a VCPU, we just re-use
restore_user_debug_context, which is already called in restore_user_context.
(Restore_user_context is called by c_handle_vcpu_fault()). Specifically,
we modify the used_breakpoints_bf so that restore_user_debug_context()
will always pop all the debug context.

This patch only covers the breakpoint and watchpoint registers,
and it doesn't cover the entire debug coprocessor, which is another
conversation.
2017-03-01 10:23:29 +11:00
Adrian Danis
256c30ae02 x86: Pass VBE information from multiboot through bootinfo 2017-02-28 16:35:50 +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
Stephen Sherratt
cb952a2be4 Replace division with int division in py scripts 2017-02-22 12:20:15 +11:00
Stephen Sherratt
8c93b71c1c Import reduce from functools in python scripts 2017-02-22 12:19:58 +11:00
Stephen Sherratt
7337f9e8df Parens around print args in python scripts 2017-02-22 12:19:24 +11:00
Adrian Danis
eccaae51dc s/D61/DATA61/ in license headers for consistency 2017-02-21 16:38:51 +11:00
Hesham Almatary
bca46830e9 Merge pull request #420 in SEL4/sel4 from ~HALMATARY/sel4:x86RemovePAE to master
* commit '3e57e647e9a882fc7ba07329bcfe41ff87af5bdb':
  SELFOUR-501: x86 - Remove PAE support
2017-02-21 16:14:34 +11:00
Hesham Almatary
3e57e647e9 SELFOUR-501: x86 - Remove PAE support 2017-02-17 13:13:43 +11:00
Adrian Danis
7836f76cf9 Extend bootinfo to support potentially arbitrary additional structures
This provides a future proof interface for extending the bootinfo region with additional
kinds of optional architecture and platform specific information. The basic idea is to
report the size of a region directly following the bootinfo frame, which is made up of
a series of 'chunks'. Each chunk has an identifier (describing what it is) and a length,
allowing unknown chunks to be skipped in favor of examining the remaining of the chunks.
2017-02-16 14:34:52 +11:00
Adrian Danis
e3b39248f9 Explicitly pack bootinfo data structures
To prevent the kernel and root server having a different layout of these structs if they are
compiled with different flags etc they should be packed
2017-02-15 14:27:31 +11:00
amrzar
2e250fcce5 plat: add tx1 support 2017-02-15 12:35:13 +11:00
amrzar
c72bdc0cde trivial: fix typo 2017-02-13 08:27:52 +11:00
amrzar
6428e959b4 aarch64: Add aarch64 libsel4 implementation 2017-02-10 16:43:46 +11:00
Anna Lyons
2c98f49dc5 Add missing case to seL4_getFault 2017-02-08 17:16:06 +11:00
amrzar
efb28fec20 Unify arch_shared_types.bf from the libsel 2017-02-06 09:08:35 +11:00
Adrian Danis
8d8df93a9b Merge pull request #644 in SEL4/sel4 from ~ADANIS/sel4:github55 to master
* commit '31fe08263ca0c314163b0b88607955fd04f0b072':
  Fix typo
2017-02-03 11:36:03 +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
Berkus Decker
31fe08263c Fix typo 2017-01-25 19:13:47 +02:00
Hesham Almatary
ff8c48d651 Benchmark: ARM - Fix typos in syscalls.h 2017-01-11 12:30:39 +11:00
Stephen Sherratt
c05210f508 manual: Remove empty cap description attribute 2016-12-16 15:57:57 +11:00
Stephen Sherratt
1f1a5ad4dc manual: Removed default cap description 2016-12-16 15:57:57 +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
Stephen Sherratt
b6cd9f1227 libsel4: Updated api xml dtd file with doc tags 2016-11-30 16:09:06 +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
Stephen Sherratt
a09089292d Merge pull request #551 in SEL4/sel4 from ~SSHERRATT/sel4:caprights to master
* commit '2e30ac481f212b3490fde8dbd13f496a50d70f49':
  libsel4: Add remaining combinations of cap rights
  libsel4: Removed stray semicolon from shared_types
2016-11-30 14:16:22 +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
Stephen Sherratt
2e30ac481f libsel4: Add remaining combinations of cap rights 2016-11-30 10:36:31 +11:00
Stephen Sherratt
3fce021c8b libsel4: Removed stray semicolon from shared_types 2016-11-30 10:35:47 +11:00
Stephen Sherratt
cd8b5de27e manual: Add docs to arch-independent inv xml file
This also moves the description of TCBSetEPTRoot from the general object
invocation xml file to the x86-specific one to prevent the need for
documentation-generating scripts to distinguish between VTX (ie. x86)
invocations, and truly architecture independent invocations.

JIRA: SELFOUR-606
2016-11-29 14:30:41 +11:00
Stephen Sherratt
08bca15c5f manual: Obj inv stub gen generates doxy comments
This modifies the object invocations stub generator to generate doxygen
comments based on documentation in the xml files it parses.

JIRA: SELFOUR-606
2016-11-29 14:30:36 +11:00
Stephen Sherratt
818a8330b3 manual: Added libsel4 tools library to manual dir
JIRA: SELFOUR-606
2016-11-29 14:30:02 +11:00
Stephen Sherratt
891a5eb587 libsel4: Trivial whitespace 2016-11-29 14:06:30 +11:00
Stephen Sherratt
0197d63b6a Replace bools with ints in shared_types header
The motivation for this change is the fact that the types of `true` and
`false` are different between userland and the kernel. This was forcing
code including shared_types.h to first include the appropriate header
defining `true` and `false`. This change prevents this need.
2016-11-28 14:05:23 +11:00
Adrian Danis
db174884e9 libsel4: Add missing seL4_AllRights macro
Left out of commit 2fea9a0fe2
2016-11-25 15:23:45 +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
Anna Lyons
33a771d3cb Split fault types into arch/generic
Prior to this commit faults were separate
per architecture. This commit extracts the common
fault types and introduces arch specific faults,
reducing code duplication across architectures.
2016-11-25 12:29:07 +11:00
Adrian Danis
e78cdf9b64 SELFOUR-553: Support alternate IPC buffer locations without globals frame
This commit adds support for using the ThreadID registers of the ARM MPCore
platforms for storing the address of the IPC buffer instead of the globals
frame. The choice of using the user readable/writeable ThreadID register
is chosen, even though it means the user cannot use it for its own
purposes, as it leaves room in the future for doing TLS support in the
user read only register, where compilers expect it.
2016-11-22 11:49:52 +11:00
Adrian Danis
31628d9a58 Remove recycle
Removes the recycle operation and adds an operation
to cancel any badged sends on and endpoint. Calling
Revoke + CancelBadgedSend is equivalent to Recycle
on a badged endpoint
2016-11-18 14:10:01 +11:00
Adrian Danis
05bf1ca44d libsel4: Reorder bootinfo struct
This reorders the bootinfo struct to place the untyped array as the
last element. Having the array at the end makes the layout of the
information in this struct easier to represent in other languages.
2016-11-14 08:58:18 +11:00
Anna Lyons
c86669df43 x86: export tsc freq in bootinfo
We read the frequency from the platform info MSR and export it to the
user for accurate timing (for platforms that support platform into)
2016-11-08 14:46:18 +11:00
Adrian Danis
8d0ed7029d Use correct seL4_MaxUntypedBits
This change uses the seL4_MaxUntypedBits constant in decodeUntypedInvocation
when checking the size of the requested allocation. This constant
is also changed to be the correct value. The verification team suspects
this check is probably unnecessary, but have also resolved not to waste more
time investigating.
2016-11-01 16:17:11 +11:00
Kent Mcleod
436b214ec6 Merge pull request #444 in SEL4/sel4 from ~KMCLEOD/sel4:pr to master
* commit '66dfc2e786614a34c18ad2d7c20c04c69e589a97':
  Change ia32 to use fs register for IPC buffer
2016-10-30 23:00:44 +00:00
Kent McLeod
66dfc2e786 Change ia32 to use fs register for IPC buffer
gs register is used by gcc for TLS and the IPC buffer gets in the way
2016-10-28 16:40:38 +11:00
Adrian Danis
8a49b94893 Merge pull request #446 in SEL4/sel4 from ~ADANIS/sel4:withmrs to master
* commit 'be68b0c0bde5bfa439376fac4c8be255dacaa958':
  libsel4: Allow invocations to not use IPC buffer
  Retain in-register error descriptions when not using IPC buffer
2016-10-28 04:35:09 +00:00
Adrian Danis
be68b0c0bd libsel4: Allow invocations to not use IPC buffer
Reintroduces Kconfig option removed in 5271925ba5
that allows invocations to use the WithMRs variants of syscalls instead of
using the IPC buffer
2016-10-28 15:25:27 +11:00
Anna Lyons
f0cb354755 Merge pull request #410 in SEL4/sel4 from ~ALYONS/sel4:cache to master
* commit '44ed6adb616590a0f6ae8b0ad8c442afed625457':
  add seL4_BenchmarkFlushCaches() for arm and ia32
2016-10-28 04:21:25 +00:00
Anna Lyons
44ed6adb61 add seL4_BenchmarkFlushCaches() for arm and ia32
Available when CONFIG_ENABLE_BENCHMARKS is set, flushes caches for
running cold-cache benchmarks
2016-10-28 15:09:03 +11:00
Jeff Waugh
dc3d53417e Retain in-register error descriptions when not using IPC buffer
- Fixes "lost" error descriptions when using *WithMRs system call
  variants [1].
- Only stores real registers to IPC buffer if there's an error.
- If there's an error in a struct-returning function, return
  early without setting any struct members.
- Passes the sabre/qemu test suite... with and without --buffer!

[1] https://sel4.systems/pipermail/devel/2016-October/001079.html
2016-10-28 14:57:39 +11:00
Adrian Danis
e77d4d48cc Merge pull request #443 in SEL4/sel4 from ~ADANIS/sel4:recvwithmrs to master
* commit '339096d39eee5f85362ff5bbd1fcce7b81bacd71':
  Also let aarch32 seL4_RecvWithMRs/ReplyRecvWithMRs
2016-10-28 03:33:30 +00:00
Adrian Danis
151e95d908 libsel4: Update VTX invocations to use condition= instead of config= 2016-10-28 14:09:28 +11:00
Adrian Danis
654e366f5e libsel4: Update condition for SetEPTRoot
Using `config=` for guarding invocations was changed to be
`condition=`, but `SetEPTRoot` was not updated
2016-10-28 13:58:51 +11:00
Adrian Danis
48f99701c3 libsel4: Move vt-x definitions into common x86 2016-10-28 12:16:41 +11:00
Jeff Waugh
339096d39e Also let aarch32 seL4_RecvWithMRs/ReplyRecvWithMRs 2016-10-28 12:04:15 +11:00
Adrian Danis
7fbde1bbcb SELFOUR-287: 32-bit vt-x implementation
This is an implementation of vt-x for x86 kernels running in
ia32 mode.
2016-10-27 16:20:30 +11:00
Adrian Danis
cb79c0dd97 Merge pull request #437 in SEL4/sel4 from ~ADANIS/sel4:stubgen to master
* commit '59d48b778b6daf50cc612f7bd4f64c9d1bdf2e21':
  Let x86_64 CallWithMRs
2016-10-27 02:54:57 +00:00
Jeff Waugh
59d48b778b Let x86_64 CallWithMRs
* `syscall_stub_gen.py` now works on x86_64 without passing `--buffer`
2016-10-27 12:09:00 +11:00
Jeff Waugh
df1f021cc6 Let aarch32 CallWithMRs
* Initialise the message variables (as per ia32 and x86_64)
* `libsel4` now builds when `syscall_stub_gen.py` is run without `--buffer`
* While simple things appear to work, `sel4test` with aarch32 in qemu is *not* happy:

```
Bootstrapping kernel

Warning: using printf before serial is set up. This only works as your
printf is backed by seL4_Debug_PutChar()
sel4utils_create_object_at_level@mapping.h:22 Should not be called
Ignoring call to sys_rt_sigprocmask
Ignoring call to sys_gettid
sys_tkill assuming self kill
```
2016-10-27 04:39:27 +11:00
Adrian Danis
b90238d089 Replace #pragma once with include guards 2016-10-21 12:05:02 +11:00
Anna Lyons
49f26d5c84 Fix benchmark_debug_syscall_start
The lowest syscall number is -8, which doesnt' fit in 3 bits -> change
to 4.
Also, we were storing the -ve number, which also doesn't fit into 3
bits -> invert it when we store it.
2016-10-20 15:07:49 +11:00
Hesham Almatary
3c01da7018 Trivial: correct x86_64 seL4_BenchmarkReset() return value 2016-10-20 12:14:35 +11:00
amrzar
2d462d4ad9 add basic api for setting affinity 2016-10-19 08:35:37 +11:00
Amirreza Zarrabi
5921a5308e Merge pull request #409 in SEL4/sel4 from ~AZARRABI/sel4:xml_config to master
* commit 'e0d2a83fa6291caa10b760ebe30b915c12ff6596':
  update xml format to replace config with condition
2016-10-17 02:38:39 +00:00
amrzar
e0d2a83fa6 update xml format to replace config with condition 2016-10-17 13:02:51 +11:00
Amirreza Zarrabi
b5804a698e Merge pull request #407 in SEL4/sel4 from ~AZARRABI/sel4:xml_config to master
* commit 'ee75f086f33f36d14f26523e005054a4d277c6de':
  update #ifdef to #if in auto generated files
2016-10-17 01:52:00 +00:00
amrzar
ee75f086f3 update #ifdef to #if in auto generated files 2016-10-17 12:18:58 +11:00
Adrian Danis
1a98a2a31f libsel4: Reorder bootinfo struct
This reorders the bootinfo struct to place the untyped array as the
last element. Having the array at the end makes the layout of the
information in this struct easier to represent in other languages.
2016-10-17 09:53:58 +11:00
Adrian Danis
f72d02f61e arm/libsel4: Update VCPU fault definitions
With the introduction of debug faults the numbers for VCPU faults
got changed, this commit updates them accordingly
2016-10-12 16:10:39 +11:00
Bamboo
f062dcdcf9 [STYLE_FIX] 2016-10-12 03:07:32 +00:00
Adrian Danis
7d50c439a8 Defined untyped size ranges in libsel4 2016-10-12 12:22:32 +11:00
Adrian Danis
067b71cad4 x64/libsel4: Add x64 libsel4 implementation 2016-10-12 12:22:32 +11:00
Kofi Doku Atuah
bebfcf6d27 SELFOUR-499: X86, ARM: Add userspace invocations for hardware debugging
This commit implements the body of SELFOUR-499. The API exposes the x86 DR0-7
and ARM coprocessor 14 features to userspace by virtualizing them as context-
switched registers in the TCB. Implemented as TCB invocations. This feature is
only built when CONFIG_HARDWARE_DEBUG_API is selected.

* Add low-level support routines for setting, unsetting, getting, enabling
  and disabling breakpoints.
* Add support for single-stepping as well.
  ^ Single-stepping is not supported on ARMv6 since the hardware
    doesn't have support.
  ^ ARM implements single-stepping as instruction breakpoints
    configured to fault on every instruction -- this is achieved through
    the "mismatch" mode, which is only supported from ARMv7 onwards.
* Also support explicit software break requests, a la "BKPT" and "INT $3".

* New invocations:
  * seL4_TCB_SetBreakpoint().
  * seL4_TCB_GetBreakpoint().
  * seL4_TCB_UnsetBreakpoint().
  * seL4_TCB_ConfigureSingleStepping().
* New constants:
  ^ Event types:
    ^ seL4_InstructionBreakpoint.
    ^ seL4_DataBreakpoint.
    ^ seL4_SoftwareBreakRequest.
  ^ Access types:
    ^ seL4_BreakOnRead.
    ^ seL4_BreakOnWrite.
    ^ seL4_BreakOnReadWrite.
  ^ Exports:
    ^ seL4_NumHWBreakpoints.
    ^ seL4_NumExclusiveBreakpoints.
    ^ seL4_NumExclusiveWatchpoints.
    ^ seL4_NumDualFunctionMonitors.
    ^ seL4_FirstBreakpoint.
    ^ seL4_FirstWatchpoint.
    ^ seL4_FirstDualFunctionMonitor.

See documentation in the seL4 API manual.
2016-10-10 13:53:21 +11:00
Adrian Danis
45622671de x86: Define large frame types 2016-10-06 07:39:25 +11:00
Adrian Danis
4f625591ef arm/libsel4: Correct seL4_DebugRun
In a3e60fd025 seL4_DebugRun was refactored incorrectly. This
commit corrects the name and arguments of its function call
2016-10-05 15:36:09 +11:00
Bamboo
f56d1ec1be [STYLE_FIX] 2016-10-05 00:39:04 +00:00
Adrian Danis
1d5d8d4f8e Merge pull request #374 in SEL4/sel4 from ~ADANIS/sel4:syscall to master
* commit '8a0a781441d98abd630b3a8ae1cdc879c5479dc3':
  ia32/libsel4: Refactor syscall functions
  arm/libsel4: Refactor syscall functions
2016-10-05 00:20:35 +00:00
Anna Lyons
7336303b7f SELFOUR-276: Add MCP field to threads.
Where MCP = Maximum Controlled Priority

This commit adds:

* seL4_TCB_SetMCPriority

and changes the arguments to

* seL4_TCB_Configure

As of this commit, a thread cannot create or set a threads
priority (including itself) above its mcp. Previously the kernel
did this check against a threads priority, which prevented a thread
from setting it's own priority down and then up again.
2016-10-05 11:11:19 +11:00
Adrian Danis
8a0a781441 ia32/libsel4: Refactor syscall functions
Refactors syscalls to use common base functions for assembly stubs.
These base functions are duplicated to create the PIC variants.
2016-10-04 17:22:48 +11:00
Adrian Danis
a3e60fd025 arm/libsel4: Refactor syscall functions
Refactors syscalls to use common base functions for assembly stubs.
As a result of this refactor the problem of low optimization levels
breaking the syscall stubs is also resolved.
2016-10-04 17:22:48 +11:00
Hesham Almatary
9c507cffd1 SELFOUR-603 - Benchmark: Add null syscall 2016-09-28 11:05:25 +10:00
Adrian Danis
2a84b7d792 Merge pull request #120 in SEL4/sel4 from ~ADANIS/sel4:deviceuntyped to master
* commit '8e77cdb5e91e971f49747492a3350c2b443a3827':
  SELFOUR-421: Add padding for untyped in bootinfo
  SELFOUR-421: minor changes for c-refine
  SELFOUR-421: fix up boolean equality in Arch_sameObjectAs
  SELFOUR-421: added device check to sameObjectAs
  SELFOUR-421: Arch_createObject changed to use new user_data_device in ghostupdates for device pages
  SELFOUR-421 Introduce explicit device frames and untypeds
2016-09-23 04:16:22 +00:00
Adrian Danis
8e77cdb5e9 SELFOUR-421: Add padding for untyped in bootinfo 2016-09-23 14:15:09 +10:00
Adrian Danis
d507b2d39e SELFOUR-421 Introduce explicit device frames and untypeds
Kernel objects cannot be created from device untypeds, with the
exception of frames, which do not get zeroed and cannot be used
as an IPC buffer. Device untypeds additionally cannot be used
in the construction of ASID pools.

This then changes the API to the rootserver (i.e. bootinfo) to
send device untypeds instead of device frames. On ARM these
device untypeds are the same as the previously exported device
frame regions. On x86 PCI scanning is removed and all physical
memory addresses (that are not important for kernel integrity)
are released to the user.

In order to have bits in the frame and untyped caps on ARM the
number of software ASIDs had to be reduced from 2^18 to 2^17,
and the maximum untyped size reduced from 2^31 to 2^30
2016-09-23 14:15:08 +10:00
Anna Lyons
8d32cc26fc trivial: fix typo in libsel4 Makefile 2016-09-22 08:24:27 +10:00
Hesham Almatary
9e104c1626 Merge pull request #353 in SEL4/sel4 from ~HALMATARY/sel4:BenchmarkReset to master
* commit '8808ba7fa00591528c1c730c6cfeb4ee6ef82e8b':
  Benchmark: Implement per-thread reset syscall
2016-09-20 00:22:49 +00:00
Stephen Sherratt
c464470d6c Syscalls docs in manual generated by doxygen
This adds a dummy header with syscall prototypes with doxygen comments.
The build process for the manual includes parsing these comments using
doxygen. Doxygen produces an xml file which is parsed by a script to
generate latex which is included in the manual. This approach was chosen
over doxygen's native latex output to gain greater control over the
formatting of the generated documentation, and to take advantage of
existing api-formatting support in the sel4 manual.

Related issue: SELFOUR-606
2016-09-16 10:09:36 +10:00
Hesham Almatary
8808ba7fa0 Benchmark: Implement per-thread reset syscall 2016-09-12 13:54:12 +10:00
Adrian Danis
0fb224b095 x86: Correct seL4_DebugRun syscall stub
This stub was messed up during the merge of
fbeb95edb9
this commit corrects
2016-08-31 10:48:21 +10:00
Bamboo
af77b451e5 [STYLE_FIX] 2016-08-30 14:42:20 +10:00
Adrian Danis
b114f6b9ea Merge pull request #346 in SEL4/sel4 from ~ADANIS/sel4:github34 to master
* commit '25f366817ff6dbceb9fb90429f73f0aa08f6ca87':
  x86: support position independent syscall bindings
2016-08-30 04:37:28 +00:00
Adrian Danis
25f366817f Merge branch 'issue_34' of ssh://github.com/alex-ab/seL4 into HEAD
Conflicts:
	libsel4/sel4_arch_include/ia32/sel4/sel4_arch/syscalls.h
2016-08-30 11:57:48 +10:00
Alexander Boettcher
fbeb95edb9 x86: support position independent syscall bindings
Fixes #34
2016-08-26 10:58:30 +02:00
Hesham Almatary
fb19c78e12 Benchmark: Share trace point log structure with the user 2016-08-26 11:13:05 +10:00
Anna Lyons
ef00e98689 SELFOUR-615: arm entry point stubs 2016-08-24 10:42:36 +10:00
Hesham Almatary
c3826e0efe SELFOUR-518: Benchmark - User-level log buffer, delete dump and size system calls
Given that the log buffer is now
(79291252a8) in user-level, the kernel doesn't have
to dump and send the size for users. Users have to take care of this.
2016-08-19 12:57:03 +10:00
Anna Lyons
f34f354a5d SELFOUR-617: one source of memory object sizes
Adds the following constants to libsel4
and uses them in the kernel.

seL4_SectionSize (arm)
seL4_SuperSectionSize (arm)
seL4_HugePageSize (x86 - pae)
seL4_LargePageSize (arm)
seL4_DataFault
seL4_InstructionFault
2016-08-17 12:42:38 +10:00
Stephen Sherratt
0a2a9842d2 libsel4: Explicitly casting cap rights 2016-08-16 17:05:34 +10:00
Stephen Sherratt
9c72698655 Merge pull request #327 in SEL4/sel4 from ~SSHERRATT/sel4:cap-rights-interface to master
* commit 'da0c39f473270a965d8ad73774a204290dd5b44b':
  libsel4: Tidied comments and moved compound rights
  libsel4: Use pragma once in cap rights header
  libsel4: Added cap rights interface wrapper
2016-08-16 03:41:10 +00:00
Stephen Sherratt
da0c39f473 libsel4: Tidied comments and moved compound rights 2016-08-15 15:43:53 +10:00
Hesham Almatary
16c3481109 SELFOUR-518: User-level log buffer
Remove global ksLog and use KS_LOG_PPTR instead

Benchmark - Log buffer: use global page table
2016-08-15 15:06:38 +10:00
Stephen Sherratt
cdf539de1e libsel4: Use pragma once in cap rights header 2016-08-15 11:29:16 +10:00
Stephen Sherratt
216ed97514 libsel4: Added cap rights interface wrapper 2016-08-15 11:22:01 +10:00
Adrian Danis
abaf3dfcfb Merge pull request #245 in SEL4/sel4 from ~CRICHARDSON/sel4:configurable-python to master
* commit '9f9bbc5b89fac99c0d5e132ad5ca3dcfa494e4dc':
  SELFOUR-418: Allow overriding python executable used with PYTHON env var
2016-07-22 04:35:24 +00:00
Stephen Sherratt
91718da4a2 Fixed clobbered register in Signal syscall stub 2016-07-19 14:20:04 +10:00
Hesham Almatary
d97603bd84 SELFOUR-566: Decouble seL4_DebugNameThread from CONFIG_PRINTING 2016-07-15 12:30:17 +10:00
Alexander Boettcher
9fc8194b1f fix "syscall_stub_gen.py --word-size" invocation
Fixes #29
2016-07-06 16:03:58 +02:00
Anna Lyons
ffc15e95bb SELFOUR-436: libsel4 s/__SWINUM/__SEL4_SWINUM
Namespace the definition and do not #undef.
2016-07-01 12:16:02 +10:00
Hesham Almatary
09358f9b6a SELFOUR-448 Benchmark: Track thread's CPU utilisation time 2016-06-24 12:43:09 +10:00
Adrian Danis
e38288f805 Merge branch master into arm_hyp 2016-06-22 16:25:09 +10:00
Adrian Danis
037584196c tools: Updated DTD for conditional invocation labels 2016-06-22 11:58:30 +10:00
Adrian Danis
cd96226421 Merge branch master into arm_hyp
Conflicts:
	include/arch/arm/arch/32/mode/object/structures.h
2016-06-21 14:39:32 +10:00
Adrian Danis
ce8dfb1590 tools: Further support for conditional invocation labels
Condition invocation labels where added in commit 73837c8ace
This commit guards usage of conditionally generated labels during generation
of the syscall stubs.
2016-06-21 09:20:26 +10:00
Adrian Danis
f14dcdd0da arm-hyp: Add conditions to invocations 2016-06-15 17:53:25 +10:00
Corey Richardson
9f9bbc5b89
SELFOUR-418: Allow overriding python executable used with PYTHON env var 2016-06-10 16:08:26 +10:00
Adrian Danis
e67be6acee Merge branch master into arm_hyp
Conflicts:
	src/plat/exynos5/machine/hardware.c
	src/plat/tk1/machine/hardware.c
2016-06-08 15:04:03 +10:00
Adrian Danis
6d6b047b2d Minor fixes for other ARM platforms 2016-06-07 13:35:55 +10:00
Kofi Doku Atuah
1b11d4b601 libsel4: add seL4_NumErrors to enum seL4_Error 2016-06-07 11:06:57 +10:00
Hesham Almatary
a84964ba4c SELFOUR-446 Benchmark: Share kernel entry types with user-level 2016-06-07 09:19:31 +10:00
Adrian Danis
5f0ae410f4 arm-hyp: Minor cleanups
Cleanup some small licensing, whitespace and configuration details
2016-06-06 11:51:58 +10:00
Adrian Danis
41603a26ca Correct merge of master 2016-06-02 12:15:46 +10:00
Adrian Danis
b001bc4489 Merge branch 'master' into 'arm_hyp'
Conflicts:
	Kconfig
	libsel4/tools/syscall_stub_gen.py
	src/plat/exynos5/machine/hardware.c
	src/plat/tk1/machine/Makefile
	src/plat/tk1/machine/hardware.c
2016-06-02 10:57:12 +10:00
Hesham Almatary
46698d5383 Merge pull request #192 in SEL4/sel4 from ~HALMATARY/sel4:feature/syscall_bench2 to master
* commit 'bcf0a235b114fe8c24c3a187f55c67c373f259d3':
  SELFOUR-446 Unify code base for trace points and track feature
  SELFOUR-446 Benchmark: Track interrupts and user/vm faults
  Fix: move seL4_LogBufferSize to the correct file
  SELFOUR-446 Benchmark: Track syscall feature
2016-06-02 00:53:20 +00:00
Hesham Almatary
bcf0a235b1 SELFOUR-446 Unify code base for trace points and track feature 2016-06-02 10:49:25 +10:00
Hesham Almatary
7cbaeb8ed0 SELFOUR-446 Benchmark: Track interrupts and user/vm faults 2016-05-31 08:54:57 +10:00
Yanyan Shen
4b357744e0 Merge pull request #199 in SEL4/sel4 from ~YSHEN/sel4k:feature/arm_hyp_tk1 to arm_hyp
* commit 'eee71654b2c7e13ff282109845073794b337b060':
  arm-hyp/tk1: add ARM_HYP as a dependency
  arm-hyp/tk1: remove unnecessary check
  arm-hyp/tk1: make style
  arm-hyp/tk1: address review comments.
  arm-hyp/tk1: address review comments.
  arm-hyp/tk1: should trap SMC from guest kernel
  arm-hyp/tk1: remove const number
  arm-hyp/tk1: make style
  arm-hyp/tk1: add default SMMU translation for VM
  arm-hyp/tk1: enable SMMU interrupts
  arm-hyp/tk1: reserve the SMMU interrupt
  arm-hyp/tk1: fix bugs found during testing
  arm-hyp/tk1: add the missing return
  arm-hyp/tk1: put iospace caps to bootinfo
  arm-hyp/tk1: disable/enable SMMU in secure mode
  arm/tk1: connect objects with SMMU invocations
  arm/tk1: a checkpoint for iospace.c
  arm/tk1: a checkpoint for SMMU implementation
2016-05-27 06:16:04 +00:00
Adrian Danis
a2a15fd257 Merge pull request #188 in SEL4/sel4 from ~ADANIS/sel4:status to master
* commit '0d73506a21e76a5bab7070f5f21ea3c22d39f3ee':
  SELFOUR-484 x86: Get status bits invocation
2016-05-26 01:17:14 +00:00
Adrian Danis
0d73506a21 SELFOUR-484 x86: Get status bits invocation
This adds an invocation on page directories that returns the
status (accessed + dirty) bits of mapping.
2016-05-26 10:55:39 +10:00
Hesham Almatary
9ec83284c4 Fix: move seL4_LogBufferSize to the correct file 2016-05-25 13:48:43 +10:00
Hesham Almatary
fc1feb670e SELFOUR-446 Benchmark: Track syscall feature
Benchmark feature that currently:
- Keeps track of system calls info
- Start time
- Duration
- Capability type
- Invocation tag
- Log the number of invocations of each system call*
- Log the number of invocations for each capability type per syscall.
- Has 3 new syscalls (dump, reset, get size).
- This new feature uses the existing log buffer (which is 1MiB for x86
and ARM). Since the number of syscall invocations is not
deterministic, the logged number of invocations is limited by the size
of the buffer. I suggested to enable the users to pass their own
user-level buffer, to enable more flexibility, later.
- ENABLE_BENCHMARKS is now a parent config option of trace points and
system call track features, they can't be used at the same time.
2016-05-25 13:47:49 +10:00
Adrian Danis
56f7b3fc8d libsel4: arm: Reintroduce -O0 warning 2016-05-25 10:37:27 +10:00
Yanyan Shen
11720f23ad arm-hyp/tk1: fix bugs found during testing 2016-05-20 00:00:46 +10:00
Adrian Danis
1287590e97 Correct separation of printing and debug builds
Fixes some build issues with 541289a326
as well as further allowing debugging (via the capdl interface) to
happen when printing is turned off.
2016-05-17 15:10:08 +10:00
Yanyan Shen
508e87477f arm/tk1: connect objects with SMMU invocations 2016-05-17 12:16:34 +10:00
Yanyan Shen
879d9724c1 arm/tk1: a checkpoint for SMMU implementation 2016-05-13 16:42:53 +10:00
Hesham Almatary
128abb8356 Merge pull request #162 in SEL4/sel4 from ~HALMATARY/sel4:master to master
* commit 'e7c6140cf061fc4e9432f445451e2b4231a711d5':
  Benchmarks: Add definition of seL4_LogBufferSize to x86
2016-04-28 04:27:29 +00:00
Anna Lyons
12efee6a76 SELFOUR-404: fix bug related to double words
They would get shifted by the size of the type rather than the
size of the word. This wasn't detected initially as the master
branch of the kernel does not have any double word types in the API.
2016-04-28 10:56:19 +10:00
Hesham Almatary
e7c6140cf0 Benchmarks: Add definition of seL4_LogBufferSize to x86
Updates SELFOUR-446
2016-04-27 12:07:46 +10:00
Partha Susarla
f186c71b9a SELFOUR-404: Remove hardcoded constants in stub generator.
`syscall_stub_gen` has hardcoded constants for word size, this patch removes
that constraint and makes the word size an argument to the program instead.
The word size can either be passed either as command line arugmemt (-w option)
or a path to the build configuration file can be given(-c option) and the
generator will use the value of `CONFIG_WORD_SIZE` instead.
The `Makefile` in `libsel4` calls the generator with the configuration file as
an option.

Ideally, the architecture should be determined from the configration file, but
since we don't have unit tests for the generator, I will make one change at a
time.

This commit also includes a few changes to make it Python 2.7 compliant.
2016-04-06 19:16:45 +10:00
Adrian Danis
f2771c004c libsel4: Define SEL4_MAPPING_LOOKUP_NO_PT for ARM_HYP 2016-04-04 11:45:53 +10:00
Adrian Danis
6932e6a725 Merge branch master into arm_hyp 2016-03-22 16:48:52 +11:00
Anna Lyons
603484f958 SELFOUR-114: trivial - add missing types to x86 2016-03-03 11:30:11 +11:00
Anna Lyons
289bf92bf0 SELFOUR-114: remove bootinfo.h duplication 2016-03-01 17:25:22 +11:00
Adrian Danis
6523fe40e4 Correct previous merge 2016-02-22 16:37:34 +11:00
Adrian Danis
22623be2f8 Merge branch master into arm_hyp
Conflicts:
	include/arch/arm/arch/32/mode/object/structures.h
	libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h
	src/arch/arm/32/model/statedata.c
2016-02-22 15:55:31 +11:00
Adrian Danis
d0a42bbf49 Merge commit '812a73a9f58670cb18c36694d505dcd742c2ba8b' into arm_hyp 2016-02-22 15:02:12 +11:00
Adrian Danis
30e5b5948d trivial: style 2016-02-10 17:02:06 +11:00
Adrian Danis
5349282478 x86/libsel4: Rename ia32->x86
Rename all functions, constants and types in libsel4 that are in the
general x86 architecture to have an X86 name instead of an IA32 name.
As libsel4 and the kernel share names this requires changing those
in the kernel as well.

All the original IA32 names can still be used for the moment, but are
marked as deprecated.
2016-02-10 16:50:49 +11:00
Adrian Danis
cfcaf49c2d SELFOUR-399: object sizes and globals frame addr should come from the same source 2016-02-10 09:13:16 +11:00
Adrian Danis
1a85b40904 libsel4: Change syscall_stub_gen to cast constants to the correct word size 2016-02-04 10:30:55 +11:00
Adrian Danis
4b47b164fe libsel4: Change some uses of seL4_Word->seL4_Uint32 in bootinfo
This merely aligns the libsel4 bootinfo declaration with kernel.
Each change corresponds to a place where the kerne bootinfo_t
structure is using a uint32_t
2016-02-03 16:16:00 +11:00
Adrian Danis
9b7a8405c2 Change bootinfo to have generic slot region for paging structures
Current bootinfo defines two slot regions for paging structures,
one for page directories and one for page tables. This does not
easily generalise for N levels of paging structures. This change
uses a single region that has a known order of objects for however
many levels exist
2016-02-03 16:16:00 +11:00
Adrian Danis
bddd804a6e x86: IOAPIC/MSI syscalls
Restructure the x86 interrupt handling to allow for a more flexible
method of using IOAPIC and MSI interrupts. The essence of this change
is to allow for the user to pick, for both IOAPIC and MSIs, which
CPU vector to use. Additionally there is future support, in the API,
for seL4 to eventually protect MSI interrupts with the vt-d interrupt
routing tables.

API behaviour for legacy systems using the PIC is preserved

Part of SELFOUR-281
2016-02-02 15:58:18 +11:00
Adrian Danis
d1eb5a12ec Correct previous merge 2016-02-02 15:00:05 +11:00
Adrian Danis
95c33147c0 Merge branch master into arm_hyp
Conflicts:
	Kconfig
	include/arch/arm/arch/fastpath/fastpath.h
	include/arch/arm/arch/machine.h
	include/arch/arm/arch/machine/hardware.h
	include/arch/arm/arch/machine/registerset.h
	include/arch/arm/arch/model/statedata.h
	include/arch/arm/arch/object/structures.bf
	include/arch/arm/arch/object/structures.h
	libsel4/arch_include/arm/sel4/arch/exIPC.h
	libsel4/arch_include/arm/sel4/arch/types.h
2016-02-01 14:57:37 +11:00
Adrian Danis
915a404d5c libsel4: Provide a layer of indirection around types.bf and shared_types.bf to allow for 64-bit variants 2016-01-21 13:31:54 +11:00
Adrian Danis
be67fdb0bc libsel4: Move arm object types from aarch32/objecttype.h back to arm/objecttype.h
Moving the section and super section objects to the aarch32 mode headers caused the
object orders to be reordered, which breaks verification. This commit undoes this
until it can either be verified or refactored a different way.
2016-01-20 09:26:11 +11:00
Adrian Danis
a701481095 Merge pull request #85 in SEL4/sel4 from ~AZARRABI/sel4:aarch32 to master
* commit '1a1110a0949c76a2d372e2bba6b2526898c51a68':
  Modify Kconfig and Makefile for aach32 as sel4_arch libsel4: updates to include aarch32 as sel4_arch
2016-01-19 05:17:46 +00:00
amrzar
1a1110a094 Modify Kconfig and Makefile for aach32 as sel4_arch
libsel4: updates to include aarch32 as sel4_arch
2016-01-19 15:37:52 +11:00
Adrian Danis
c3b04449d7 x86: Remove nonexistant iospace syscalls 2016-01-19 12:27:18 +11:00
Adrian Danis
380697ab5c Fixes for recent merge with master branch 2016-01-19 11:30:30 +11:00
Adrian Danis
93ca3581fc Merge branch master into arm_hyp
Conflicts:
	include/arch/arm/arch/api/objecttype.h
	libsel4/tools/syscall_stub_gen.py
	src/arch/arm/kernel/vspace.c
	src/arch/arm/object/objecttype.c
2016-01-19 10:52:25 +11:00
Adrian Danis
a6aa7472f3 Remove redundant IRQInterruptControl invocation, and replace with a mechanism to actually decode arch specific IRQ invocations
Part of SELFOUR-281
2016-01-18 11:37:52 +11:00
Adrian Danis
e89bb3f37a x86: avoid packing/unpacking for IOPortOut 2016-01-14 17:15:39 +11:00
Yanyan Shen
1399527956 libsel4: use seL4_Word to avoid packing on architectures where int is not the machine size 2016-01-12 10:58:09 +11:00
Adrian Danis
e971b9bcaf libsel4: Make FORCE_LONG_ENUM actually force a long instead of an int 2016-01-12 10:58:09 +11:00
Anna Lyons
6c6a925233 SELFOUR-406: fix message length used by seL4_Signal in libsel4 2016-01-12 10:33:16 +11:00
Anna Lyons
fbc2667fb6 trivial: fix Makefile change dropped by merge 2016-01-11 16:38:51 +11:00
Adrian Danis
545294136b libsel4: Allow WORD_SIZE_BITS to be changed in the syscall stub generator 2016-01-11 15:29:26 +11:00
Anna Lyons
e619975c0e SELFOUR-114: make IPC buffer definition accessible to the kernel 2016-01-11 11:16:24 +11:00
Anna Lyons
d93699c9a3 SELFOUR-114: remove duplication of seL4_MessageInfo_t, adjust naming to avoid cparser mangling 2016-01-11 11:16:08 +11:00
Adrian Danis
44a522dce2 libsel4: Generate libsel4 definitions from the current ARCH as well as the SEL4_ARCH 2016-01-08 10:16:30 +11:00
Anna Lyons
7758899844 SELFOUR-244: symlink duplicated files from libsel4 into kernel rather than duplicating them, remove sanity target as a result 2016-01-05 08:33:39 +11:00
Adrian Danis
8e15c42921 x86: Port some of the IOMMU changes on the experimental branch
This changes the IOMMU from using passthrough devices and instead
directly mapping in the reserved regions that are needed for each
device.
2015-12-18 15:06:39 +11:00
Adrian Danis
646638efee x86: Do not conditionally compile IOMMU code, use build/run time checks
Guarding code with #ifdef's makes even cursor testing of 'does this code compile'
difficult due to code being hidden by the pre-processor. Using config_set in
regular C if statements is performant as the compiler can trivially detect
dead code at compile time, and at -O1 and above will not even link in symbols
referenced by dead code in these blocks, so this will not bloat image size
2015-12-17 14:37:08 +11:00
Adrian Danis
5d42d0143e x86: Do not conditionally compile IRQ controller code, use build/run time checks
Guarding code with #ifdef's makes even cursor testing of 'does this code compile'
difficult due to code being hidden by the pre-processor. Using config_set in
regular C if statements is performant as the compiler can trivially detect
dead code at compile time, and at -O1 and above will not even link in symbols
referenced by dead code in these blocks, so this will not bloat image size
2015-12-17 14:37:08 +11:00
Adrian Danis
c2a85cdcb1 libsel4: Define different lookup levels for PAE 2015-12-17 14:02:22 +11:00
Adrian Danis
9113dfa8e5 trivial: style 2015-12-17 10:49:13 +11:00
Adrian Danis
dc3e0d48e2 Merge pull request #15 in SEL4/sel4 from ~ADANIS/sel4:libsel4 to master
* commit '5271925ba54639b849261e652e73ab56ee243fb2':
  libsel4: Always usage IPC buffer for invocations (SELFOUR-381)
2015-12-16 23:47:20 +00:00
Adrian Danis
5a6f0c71b8 libsel4: Add standard way of interpreting the meaning of a 'FailedLookup' for mapping operations 2015-12-16 12:29:25 +11:00
Adrian Danis
5271925ba5 libsel4: Always usage IPC buffer for invocations (SELFOUR-381)
Currently the syscall invocations may throw away error information
in an unretrievable way if they attempt to avoid using the IPC buffer
2015-12-16 12:27:32 +11:00
Adrian Danis
0e3afb487b libsel4: use seL4_Word for object types and update the sanity script to match word_t to seL4_Word 2015-12-10 16:08:39 +11:00
Ramana Kumar
dbe3e41a88 libsel4: Generate non inlined syscall invocations
For performing verification on libsel4 the syscall invocations need
to not be inlined. This provides a (somewhat hacky) way of doing that.
2015-12-09 15:41:25 +11:00
Stephen Sherratt
7bb064ab2b Removed whitespace difference between kernel and user objecttype.h 2015-12-03 10:37:20 +11:00
Adrian Danis
9aa7059465 Merge remote-tracking branch 'local/master' into HEAD 2015-12-02 17:49:40 +11:00
Adrian Danis
460c87ddf3 Merge commit '5d64d156f47c20ae049c0c854797291436f84021' into HEAD 2015-12-02 17:13:07 +11:00
Anna Lyons
ddc1ce7e90 SELFOUR-365: libsel4: Use compile time offsets instead of hard coding offsets 2015-12-01 12:14:06 +11:00
Anna Lyons
827819f79b trivial: add constant for number of caps passed to the initial thread 2015-11-30 15:05:55 +11:00
Anna Lyons
a99a10408d SELFOUR-279: rename Wait -> Recv, add wrappers for seL4_Poll and seL4_Wait for notification objects.
This commit deprecates seL4_ReplyWait, removes seL4_NBwait completely,
and changes the return type of seL4_Wait to void (seL4_Wait should be
used for notification objects, and seL4_Recv should be used where
seL4_Wait was used previously for endpoints).
2015-11-20 15:28:18 +11:00
Anna Lyons
052feb222e trivial: move seL4_Notify to deprecated.h 2015-11-10 17:47:54 +11:00
Adrian Danis
aef03c325e libsel4: Restrict syscall stub compilation at -O0
The 'WithMRs' variants of the syscall stubs are known to be broken
on ARM with GCC at -O0. This commit prevents the generation and
usage of these stubs when -O0 is set in the common tool configuration
options.

Due to limitations in specifying Kconfig constraints, and to preserve
the existing meaning of the Kconfig variables, the 'LIB_SEl4_STUBS_USE_IPC_BUFFER_ONLY'
config variable has to be duplicated with two variants, one for use
when the user is free to pick either and one hidden for when selection
has to be forced. Also to prevent the sub options from not appearing
in the libsel4 submenu I had to change libsel4 to be a 'true' menu
instead of a 'menuconfig'

This commit closes SELFOUR-187
2015-11-03 10:54:37 +11:00
Anna Lyons
d9802d179f Add seL4_NBWait: non blocking wait for notifications and endpoints. 2015-10-21 13:43:39 +11:00
Siwei Zhuang
9d909f743a Merge remote-tracking branch 'seL4/master' into arm_hyp
Conflicts:
	include/arch/arm/arch/api/constants.h
	libsel4/arch_include/arm/sel4/arch/types.h
	src/fastpath/fastpath.c
	src/plat/exynos5/machine/hardware.c
2015-10-16 14:41:36 +11:00
Anna Lyons
0489e00f88 add seL4_NotificationBits for x86 2015-10-13 15:08:21 +11:00
Anna Lyons
7cfcfd1f27 trivial: fix typo in x86 definition of seL4_Signal 2015-10-13 15:08:08 +11:00
Anna Lyons
79be32ace2 AEP -> Notification: deprecate old API syscalls, functions and constants that refer to AEP's and introduce new ones that refer to Notifications 2015-10-13 13:26:04 +11:00
Adrian Danis
97042a0f07 Introduce 'Notification Binding': a new feature which allows a tcb to be bound to a single asynchronous endpoint. 2015-10-09 15:19:58 +11:00
Anna Lyons
b039ba17cf refactor Kconfigs to fix library menu display: library configs will no longer be swallowed by previous libraries 2015-09-15 17:10:45 +10:00
Anna Lyons
b97baf653b Merge pull request #142 from ssherratt/features2
Features2
2015-09-08 14:22:48 +10:00
Stephen Sherratt
4b3ac0e8e7 Surrounding benchmarking definitions with "#if CONFIG_MAX_NUM_TRACE_POINTS > 0". 2015-09-08 12:46:09 +10:00
Anna Lyons
259f0a47f9 Merge pull request #140 from ssherratt/features2
Added support for using multiple tracepoints at the same time.
2015-09-08 11:20:58 +10:00
Matthew Fernandez
135bdbbfbd libsel4/tools: Fix: Remove incorrect usage message. 2015-09-04 15:59:46 +10:00
Stephen Sherratt
e82953a194 Removed CONFIG_BENCHMARK config option. All checks for '#ifdef CONFIG_BENCHMARK' replaced with '#if CONFIG_MAX_NUM_TRACE_POINTS > 0'. 2015-09-03 11:39:31 +10:00
Stephen Sherratt
bea651d6c2 Config sections in syscall.xml files take a condition which is passed to #if. 2015-09-03 11:39:31 +10:00