Commit graph

195 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
3a21701a71 libsel4/arm: Move VCPU to the common interface 2018-04-06 13:40:47 +10:00
Alexander Boettcher
734320d717 x86: add framebuffer info of MBI2 via boot_info 2017-11-30 22:54:01 +01:00
Adrian Danis
6707a74131 x86: GetStatusBits only defined on ia32
The GetStatusBits invocation is only implemented on ia32. Adding the condition to the
XML list prevents the invocation from being in the list of invocations on x86_64, when
it has no implementation.
2017-11-22 17:01:03 +11:00
Adrian Danis
8108c811ed libsel4: Remove bitfield type unifying Guard and Badge construction
Using the bitfield generator to treat guards and badges as a union type can be convenient,
but it requires reserving a bit in the data for the bitfield run time type information.
This type information is not needed by the kernel as it knows implicitly whether the passed
data is a badge or a guard based on the kind of cap being operated on. However, with the
type information present we cannot pass a word sized piece of data to the kernel.

The solution here is to go back to using a plain seL4_Word as the type for invocations
that want a capdata and let the user either construct a badge as a plain word, or use
the seL4_CNode_CapData bitfield for constructing a guard, although they have to manually extract
the word representation out of it.
2017-10-27 12:15:09 +11:00
Adrian Danis
567127defe manual: Expand parts of the x86 virtualisation documentation
This provides documentation for kernel design of the x86 virtualisation, the additional
syscall and object invocations. The ARM design is not fully expanded.
2017-09-18 14:01:46 +10:00
Adrian Danis
09443ed0c1 manual: Correct parameter type of VCPU_EnableIOPort invocation
Type was previously `seL4_CNode`, which is incorrect as the invocation is taking a
cptr to an I/O port, not a cnode, this change reflects that.
2017-09-18 14:01:22 +10:00
Adrian Danis
a1a6390d65 manual: Correct VCPU_SetEPTRoot invocation parameter name
Changes the parameter name to match the actual object that should be passed, as required
by the kernel code.
2017-09-18 14:01:22 +10:00
Adrian Danis
d3c9f36d94 manual: Correct asidpool assign label
Fixes an inconsistency between manual_label for the x86 AsidPool_Assign invocation
and its reference in the manual. This makes the x86 align with the ARM name.
2017-09-18 14:01:22 +10:00
Adrian Danis
a8d6315eb1 libsel4: x86: Remove nested struct declarations
Nested structs with attributes are not understandable by the C parser. This change simply
moves the nested definitions into the global namespace (with suitable names).
2017-09-01 15:23:02 +10:00
Adrian Danis
86442b078e libsel4: x86: Correctly pack substructs in VBE struct
The VBE information struct is a representation of the actual VBE information passed from
multiboot and needs to have the precise layout as described.
2017-09-01 10:46:51 +10:00
Adrian Danis
a9e1f51713 SELFOUR-1062: Hide all IOMMU related code behind #ifdef guards
The IOMMU implementation is not going to be verified at the moment, and so the code for
it needs to be hidden from verification, which we do by #ifdef'ing it out if the IOMMU
is not enabled. As a result the IOMMU configuration depends on a non verification target
2017-08-21 16:44:58 +10:00
Kent McLeod
8e3598bdcf SELFOUR-912: migrate ARM docs from latex to xml 2017-06-29 12:06:39 +10:00
Anna Lyons
422118c3e6 SELFOUR-913: migrate x86 docs from latex to xml 2017-06-28 11:47:00 +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
Adrian Danis
2038316358 x86: Split large structs into portions
The C parser does not enjoy parsing structs with many fields
2017-06-21 17:14:48 +10:00
Anna Lyons
61f1bd5efc seL4_DebugDumpScheduler: remove unused argument 2017-06-19 14:43:03 +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
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
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
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
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
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
Adrian Danis
eccaae51dc s/D61/DATA61/ in license headers for consistency 2017-02-21 16:38:51 +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
amrzar
efb28fec20 Unify arch_shared_types.bf from the libsel 2017-02-06 09:08:35 +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
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
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
151e95d908 libsel4: Update VTX invocations to use condition= instead of config= 2016-10-28 14:09:28 +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
amrzar
ee75f086f3 update #ifdef to #if in auto generated files 2016-10-17 12:18:58 +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
f14dcdd0da arm-hyp: Add conditions to invocations 2016-06-15 17:53:25 +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
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
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
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
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
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
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
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
e89bb3f37a x86: avoid packing/unpacking for IOPortOut 2016-01-14 17:15:39 +11:00
Anna Lyons
6c6a925233 SELFOUR-406: fix message length used by seL4_Signal in libsel4 2016-01-12 10:33:16 +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