Commit graph

93 commits

Author SHA1 Message Date
Kent McLeod
64a14f8fe7 arm,generic_timer: Add config user access on 32bit
The KernelArmExportPTMRUser and KernelArmExportVTMRUser options for
enabling user access to the generic timer were previously only supported
on aarch64 but are now supported on aarch32 also.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-10-02 16:55:43 +10:00
Kent McLeod
9d3cbd027f armv6: Remove remaining armv6 specific features
- KernelGlobalsFrame caused the definition of seL4_GlobalsFrame which
  was a reservation at the top of the user address space on ARMv6
  platforms.
- KernelDangerousCodeInjectionOnUndefInstr was used to implement calling
  user code in kernel mode won ARMv6.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Kent McLeod
35fed131b0 ARMv6: Remove architecture support
Remove all support for ARMv6 architectures now that all platforms and
CPUs that use this architecture have been removed.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Kent McLeod
3defbff461 Remove KZM/imx31 platform
The platform was the original verification target of seL4 over 10 years
ago and by now there doesn't appear to be any ways to obtain new
hardware.

Currently, the KZM platform is the only ARMv6 platform and supporting it
requires a few work-arounds for emulating mechanisms that newer hardware
supports. Removing this platform also implies removing armv6 support
soon.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Kent McLeod
c7d5bb0ed4 libsel4: Fix name for AARCH64_VSPACE_S2_START_L1
CONFIG_AARCH64_VSPACE_S2_START_L1 has the correct namespace for a kernel
config option.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-06 08:08:54 +10:00
Kent McLeod
b6de9db07a libsel4: Fix Config name for ENABLE_SMP_SUPPORT
CONFIG_ENABLE_SMP_SUPPORT has the correct namespace for a kernel config
option.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-06 08:08:54 +10:00
Curtis Millar
76b1de0670 Add ODroid C4 support
This adds support for the ODroidC4. The ODroidC4 is just a beefier
ODroidC2 with some bits moved around. The devices we care about here are
all essentially the same except the cores are A55s instead of A53s.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-07-09 14:05:05 +10:00
Curtis Millar
84e8509997 Add ARM Cortex A55
This adds basic support for the ARM Cortex A55 cpu core as is used in
the Amlogic S905x3 that is found in the ODroid C4.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-07-09 14:05:05 +10:00
Bamboo
21c1a2ca7a Release 12.1.0
Update VERSION
Update CHANGES

Signed-off-by: Damon Lee <Damon.Lee@data61.csiro.au>
2021-06-10 16:59:48 +10:00
Axel Heider
9a4d3ae51d CMake/autoconf: remove unused AUTOCONF_INCLUDED
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-06-09 09:50:02 +10:00
Curtis Millar
295a5b2818 Rename MAX_BUDGET to MAX_PERIOD
As this variable bounds both the period and the budget and the period
itself bounds the budget, the name for this variable would be more
appropriately named 'MAX_PERIOD'

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-29 11:51:54 +10:00
Curtis Millar
afbea15710 mcs: Add sporadic flag to SchedControl_Configure
This adds a flags parameter to SchedControl_Configure to enable
configuration of a sporadic SC.

This also allows flags to be added in the future as needed without
breaking the API.

This allows the user to configure an SC either to be constrained as a
sporadic task where accumulated time is only delayed to when a task has
become runnable (implementing the sporadic server algorithm) or
whenever the task becomes the current executing task (implementing the
sliding-window constraint as in constant-bandwidth servers).

This can be used to prevent non-realtime tasks from exceeding bandwidth
under any circumstances, even in an over-committed configuration, whilst
also allowing work-conserving tasks to be configured in the same system.

To implement sporadic servers, we need to ensure that the suspension of
a task cannot be used as a mechanism to amplify budget of a task by
granting that task access to effectively multiple periods worth of
replenishments within a single period.

To align the implementation of SCs with the model of sporadic servers we
must delay available time until the release of a task. Within seL4, a
release would be any time where an SC changes from not being associated
with a Running, RunningVM, or Restart thread to one that is.

This can occur when an SC is bound to a new thread in such a state or
when a thread changes to such a state from any non-running states.

Critically, replenishments should not be delayed at the point when an SC
becomes the current SC (as was the case prior to this commit). This has
the effect of enforcing a continuous, constant bandwidth which is a
restriction that is incompatible with standard scheduling logic.

