Commit Graph

3588 Commits

Author SHA1 Message Date
Curtis Millar
a00c2c16cf Make kernel log buffer derived from cmake config
This removes the explicit CMake configuration for the kernel log buffer
and replaces it with a #define that is enabled for the required
configurations.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2020-11-10 16:24:43 +11:00
Bamboo
2c6576c80a Update VERSION file to 12.0.0-dev
Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-11-06 18:29:45 +11:00
Bamboo
dc83859f6a Release 12.0.0
Update VERSION
Update CHANGES

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
12.0.0
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
Oliver Scott
73b0773d90 tk1-smmu: corrections
Fix tk1 smmu cmake config variables.
Fix platforn_gen for tk1.
Add separate hardware.yml for tk1.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-11-06 15:21:25 +11:00
Kent McLeod
1f82755ef6 boot: Allocate init bookkeeping structs in bss
ndks_boot, rootserver and rootserver_mem don't contain any non-zero init
values and can be moved to bss so they don't take up space in the ELF.
ndks_boot contains a sparse struct that is > 4MiB on x86_64 and so this
change allows the x86_64 ELF to return to < 200KiB.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-11-05 11:30:16 +11:00
Kent McLeod
0101071f70 smmuv2: Reserve VSpace slot for holding CB count
A slot in the top level VSpace page table is used to hold the number of
SMMUv2 ContextBanks that are assigned to a VSpace. This means a
reduction of available virtual addresses at userlevel as the slot cannot
be used for holding regular mappings.

Signed-off-by: Kent McLeod <kent@kry10.com>
2020-11-03 10:14:46 +11:00
Oliver Scott
6ad15c0f45 trivial: clean up code for C parser
Remove unused cases and add break in switch statements.
Add conditions to sel4arch.xml.
Change guard in capdl printing to correct TK1_SMMU.
Set KernelArmSMMU default to off.
Add types to aarch32 syscall_stub_gen.py.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Kent McLeod
5a7d96a46c SMMU: Add initial write up of design documentation
- Add a chapter in the Hardware I/O Section
- Link API documentation back to chapter.

Co-authored-by: Qian Ge <Qian.Ge@data61.csiro.au>
Signed-off-by: Kent McLeod <kent@kry10.com>
2020-10-28 17:30:42 +11:00
Oliver Scott
4a6482edeb trivial: separate tk1 smmu from arm smmu
Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Oliver Scott
c66d9cee7a trivial: style and comment
Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
935714a4cb SMMU: TLB coherency between MMU and SMMU
The kernel connects ASID used in MMU and context banks used in
SMMU, and conducts TLB invalidation on context banks if a page
entry is invalidated from MMU is also used in SMMU.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
81f9a88ff7 SMMU: supporting probing fault status
Providing system calls that enquiry the fault status in context
banks and in SMMU overall.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
35bb485e29 SMMU: supporting cap deletion on control caps
Providing support to delete the two control caps: the
stream ID control cap and the context bank control cap.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
69c9f55f4d SMMU: supporting deletion on stream ID caps
Providing support to delete stream ID caps and remove any assigned
context banks to deleted stream ID caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
1ef6e6c724 SMMU: supporting unbind context banks
Providing system calls on stream ID caps that unbinds its
context banks. Any future transaction using this stream ID
will result on faluts.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
38ed1046e1 SMMU: supporting unassign vspace in context banks
Providing a system call that removes an assigned vspace root from its
context bank. This operation causes the context bank being disabled
as it does not have a valid vspace root after the unassignment.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
cb0ef83a28 SMMU: supporting copying SMMU caps
Supporting deriving SMMU caps, which is required by
cap copy operations.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
1ce46cd439 SMMU: removing mapped attribute from SMMU caps
The mapped attributes in both context bank and stream ID caps
are reundant for maintaining the semantics on those caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
b07ea94c0c SMMU: TLB invalidation system calls
Providing system calls for conducting TLB invalidation operations
on all TLB entries or entries in a context bank.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
6e5911172c SMMU: binding stream ID to context banks
Providing system calls that binds context banks to stream IDs.
Once the stream ID is bound, the transaction using that SID is
enabled.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
73e062bd45 SMMU: assigning vspace to context banks
Supporting user-level applications to assign vsapce root to context
banks through system calls. This commit also configures the context
bank according to stage 1 or stage 2 requirement.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
0cf122a040 SMMU: system calls for creating SID and CB caps
Providing system calls on stream ID control cap and context bank
control cap for creating stream ID and context bank caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
7316bfc676 SMMU: providing master control caps to root task
Adding the master control caps that are used to create transaction
and context banks caps. This commit includes the internal kernel
structure that required to manage any created transaction and
context bank caps.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Qian Ge
1a9756f65b SMMU: basic driver for init and probing
Introducing the driver in kernel for detecting SMMU features
and initialise the hardware.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Gerwin Klein
4fd7cb0360 unify license tags
The tags now all conform to REUSE version 3.0

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-28 16:03:11 +11:00
Jesse Millwood
b77c9b2051 PolarFire SoC: Initial support for platform
Signed-off-by: Jesse Millwood <jesse.millwood@dornerworks.com>
2020-10-28 08:33:05 +10:00
Jesse Millwood
721a685aed riscv: Use generated number for max irqs
This reduces an area of duplication of defining constant values

