Commit graph

295 commits

Author SHA1 Message Date
Alejandro Gomez-Londono
cee1268e9b [VER-619] Pass verification related to newly added built-in unreachable 2016-07-12 14:32:47 +10:00
Hesham Almatary
f9ea6383f3 SELFOUR-545: x86 - cleanup c_traps.c file and use new traps.h
Closes SELFOUR-545
2016-07-08 10:39:17 +10:00
Hesham Almatary
39c692cc35 SELFOUR-526: ARM - Unify C entry point for system calls 2016-07-06 10:32:26 +10:00
Adrian Danis
e450377a6f Remove #include <stdbool.h>
seL4 has no stdbool.h and #including this is simply causing gcc to
pull in some 'random' stdbool outside of our control
2016-06-24 15:05:44 +10:00
Hesham Almatary
935e8054a6 SELFOUR-448 Benchmark: Add PMU IRQ support to ARM platforms
Currently supported boards are:
- imx6 (sabre)
- tk1 (Jeston)
- kzm
2016-06-24 12:44:09 +10:00
Hesham Almatary
09358f9b6a SELFOUR-448 Benchmark: Track thread's CPU utilisation time 2016-06-24 12:43:09 +10:00
Hesham Almatary
b986bbfccb Benchmark: armv6 implement armv_handleOverflowIRQ 2016-06-23 14:55:14 +10:00
Rafal Kolanski
b92d3f3caa Merge pull request #264 in SEL4/sel4 from arm_hyp to master
* commit 'e38288f805a434faf9052ecf96dd12838f8bf2bd': (76 commits)
  arm-hyp: Rearrange registerset to add compile_asserts
  arm-hyp: Simplify return conditions
  arm-hyp: Use BIT macro
  arm-hyp: Add preprocessor guard comments
  arm-hyp: Rearrange #ifdef
  arm-hyp: Comment on SCTLR_DEFAULT
  arm-hyp: Remove EXPECTED_TCB_SIZE
  trivial: style
  trivial: fix previous merge
  arm-hyp: Hide more definitions
  arm-hyp: Hide ARMPageMapIO invocation
  arm-hyp: Add conditions to invocations
  arm-hyp: Push ARM_HYP config check into traps.S
  arm-hyp: Hide more calls to isIOSpaceFrame
  arm-hyp: Hide calls to isIOSpaceFrame
  arm-hyp: Rename pd->pd_val in some instances
  arm-hyp: Pander to the C parser
  arm-hyp: Correct previous merge with master
  arm-hyp: Hide iospace caps being #ifdef
  arm-hyp: Remove unneccessary cast
  ...
2016-06-22 12:40:05 +00:00
Adrian Danis
2b347793e7 arm-hyp: Rearrange registerset to add compile_asserts 2016-06-22 16:25:06 +10:00
Adrian Danis
0830533513 arm-hyp: Add preprocessor guard comments 2016-06-22 16:25:06 +10:00
Adrian Danis
71bd25249e arm-hyp: Rearrange #ifdef 2016-06-22 16:25:05 +10:00
Adrian Danis
7a113a200d arm-hyp: Remove EXPECTED_TCB_SIZE
This definition was removed from master
2016-06-22 16:25:05 +10:00
Hesham Almatary
f488e25e51 SELFOUR-448: Benchmark: implement ccnt on armv6 2016-06-22 13:40:34 +10: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
Hesham Almatary
8541b87326 SELFOUR-516 Remove EXPECTED_TCB_SIZE 2016-06-21 14:25:26 +10:00
Adrian Danis
82034bbc02 Merge branch master with arm_hyp 2016-06-17 09:57:07 +10:00
Adrian Danis
fd2f5ec85b Explicitly check if a capability is physical or not
Previously the return value of cap_get_capPtr was compared to 0 in
sameRegionAs to emulate a check in the abstract specification that
tests if the cap is a physical cap or not. Overloading 0 results
in a scenario where a legitimate deviceUntyped's children do not
get considered to be children because they have a capPtr of 0.

This change adds and explicit function that returns whether or not
a capability is physical or not, and uses that in sameRegionAs
2016-06-16 16:42:30 +10:00
Adrian Danis
11c665f53a arm-hyp: Hide more definitions 2016-06-16 15:34:07 +10:00
Matthew Fernandez
06041ab0ed Merge pull request #252 in SEL4/sel4 from ~MFERNANDEZ/sel4:3ce5c4cb-dbf7-4f3b-bb0d-a33908959c3f to master
* commit '7ad7cfba0a539a6a08b437e368fc67d92b0b7bac':
  Fix standalone debug compilation on ARMv6.
2016-06-16 04:48:07 +00:00
Adrian Danis
9a3a450419 x86: Use IO page table size defined in libsel4 2016-06-16 14:20:51 +10:00
Matthew Fernandez
7ad7cfba0a Fix standalone debug compilation on ARMv6.
This commit moves a declaration of `ksKernelEntry` such that it is now only
guarded by `DEBUG`, not additionally `CONFIG_PRINTING`. This allows the kernel
to be built standalone with debugging enabled using the following invocation:

    DEBUG=1 TOOLPREFIX=arm-none-eabi- CPU=arm1136jf-s PLAT=imx31 ARCH=arm \
      ARMV=armv6 make
