Commit graph

60 commits

Author SHA1 Message Date
Anna Lyons
8fb06eecff libsel4: Return seL4_Error in invocation stubs
Some stubs return structs, which will not change, however instead of
long for those that don't return structs they now return a seL4_Error.
2017-08-22 07:57:54 +10:00
Anna Lyons
64cf2308ac tools: fix licenses 2017-06-22 15:27:30 +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
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
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
447e924337 manual: Undocumented return defaults to error enum 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
ec3b640248 manual: Add label_prefix to method names 2017-06-02 15:34:45 +10: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
amrzar
6428e959b4 aarch64: Add aarch64 libsel4 implementation 2017-02-10 16:43:46 +11:00
Stephen Sherratt
1f1a5ad4dc manual: Removed default cap description 2016-12-16 15:57:57 +11:00
Adrian Danis
78009dd245 SELFOUR-675: x64: Increase message registers from 2 to 4 2016-11-30 12:04:54 +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
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
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
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
48f99701c3 libsel4: Move vt-x definitions into common x86 2016-10-28 12:16:41 +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
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
amrzar
ee75f086f3 update #ifdef to #if in auto generated files 2016-10-17 12:18:58 +11:00
Adrian Danis
067b71cad4 x64/libsel4: Add x64 libsel4 implementation 2016-10-12 12:22:32 +11: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
Alexander Boettcher
9fc8194b1f fix "syscall_stub_gen.py --word-size" invocation
Fixes #29
2016-07-06 16:03:58 +02: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
6d6b047b2d Minor fixes for other ARM platforms 2016-06-07 13:35:55 +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
Yanyan Shen
879d9724c1 arm/tk1: a checkpoint for SMMU implementation 2016-05-13 16:42:53 +10: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
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
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
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
1a85b40904 libsel4: Change syscall_stub_gen to cast constants to the correct word size 2016-02-04 10:30:55 +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
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
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
545294136b libsel4: Allow WORD_SIZE_BITS to be changed in the syscall stub generator 2016-01-11 15:29:26 +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
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
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
Matthew Fernandez
135bdbbfbd libsel4/tools: Fix: Remove incorrect usage message. 2015-09-04 15:59:46 +10:00
Anna Lyons
6860020137 Merge branch 'master' of github.inside.nicta.com.au:seL4/seL4 into arm_hyp
Conflicts:
	include/arch/arm/arch/object/structures.bf
	include/arch/arm/arch/object/structures.h
	include/arch/arm/armv/armv7-a/armv/fastpath.h
	src/arch/arm/armv/armv7-a/context_switch.c
	src/arch/arm/fastpath/fastpath.c
	src/arch/arm/kernel/vspace.c
	src/plat/exynos_common/mct.c
2015-07-30 11:35:12 +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
91c474cb95 Merge commit '952e5a272b5077ce6550035fbc5e2d6c55d09670' into arm_hyp
Conflicts:
	include/arch/arm/arch/object/structures.h
	src/arch/arm/kernel/thread.c
2015-07-21 09:40:06 +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