Accounting for this requires inserting a new refill_unblock_check
call whenever a sporadic SC is unblocked and removing the
refill_unblock_check call from when said SC is scheduled.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2021-04-14 15:24:40 +10:00
Bamboo
dc83859f6a Release 12.0.0
Update VERSION
Update CHANGES

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-11-06 18:29:45 +11:00
Oliver Scott
af98be7d81 trivial: update changes file
Some of the changes from the last release should have
been in the 12.0.0 release.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-11-06 18:29:45 +11:00
Kent McLeod
b86bce2d4b aarch64,cortex-a53,hyp: Reduce seL4_UserTop value
This ensures that no frames can be mapped that would overwrite the
currently stored VMID for the vspace.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-10-16 14:38:31 +11:00
Kent McLeod
00a9ba9123 aarch32: Move tpidruro from vcpu to tcb context
This register is visible to software executing at PL0 but not writeable.
Storing it in the VCPU context required custom save/restore handling as
it had to be explicitly handled when switching from a VCPU thread to a
non-VCPU thread so that it didn't become a channel. It is possible to
now update this register via seL4_TCB_WriteRegisters for software
executing at PL0.

This also fixes a bug where if a vcpu-thread is switched for a
non-vcpu-thread and then switched to a different vcpu-thread the
original vcpu-thread's copy of this register will get set to 0.

Signed-off-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-05-15 12:04:39 +10:00
Gerwin Klein
b0816d2df3 Release docs owned by Data61 under CC-BY-SA-4.0
CC-BY-SA-4.0 is a more appropriate license for documentation than BSD
or GPL.
2020-03-09 17:59:07 +08:00
Alison Felizzi
0e05f416ae arm: Configure traps on vcpu WFE/WFI calls
Configure the ability to trap on vcpu WFE/WFI calls. If enabled,
user-level would need to schedule a future interrupt when a given
vcpu invokes a WFE/WFI instruction. This otherwise leaving the
vcpu in a disabled state. An application can choose to
disable the trap if it doesn't want to handle the instruction and
schedule a future interrupt.
2020-02-20 11:40:59 +11:00
Alison Felizzi
71d636f8b3 arm_hyp: Save and restore vtimer state on switches
Added support for reading and writing additional virtual timer
registers for vcpu hw read and write accesses. These include the
compare value register (CNTV_CVAL) and offset register (CNTV_OFF),
each represented as two 32 bit (high and low) registers on aarch32 and
as single 64 bit registers on aarch64.

Added support for explicitly saving and restoring the virtual
timer registers when the vcpu is enabled and disabled. This
ensures when the vcpu is switched in and out, the virtual timer
registers are restored to a state that is consistent to when
it was last run.

By default the CNTVOFF register will be updated by the kernel to
accumulate the time the VCPU is not running. From the guest this will
result in the VCNT register not increasing when the VCPU is suspended.
This behavior can be turned off by disabling the
KernelArmVtimerUpdateVOffset config option.
2020-02-20 11:40:59 +11:00
Alison Felizzi
f795e7c0ec arm: New virtual PPI event fault type
This commit introduces a new fault type, seL4_Fault_VPPIEvent.

This change means the kernel can reserve PPI interrupts and virtualise
them via delivering the irq to the active vcpu through a
specific fault. This enables multiplexing PPI IRQs across multiple VCPUS
which requires correctly masking and unmasking the IRQ depending on
which VCPU is running.

A new VCPU invocation, seL4_ARM_VCPU_AckVPPI is also added for
acknowledging the handling of the IRQ. This takes an IRQ as a parameter
but will only accept IRQ numbers that are sent as VPPIEvent faults.

Co-authored-by: Rafal Kolanski <rafal.kolanski@data61.csiro.au>
Co-authored-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2020-02-20 11:40:59 +11:00
G. Branden Robinson
4ef43d507c CHANGES: improve introduction
Recast introductory paragraphs to better describe the document and
characterise the intended audience.

Move information intended for document maintainers and kernel engineers
to a comment.  Add guidance for engineers so they better know when and
how to update this document.  (Thanks to Kent for the discussion!)

The `docs/sel4_release` page is not a set of release notes per se, more
like a feature grid and release history; describe it differently.

