Commit graph

1131 commits

Author SHA1 Message Date
Sylvain Gauthier
330cbfbdad Made declaration of handleReservedIRQ optional, refactored consequently 2019-03-14 15:23:21 +11:00
Anna Lyons
7b019e3def serial: remove putConsoleChar
putConsoleChar was needless indirection around putDebugChar. Remove
this.
2019-03-14 14:31:12 +11:00
Jasper Lowell
445e09150c aarch32: Rework access of fpu control registers
GCC accepts MCR/MRC instructions to modify fpu control registers. Clang
does not. VMSR/VMRS are instructions that the ARM specification suggests
to use when accessing fpu control registers.
2019-03-12 14:42:38 +11:00
Yanyan Shen
bc5c7883ed arm: Make Arm VCPU states per-node. 2019-02-26 10:29:06 +11:00
Yanyan Shen
973c1ac503 arm/hyp: Trap SMC calls. 2019-02-26 10:29:06 +11:00
Kent McLeod
b88d770112 arm: Rename plat_cleanInvalidateCache
Rename plat_cleanInvalidateCache to plat_cleanInvalidateL2Cache to
indicate that it is a L2 cache maintenance operation only.
2019-02-15 14:49:13 +11:00
Simon Shields
5cd3b7e317 zynqmp: Remove devices.h
These values are now autogenerated.
2019-02-15 14:05:06 +11:00
Kent McLeod
89dd2603b6 arm: Remove empty level2 cache code 2019-02-15 12:39:09 +11:00
Kent McLeod
7f34e19a43 Remove empty hardware.bf definitions
These have no effect when there aren't any definitions.
2019-02-13 14:21:04 +11:00
Kent McLeod
a5da502b13 riscv,RV64,bf: Correct cannonical address to 39
We currently only support Sv39 on RV64. Sv39 has a cannonical address
range of -2^38 and 2^38-1. This means that bits 63-39 must be equal to
bit 38, or that we sign extend from bit 39 to 63 based on the value of
bit 38. It also means that we only have 39 bits of addressable space,
which limits our max untype size.
2019-02-08 17:17:02 +11:00
Kent McLeod
c1b1d07579 bitfields: Split definition cannonical addresses
These shared objects have different definitions based on the cannonical
address of the virtual memory system.
2019-02-08 17:17:02 +11:00
Kent McLeod
960a9927bd riscv,RV32,structures.bf: Remove sign extension
base 32 implies base of 32 and mask of 32 with no sign extension which
is required for Sv32
2019-02-08 17:17:02 +11:00
Kent McLeod
3cd581ddd5 riscv,RV32,structures.bf: Add newline in bitfields
Conventionally a newline is used to signify a system word boundary. This
is supposed to improve readability
2019-02-08 17:17:02 +11:00
Simon Shields
21993d8bbc hardware_gen: generate kernel_devices
This change fixes support for instances where we have
multiple kernel devices in the same page, or kernel devices
which aren't at page-aligned addresses.

Also use seL4_UserTop to pick the right address to start
putting the kernel device pages.
2019-02-05 14:58:17 +11:00
Simon Shields
0fac956e9f ARM platforms: use auto-generated kernel_devices
Note that the auto-generated kernel_devices will differ slightly from
the ones present in the kernel until now. When devices have
registers that aren't page-aligned we now always set the appropriate
PPTR to be the start address of the device, while previously the PPTR
was sometimes page-aligned.

Specifically, this change to PPTRs affects:
- bcm2837 intc
- bcm2837 uart
- allwinnerA20 timer
2019-02-05 14:47:38 +11:00
Simon Shields
7a93479e63 ARM: add KDEV_BASE for aarch32 and aarch64
KDEV_BASE is the first address that can be used for mapping devices.
This will be used by hardware_gen to auto-generate the kernel_devices
table.
2019-02-05 14:47:38 +11:00
Simon Shields
3989d95473 arm: use UART_PPTR for all uarts 2019-02-05 14:47:38 +11:00
Chris Guikema
31733b6bf2 Fixed IPI VM bound notification bug
doRemoteOp1Arg data1 and cpu arguments were switched,
which triggered a conditional statement preventing
the VM from exiting and handling a bound notification.

Change-Id: I019faeaf0c7d51ef7f6b2a2ffa83bea1cf76f811
2019-01-31 09:16:50 +11:00
Simon Shields
dcc8f7ec39 arm: use auto-generated interrupt numbers
This removes the big tables of interrupt numbers from each platform.
2019-01-16 14:46:08 +11:00
Simon Shields
fc4447708a arm: use DTS to generate memory region lists
This changes all ARM platforms over to using the device tree found in
the kernel to generate memory region information.
2019-01-16 14:45:56 +11:00
Simon Shields
4d2bd90c84 tx2: adjust PHYS_BASE to match generated one
Move PHYS_BASE 16MiB into RAM to match the /memreserve/ in the DTS.
2019-01-16 14:37:13 +11:00
Simon Shields
86da489f6b exynos5: adjust PHYS_BASE to match generated one
Adjust PHYS_BASE to the start of RAM to match the DTS.
2019-01-16 14:36:19 +11:00
Simon Shields
3dc0cb0a8d Ensure we always have enough freemem regions on ARM 2019-01-15 11:16:53 +11:00
Simon Shields
d6b1dcf962 allwinnerA20: remove irqNumbers enum 2019-01-15 11:16:04 +11:00
Kofi Doku Atuah
91969a9038 AArch64: Benchmark log: Add convenience pointer to PD entry
* Also document the reason why the particular address for KS_LOG_PPTR was chosen.

