Commit graph

61 commits

Author SHA1 Message Date
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
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
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
Stephen Sherratt
4c2554dcc9 Added support for using multiple tracepoints at the same time. 2015-09-03 11:39:31 +10:00
Anna Lyons
1746352673 fix syscall stub gen to shift by the size of the type not the type itself when outputting double word values 2015-07-30 11:09:14 +10:00
Adrian Danis
c8e4f9bd08 Correctly generate a 64-bit type in unmarshalling code in syscall_stub_gen
This was introduced in changeset e653f8f65a
where hard coded size types were replaced with an indirection. This corrects
a case where a 'uint64_t' was replaced with a '%s', but there is no corresponding
'TYPES[64]' in the argument list, resulting in too few arguments when processing
the string
2015-07-28 15:22:00 +10:00
Adrian Danis
e588986797 Use CONFIG_NUM_PRIORITIES when defining seL4_MaxPrio (Fixes SELFOUR-261) 2015-07-28 15:10:16 +10:00
Adrian Danis
f15814b73f libsel4: Remove old stdint include 2015-07-27 11:48:53 +10:00
Wink Saville
e653f8f65a Streamline libsel4 and remove its libc dependencies.
There are now separate libs for benchmark, assert, printf, putchar
start/stop:

      libs/libsel4benchmark
      libs/libsel4assert
      libs/libsel4printf
      libs/libsel4putchar
      libs/libsel4startstop

The primary changes are introducing sel4/sel4.h and removing std* types
plus porting assert and IO code from the kernel to libsel4assert,
libsel4printf, libsel4putchar.

This means the code within libsel4 and the newlibs do not overload any
typical libc entities. Instead the libraries use types like
seL4_Uint32 ... instead of uint32_t. And printf is now seL4_Printf and
assert is seL4_Assert ....

Finally, the only file modified that effects kernel code is
kernel/tools/bitfield_gen.py. It needed to be modified as it generates
files for both kernel and user space. And for user space the generated code
(types_gen.h) needed to use the new types and asserts. The changes should
not change what is generated for the kernel and I did a comparison of
kernel_final.{c|s} before and after my change and the only differences
were time stamps.

Bug: #15 Streamline kernel/libsel4 and remove its libc dependencies
2015-07-09 18:03:46 -07:00
Adrian Danis
914741ea33 x86: Make x86 the name of the architecture instead of IA32
IA32 is 32bit version of the x86 architecture. Whilst only IA32
is supported, much of the code is generic x86. Using a generic
x86 architecture will aid in future 64bit support
2015-05-28 15:15:23 +10:00
Anna Lyons
f5afc2d917 change include/arch/ia32/arch/api/objecttype.h to match the libsel4 equivalent 2015-05-15 14:43:24 +10:00
Adrian Danis
952e5a272b Add ability to set a human readable thread name when running kernel in debug mode 2015-05-14 09:32:58 +10:00
Adrian Danis
12990f2092 libsel4: Updating xml specification for syscall stub changes 2015-03-12 16:06:58 +11:00
Adrian Danis
a9111d4b5d libsel4: Support multiple struct types for the generated syscall stubs 2015-03-10 15:12:06 +11:00
Matthew Fernandez
3775341b9b libsel4: Remove unused right seL4_Transfer_Mint. 2015-03-04 15:42:16 +11:00
Adrian Danis
a5e442a70e Merge branch master into pae 2015-02-17 10:37:33 +11:00
Matthew Fernandez
5e7030cb0a libsel4: Name the user context struct.
Without a name, this struct (and its typedef) comes out as an anonymous type
when imported into Isabelle. This makes it difficult to automate proofs of
functions that use this type.

See also JIRA VER-434
2015-02-11 09:54:04 +11:00
Adrian Danis
af0f3b361f ia32: Large commit that implements PAE paging for x86
This commit involves the PAE paging itself, refactoring the
vspace code to extra what is common between PAE and 32bit paging,
as well as some renaming to not call the root paging structure
a PD
2015-01-28 12:11:51 +11:00
Matthew Fernandez
c317d5b8df libsel4: Fix trivial comment typos. 2015-01-27 11:42:32 +11:00
Adrian Danis
09b22d3f6a Trivial: style 2015-01-13 16:41:18 +11:00
Adrian Danis
0adf212462 libsel4: Ensure the ARM syscall stubs always treat instances of seL4_MessageInfo as POD
A C++ compiler will attempt to interpret 'return info' as an invocation of a copy
constructor. Even though the copy constructor is auto-generated (and eventually
completely eliminated due to inlining) and just does obvious member copying it
still results in an intermediate invocation that must take a reference to 'info'.
Because 'info' is a register variable it is not permissable to take a reference
to it. Manually reconstructing a new info from the .words keeps everything as
Plain Old Data
2015-01-13 14:22:29 +11:00
Matthew Fernandez
644dff497b further support for XN bit on ARM 2014-11-26 12:44:06 +11:00
Anna Lyons
6e5204fe93 separate benchmark output by tabs instead of spaces such that it is easier to paste into spreadsheet programs 2014-11-19 15:01:43 +11:00