Style document title as a top-level heading.
2019-11-29 17:01:59 +11:00
Bamboo
ff21602504 Release 11.0.0
Update VERSION
Update CHANGES
2019-11-20 18:17:11 +11:00
Kent McLeod
eec474dcc8 Update CHANGES with changes since last release
Try to add all missing changes that affect the seL4 interface.
2019-11-20 18:16:21 +11:00
Oliver Scott
9abe8a4f0b add support for rockpro64
Kernel support for 64 bit rockpro board.
Dts was taken from the linux kernel.
2019-10-25 14:18:20 +11:00
Sylvain Gauthier
4efbd4365e Updated CHANGES file
Updated CHANGES file to add virt support.
2019-10-14 15:46:08 +11:00
Yanyan Shen
1cb5887abe trivial: Update CHANGES 2019-10-10 17:26:17 +11:00
amrzar
a4d6bf850c SELFOUR-161: Merge Page_Remap with Page_Map
- Remove Remap function from seL4 API for arm, x86, riscv and the
respective invocation implementation.
- Update Map as replacement for Remap
- Update manual

This allows a change of rights if the frame being mapped is already
mapped in at the given vaddr. To map a page to a different address,
unmap it first.

Co-authored-by: Hesham Almatary <hesham.almatary@data61.csiro.au>
Co-authored-by: Anna Lyons <Anna.Lyons@data61.csiro.au>
Co-authored-by: Victor Phan <Victor.Phan@data61.csiro.au>
Co-authored-by: Kent McLeod <Kent.Mcleod@data61.csiro.au>
2019-10-10 15:54:23 +11:00
Kent McLeod
8234026c1f aarch64: Move tpidrro_el0 from vcpu to tcb context
This register is visible to software executing at EL0 but not writeable.
Storing it in the VCPU context required custom save/restore handling as
it had to be explicitly handled when switching from a VCPU thread to a
non-VCPU thread so that it didn't become a channel. It is possible to
now update this register via seL4_TCB_WriteRegisters for software
executing at EL0.

This also fixes a potential bug where if a vcpu-thread is switched for a
non-vcpu-thread and then switched to a different vcpu-thread the
original vcpu-thread's copy of this register will get set to 0.
2019-09-19 11:39:14 +10:00
Anna Lyons
7798b4767d aarch64: allow access to memory below physBase
On aarch64 physBase is the constant that points to the bottom of
physical memory (RAM).

Prior to this change the kernel window was mapped directly to physBase,
which is usually not a 0 paddr. As a consequence the kernel could not
access any memory below physBase.

This change fixes this issue by mapping the start of the kernel window
to 0 in the physical address space.

- add new constant PADDR_LOAD, the location of the kernel image in the
physical address space.
- add new constant PADDR_BASE, the start of the physical address space
(0).
- add new constant KERNEL_ELF_BASE, the location of the kernel image in
kernel virtual memory.

A consequence of this change is that on aarch64, the kernelBase constant
now points to the start of the kernel window in virtual memory, but
*not* to the start of the kernel image as these are now different.
2019-09-13 08:35:19 +10:00
Kent McLeod
1387bfeb51 mcs: Update CHANGES file
Adds that mcs was merged into the changes file. More detailed release
notes will be included in the next release version.
2019-08-22 11:22:42 +10:00
Chris Guikema
4a37703c03 cortex-53: enable virtualization extensions
This is possible now that the kernel supports 40 bit PAs.
2019-07-25 10:30:48 +10:00
Sylvain Gauthier
49d3f2202d [SMP/Debug] New syscall to send arbitrary SGIs
Created a new syscall, seL4_DebugSendIPI for ARM to send arbitrary SGIs
(software generated interrupts) to arbitrary cores. As SGIs are
specifically PPIs (private interrupts), this syscall effectively allows
to trigger PPIs on arbitrary cores, for debug/testing purposes.
2019-07-19 16:35:57 +10:00
Yanyan Shen
7900b6dccd aarch64: Add initial Arm FVP platform config
This platform assumes 2 clusters of A57 processors as described in
tools/dts/fvp.dts. This configuration is for running on FVP simulators.
2019-07-10 06:59:25 +10:00
Kent McLeod
051d32beab Add initial i.MX8M Quad evk 64-bit Support
This adds support for the 64-bit i.MX8M Quad evaluation kit.
Currently only AArch64 EL1 is supported.
2019-07-01 23:31:47 +10:00
Kent McLeod
60e64bd53a trivial: Update CHANGES for GICv3 2019-07-01 23:30:19 +10:00
Curtis Millar
a06690fbe9 Update CHANGES to reflect RFC-3 Changes. 2019-07-01 11:17:50 +10:00
James Ye
7c8938bdbe trivial: CHANGES: document am335x updates 2019-06-24 12:12:19 +10:00
Anna Lyons
90c49746a3 x86/ept: return correct MappingFailedLookupLevel
Prior to this change, seL4_MappingFailedLookupLevel() would retrun '22'
after any failed EPT mapping operation. This change fixes this to return
the correct amount of unresolved bits in the address.
2019-06-20 12:12:50 +10:00
Anna Lyons
5fac9e8198 config: make root cnode size 4k minimum
The previous minimum (4) was actually too small to fit more than 1
capability, which would not allow the kernel to boot. A 4K minimum means
on 32-bit, an 8 size is the minimum (256 slots) and on 64-bit, 7 (128
slots).