Signed-off-by: Jesse Millwood <jesse.millwood@dornerworks.com>
2020-10-28 08:33:05 +10:00
Jesse Millwood
be2803cbc9 riscv: Renamed PLIC driver
This renames the RISCV PLIC driver file hifive.h to riscv_plic0.h to
better reflect the fact that the driver could be used for a number of
platforms that use the PLIC used by SiFive and SiFive derived platforms.

Signed-off-by: Jesse Millwood <jesse.millwood@dornerworks.com>
2020-10-28 08:33:05 +10: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
Curtis Millar
40edd02c22 trivial: Use correct configuration for TLS base
Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-10-12 15:21:43 +11:00
Curtis Millar
63432c91d5 trivial: use correct variable name
Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-10-02 15:40:12 +10:00
Miki Tanaka
4ee1f90a7d mcs: add tcb argument to reply_unlink
reply_unlink takes a reply and remove the link between that reply
and its tcb. This link always exists at the call site and the tcb
information is always avaialble, or can be made available.

This commit adds this tcb as an extra argument to aid varification.

Signed-off-by: Miki Tanaka <miki.tanaka@data61.csiro.au>
2020-10-02 12:38:39 +10:00
Siwei Zhuang
2ff45c3ca8 zynqmp: Add support for aarch32 hyp
Enable building AArch32 HYP kernel for ZCU102.

Signed-off-by: Siwei Zhuang <siwei.zhuang@data61.csiro.au>
2020-09-30 13:42:18 +10:00
Siwei Zhuang
d65ce881f6 zynqmp: Disable hardware debug APIs
ZynqMP platform doesn't support kernel hardware debug API.

Signed-off-by: Siwei Zhuang <siwei.zhuang@data61.csiro.au>
2020-09-30 13:42:18 +10:00
Jimmy Brush
eb6e553f9b manual: Update padding field in UntypedDesc
Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-25 00:39:21 +10:00
Jimmy Brush
545269fa9c manual: Update BootInfo struct table
- Show fields in same order as struct
- Fix name of schedcontrol field
- Fix nodeID field type

Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-25 00:39:21 +10:00
Jimmy Brush
d2a75a6690 manual: Correct typo
Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-25 00:39:21 +10:00
Jimmy Brush
6b5ca98f21 manual: Fix initial thread's CNode guard size
The initial thread's CNode guard size is calculated so that the CNode
resolves the number of bits in the architecture word size.

Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-25 00:39:21 +10:00
Jimmy Brush
b1ac68ffe7 manual: Add SchedContext to object size discussion
I had previously added it to the table but it should be in the
discussion too.

Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-25 00:39:21 +10:00
Jimmy Brush
b0612a6f3b rockpro64: Enable MCS
Allow rockpro64 to be built with MCS. Sets the kernel WCET to 10u.
Sel4test passes when running on a pinebook pro.