This patch adds a pointer to the PD entry that sets the benchmark log frame.
2019-01-15 09:05:15 +11:00
Simon Shields
468d1c5505 am335x: use KERNEL_TIMER_IRQ for timer IRQ number 2019-01-08 13:07:36 +11:00
Simon Shields
73874a75df omap3: use KERNEL_TIMER_IRQ for timer IRQ number 2019-01-08 13:07:36 +11:00
Curtis Millar
da3b028650 Add system timer device untyped for BCM2837 (RPi3) 2019-01-03 12:41:43 +11:00
Curtis Millar
2fd77252e3 Reflow style of physical device frame list. 2019-01-03 12:41:43 +11:00
Kent McLeod
d56175ec3e aarch64: Add missing include for fastpath.h
vcpu_switch gets preprocessed away on non hyp configurations, but
arch/object/vcpu.h needs to be included for this.
2018-12-20 14:01:45 +11:00
Anna Lyons
5fe6d0bcef riscv/spike: fix seL4_UserTop for riscv
Use correct values and document them.
2018-12-20 12:27:23 +11:00
Kofi Doku Atuah
cd26d7d00c Aarch64 HYP Fastpath: Call vcpu_switch when switching from Guest to native threads
Previously the kernel did not call vcpu_switch on the fastpath since the fastpath avoids
calling setVMRoot, so when sending an IPC message from a guest thread to a native thread,
if the IPC was small enough to go on the fastpath the kernel would fail to disable the
HYP traps and would treat the native thread like a guest thread.
2018-12-18 15:38:43 +11:00
Kent McLeod
0348468c87 aarch64: Add pgde enum for tracking hyp hw_asids
aarch64 hyp mode only has support for 8 bit hardware ASIDs. We use the
same strategy used in aarch32 for hardware asids where we maintain a
pool of hwasids that seL4 ASIDs are allocated. The allocation is stored
in the last entry of top level paging structure. This commit
encapsulates this into the bitfield specification in the same way as
aarch32.
2018-12-13 18:09:04 +11:00
Anna Lyons
4bc6b76f5f Remove empty plat_mode/machine header files 2018-12-12 16:24:31 +11:00
Anna Lyons
2a0d682ff2 Remove MAX_IRQ
MAX_IRQ was used on several platforms. Remote it. This is a layer of indirection which adds no value.
2018-12-12 16:24:31 +11:00
Anna Lyons
403f5dace7 Remove N_INTERRUPTS constant
The N_INTERRUPTS constant is never used. maxIRQ tracks this value.
2018-12-12 16:24:31 +11:00
Anna Lyons
e5bb674594 Calculate IRQ_CNODE_BITS from maxIRQ
IRQ_CNODE_BITS is determined by the maxIRQ on the platform. Calculate
this value from maxIRQ instead of hardcoding for each platform.
2018-12-12 16:24:31 +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
Thibaut Perami
3df00ea4d7 SELFOUR-6: Add GrantReply to the rights system.
GrantReply is a new access right added to endpoint capabilities, which
allows seL4_Call to be used on those capabilities (specifically, it
allows reply caps *only* to be granted across endpoints).

Prior to the addition of GrantReply, endpoint capabilities required the
Grant access right, which allowed any arbitrary capabilitiy to be
transferred over an endpoint. Using GrantReply, systems can now be
constructed where threads using seL4_Call over an endpoint do not need to be in the same
security subsystem.
2018-12-12 14:04:28 +11:00
Kofi Doku Atuah
fbec286d97 AArch64: Comment HYP and EL1 vaddrspace layouts
Also document the specific addresses for TX1 and TX2.
2018-12-11 18:27:32 +11:00
Kofi Doku Atuah
e46445c557 TX2: AArch64: Hyp: Use the correct conditional timer IRQ 2018-12-11 18:27:32 +11:00
Kofi Doku Atuah
479cd82dbe TX2: AArch64 Hyp: Add GICH controller paddr 2018-12-11 18:27:32 +11:00
Kofi Doku Atuah
0b933ea7a3 TX2: AArch64 HYP: Set EL2 mode addresses 2018-12-11 18:27:32 +11:00
Yanyan Shen
60b15e1047 armv8/hyp: Remove duplicated functions 2018-12-11 18:27:32 +11:00
Yanyan Shen
9bba386aa3 armv8: Add readTIPDRURO for aarch64 2018-12-11 18:27:32 +11:00
Edward Pierzchalski
c06f9dbafe riscv: make register size equal to word size
RISCV32 registers aren't 64 bits wide, after all.
2018-12-06 15:32:26 +11:00
Anna Lyons
b9522d87b6 riscv: fix incorrect register index
s4 should be 19, not 10
2018-12-06 15:04:41 +11:00
Edward Pierzchalski
8bf7c55de4 Dedup user_data and user_data_device definitions.
These are reasonably expected to exist on every platform by the
UMM type generator. They also had identical definitions, so we
consolidate them.
2018-12-06 15:04:41 +11:00
Edward Pierzchalski
4ea62e5158 riscv: add remaining registers to user context.
The registers a7, s2-11, and t3-6 were missing from seL4_UserContext.
We also add these to frameRegisters and gpRegisters, which are used
to implement the TCB invocations for reading and writing these
registers.

Zero-length arrays aren't valid expressions or types in ISO C, so
to keep the c parser happy we need to either remove gpRegisters or
provide some contents for it.

In the past, frameRegisters and gpRegisters distinguished between
those registers preserved across a syscall and those that weren't.
TCB_CopyRegisters allows the caller to choose which set to copy.

Since we preserve all non-return registers, this distinction isn't
relevant anymore and there's no easy way to justify the members of
frameRegisters and gpRegisters.

We arbitrarily choose to put the 'last' register t6 in gpRegisters,
for consistency with the register list in registerset.h and with the
order that registers are restored.
2018-12-06 15:04:41 +11:00