In addition to being a more practical minimum, this also allows for
simplification of the boot code for future commits.
2019-06-17 17:36:11 +10:00
Anna Lyons
f3fbf85544 libsel4: add seL4_VspaceBits
This constant represents the size of the root page table.
2019-06-17 17:36:11 +10:00
Simon Shields
6a31a57ef8 ARM: optionally pass bootloader DTB to userspace
We now support receiving a DTB from the ELF loader and passing it on
to userspace in extra bootinfo. We still support booting without a DTB,
though - the device tree address is set to zero in the boot code and no
extra bootinfo region is provided.
2019-05-01 12:18:52 +10:00
Simon Shields
d8c9069c0a add FDT extended bootinfo type
FDT is not platform specific (and used on RISC-V and ARM), so this
bootinfo type isn't either.
2019-05-01 12:18:52 +10:00
James Ye
a16cc57e21 Add Odroid-C2 support
Add support for the Hardkernel Odroid-C2 board.

Co-Authored-By: Anna Lyons <Anna.Lyons@data61.csiro.au>
2019-04-18 11:14:17 +10:00
Jasper Lowell
c274850baa Updated CHANGES with Clang support 2019-03-18 14:11:07 +11:00
Oliver Scott
34ce52e283 serial-refactor: Refactor kernel serial drivers
Have added a drivers/serial folder to kernel, where all serial drivers
will be kept. The point is to have the the dts parsed and generate cmake
to include the right uart.c file prefixed with the compatibility.
Have removed all io.c from plat and includes from plat/config.cmake and
updated CHANGES file.
2019-02-21 16:11:37 +11:00
Simon Shields
8440f0339a hardware_gen: pull interrupts from DTS
This adds support for extracting interrupt numbers from DTS
to the hardware header file generator, so that the majority
of the per-platform interrupt listings can be removed.
2019-01-16 14:46:08 +11:00
Simon Shields
0ac0792339 arm: generate memory region tables from dts
This change adds infrastructure to automatically generate the
physBase macro, the avail_p_regs array, and the dev_p_regs array
based on a device tree. Platforms can opt-in to using this
by adding DTS files to the KernelDTSList variable.

The Python script uses the hardware.yml file to determine which
devices in the device tree are of interest to the kernel and should
be hidden from userspace and instead mapped into the kernel. Note that
currently the kernel mappings are not (yet) generated, however most
of the infrastructure needed to make that happen is present.
2019-01-16 14:38:25 +11:00
Anna Lyons
e7bc274833 Update CHANGES with details of Aarch64-hyp 2018-12-19 14:22:02 +11:00
Anna Lyons
76faadc923 Add seL4_UserTop and move kernelBase to the arch level
- seL4_UserTop is a new constant which represents the top of virtual
memory available to user level
- this commit also rationalises several constants (USER_TOP, kernelBase)
and moves them to the arch level, such that ports only need to define
seL4_UserTop.
2018-12-12 16:24:31 +11:00
Thibaut Pérami
2f43788b82 libsel4: add seL4_CapRightsBits 2018-12-12 14:20:37 +11:00