CLK_MAGIC and CLK_SHIFT were not set as this platform is not enabled for
32-bit arm.

Sel4test was built and executed using this procedure:

mkdir sel4test
cd sel4test
repo init -u https://github.com/seL4/sel4test-manifest.git \
          -b refs/tags/11.0.0
repo sync
cd kernel
git checkout master
cd ../tools/seL4
git checkout master
cd ../..
mkdir build
cd build
../init-build.sh -DPLATFORM=rockpro64 -DSIMULATION=false -DSMP=on \
                 -DNUM_NODES=6 -DMCS=on -DLibUtilsDefaultZfLogLevel=0
ninja
cd images
../../tools/seL4/cmake-tool/helpers/make-uimage \
    /usr/bin/aarch64-linux-gnu-objcopy \
    ../elfloader/elfloader \
    arm64 \
    sel4test-driver-image-arm-rockpro64-uboot

Note that sel4test was built from 11.0.0 with a master kernel and
seL4-tools due to the issue at seL4/sel4test#25.

Signed-off-by: Jimmy Brush <code@jimmah.com>
2020-09-19 23:37:40 -04:00
Jingyao Zhou
3c26d999ad capDL: Add error messages for seL4_DebugSnapshot
Add error messages for seL4_DebugSnapshot for platforms that are
not currently supported by capDL Kernel Printing

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-16 19:39:21 +10:00
Jingyao Zhou
9feaba02fe capDL: Add kernel debugging tool for capDL
Add Arm debugging features of capDL Kernel Printing

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-16 19:38:40 +10:00
Jingyao Zhou
7c91c1c88a capDL: Add kernel debugging tool for capDL
Add x86_64 debugging features of capDL Kernel Printing

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-16 19:24:34 +10:00
Jingyao Zhou
fb6ddca774 capDL: Add kernel debugging tool for capDL
Add riscv32 debugging features of capDL Kernel Printing

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-16 19:23:02 +10:00
Jingyao Zhou
a403d0d66c capDL: Add kernel debugging tool for capDL
Add general debugging features of capDL Kernel Printing

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-16 18:01:36 +10:00
Jingyao Zhou
658e110622 capDL: Remove the old version capDL debugging tool
Remove the old version capDL debugging tool of x86 and arm32

Signed-off-by: Jingyao Zhou <Jingyao.Zhou@data61.csiro.au>
2020-09-15 15:27:13 +10:00
Stefan O'Rear
031b400afc riscv: Clear reservation state on slowpath exit
The RISC-V ISA manual requires supervisor code to execute a dummy sc
instruction to clear reservations "during a preemptive context switch".
Failure to do so allows a lr/sc sequence in one user thread to be
interleaved with a non-atomic write to the same address in another
thread without causing the sc to fail.

This is not necessary on the fastpath for functional correctness since
user threads do not perform ipc in the middle of lr/sc sequences.  I
believe it is not needed there for dataflow reasons either, as the
reservation can be considered a message register (although impossible to
use gainfully on most implementations).

This is likely unobservable for Rocket-based implementations as they
time out reservations after at most 80 cycles and there is no path
through the scheduler in less than that; it could be an issue for Ariane
which does not appear to time out reservations.

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>
2020-09-11 14:10:23 +10:00
Mitchell Buckley
036ffc1895 mcs: update commitTime
It is possible for consumed time to be larger than domain time.

Signed-off-by: Mitchell Buckley <mitchell.buckley@data61.csiro.au>
2020-09-08 19:49:38 +10:00
Michael Yoo
5fc7346c3e riscv: copy dtb as extra bootinfo
- This commit largely copies the ARM way of handling
  device tree blobs on to RISC-V, as they work pretty
  similarly.

Signed-off-by: Michael Yoo <Michael.Yoo@data61.csiro.au>
2020-09-08 11:43:04 +10:00