2016-06-16 12:09:17 +10:00
Adrian Danis
9b7d6e9ce7 arm-hyp: Rename pd->pd_val in some instances
To aid the C parser any variable named 'pd' should be pde_t*, this
renames usages of pd where it is a word_t to be pd_val
2016-06-14 10:52:31 +10:00
Adrian Danis
1d777adbe4 arm-hyp: Correct previous merge with master 2016-06-08 15:11:16 +10:00
Adrian Danis
e67be6acee Merge branch master into arm_hyp
Conflicts:
	src/plat/exynos5/machine/hardware.c
	src/plat/tk1/machine/hardware.c
2016-06-08 15:04:03 +10:00
Adrian Danis
48555c3864 arm-hyp: Hide iospace caps being #ifdef
These cap type existing, even if unused, break the original verification
2016-06-08 14:53:24 +10:00
Adrian Danis
2b90ed467b Merge pull request #236 in SEL4/sel4 from ~ADANIS/sel4:x86 to master
* commit 'b1e7e073df53639c81cb7b9ae4b2f568afa8eb16':
  x86: Move xsetbv to general header
2016-06-08 01:31:48 +00:00
Adrian Danis
c4dcc75c56 arm-hyp: Remove unneccessary cast
This cast causes problems for the C parser
2016-06-08 08:59:52 +10:00
Adrian Danis
b1e7e073df x86: Move xsetbv to general header
The xsetbv and write_xcr0 wrapper are not 32-bit specific and were
placed in the wrong location originally.
2016-06-07 15:31:49 +10:00
Adrian Danis
6d6b047b2d Minor fixes for other ARM platforms 2016-06-07 13:35:55 +10:00
Anna Lyons
c5b6a6a58a Refactor duplicated code in hardware.h
One copy to rule them all.
2016-06-07 12:01:14 +10:00
Anna Lyons
c9684b964f trivial: consolidate timer function declarations
This moves all timer function declarations to a single
header instead of duplication them for each platform
2016-06-07 11:50:11 +10:00
Anna Lyons
0ec5e93771 SELFOUR-402: remove isReservedIRQ
While provided by each hardware platform this function is never called.
2016-06-07 11:50:11 +10:00
Hesham Almatary
efde16c864 fix: kernel debug build fails without ksKernelEntry there 2016-06-07 10:17:46 +10:00
Hesham Almatary
8a159d70cd Merge pull request #228 in SEL4/sel4 from ~HALMATARY/sel4:BenchmarkSharedUser to master
* commit 'a84964ba4cd8e6ca4a9527041a8cfddae27a0c3c':
  SELFOUR-446 Benchmark: Share kernel entry types with user-level
2016-06-06 23:32:48 +00:00
Hesham Almatary
a84964ba4c SELFOUR-446 Benchmark: Share kernel entry types with user-level 2016-06-07 09:19:31 +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
c64ae63e5c Merge branch master into arm_hyp 2016-06-06 11:51:46 +10:00
Adrian Danis
6915cf03be x86: Update autoconf.h for standalone builds 2016-06-03 09:42:37 +10:00
Adrian Danis
93bca86e40 x86: Introduce support for XSAVE feature set
The XSAVE feature set is the future proof way for x86 CPUs to
manage extended CPU state. Extended state is MMX, FPU, SSE, AVX etc
registers. This is a replacement for the current FXSAVE and the
512 byte FPU region.

XSAVE introduces a few problems that this commit has to address

* The alignment of the XSAVE region is 64bytes, instead of the 16
  bytes of the FXSAVE region
* XSAVE region size is dependent on the desired features, which
  are detected at run time
* There are multiple variants of the XSAVE instruction that have
  different potential optimizations, but are not always supported

The solutions to these are

* Re-order the FPU state and user registers in the user context
  struct so that the new XSAVE region is first, and is thus
  aligned to 64bytes without needing lots of padding
* Provide config options for desired features (including XSAVE
  instruction variant) and required XSAVE region size. These
  are checked at boot time to ensure the CPU meets these
  requirements
2016-06-02 11:06:37 +10:00
Adrian Danis
96bcba168b x86: Add functions for writing to the extended control registers 2016-06-02 11:06:37 +10:00
Adrian Danis
1cb58c1f37 Add config_default macro
This macro allows for using the value of a CONFIG_ variable in situations
where it may not be defined. This could be due to it being a dependency
on another CONFIG_ variable that is not currently defined. This arrises
from code blocks like

if (config_set(CONFIG_FOO)) {
    return CONFIG_VAR_DEPENDS_ON_FOO;
}

This will not compile when CONFIG_FOO is not set. Using

return config_default(CONFIG_VAR_DEPENDS_ON_FOO, 42);

Provides a way for this to be built
2016-06-02 11:06:07 +10:00
Adrian Danis
e667a7e04b x86: Add missing CR4 bit definition 2016-06-02 11:06:07 +10:00
Adrian Danis
58f26d2f30 x86: Add missing CPUID functions 2016-06-02 11:06:07 +10:00
Adrian Danis
2516e65cfa x86: Add XSS MSR definition 2016-06-02 11:06:07 +10:00
Adrian Danis
4d76c71e31 x86: Calculate register offset from structures
The address being calculated is the end of the user context array.
There is no need for this to be done as a magic number offset
from the tcb_t, this commit takes an index into the actual array,
using the constant that is defined as the length of that array.
2016-06-02 11:06:07 +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
Hesham Almatary
bcf0a235b1 SELFOUR-446 Unify code base for trace points and track feature 2016-06-02 10:49:25 +10:00
amrzar
128768edac Add support for armV8 and Hikey 32bit 2016-06-01 14:15:29 +10:00
Hesham Almatary
7cbaeb8ed0 SELFOUR-446 Benchmark: Track interrupts and user/vm faults 2016-05-31 08:54:57 +10:00