Commit graph

312 commits

Author SHA1 Message Date
Adrian Danis
2399465494 SELFOUR-561: s/ARM_HYP/CONFIG_ARM_HYPERVISOR_SUPPORT/ 2016-07-26 15:31:34 +10:00
Hesham Almatary
c4de796da1 Merge pull request #292 in SEL4/sel4 from ~HALMATARY/sel4:fix/ARMHypTraps to master
* commit '3ffa58aa1fb75c65fac4d1351bc6e014bdda2b64':
  Verification: don't translate functions that are re-implemented from assembly to C
  ARM Hyp: Fix fastpath_restore on ARM Hyp and implement slowpath and restore in C
  SELFOUR-526: ARM - Implement slowpath and restore_user_context in C
2016-07-23 04:06:01 +00:00
Adrian Danis
9c7f178f9f Merge pull request #274 in SEL4/sel4 from ~MFERNANDEZ/sel4:8dafd43a-daa8-4d38-ad7e-3ac425d50087 to master
* commit 'd36447b35f88705f796e17f47bf9033918fd2ed0':
  Mark strncmp as a pure function.
  Fix: Make VISIBLE expand to nothing for Clang.
2016-07-21 05:03:02 +00:00
Hesham Almatary
778043a73c ARM Hyp: Fix fastpath_restore on ARM Hyp and implement slowpath and restore in C 2016-07-19 15:27:26 +10:00
Kofi Doku Atuah
56030fc3cc x86: Fix cpuid family/model composition
Fixes a bug where previously MODEL_ID() was defined as:
    `#define MODEL_ID(x) ( ((x & 0xf0000) >> 16) + (x & 0xf0) )`

This was incorrect because (1) it didn't take into account the conditional
nature of the extended_model_ID, and (2) it's actually shifting the
extended_model_ID into the low bits and keeping the model_ID in the high bits,
when it should be the other way around.

This patch also introduces a foundation for more sane testing of CPU vendor,
family, model and brand_ID.
2016-07-15 17:12:25 +10:00
Hesham Almatary
d97603bd84 SELFOUR-566: Decouble seL4_DebugNameThread from CONFIG_PRINTING 2016-07-15 12:30:17 +10:00
Anna Lyons
bb4bda4b7f Merge pull request #286 in SEL4/sel4 from ~ALYONS/sel4:29e0070 to master
* commit '69f140a2268532523b4f52f26d2692963e61b468':
  trivial: remove duplicated setMRs_syscall_error
2016-07-13 01:33:13 +00:00
Anna Lyons
69f140a226 trivial: remove duplicated setMRs_syscall_error 2016-07-12 14:44:14 +10:00
Hesham Almatary
11916d7601 Merge pull request #278 in SEL4/sel4 from ~HALMATARY/sel4:UnifiedCEntry to master
* commit 'cee1268e9bf9619b60bd85cfda0a5d5306e8cf8a':
  [VER-619] Pass verification related to newly added built-in unreachable
  SELFOUR-545: x86 - cleanup c_traps.c file and use new traps.h
  SELFOUR-526: ARM - dummy unreachable statements after fastpath calls
  SELFOUR-526: ARM - Unify C entry point for system calls
2016-07-12 04:37:44 +00:00
Alejandro Gomez-Londono
cee1268e9b [VER-619] Pass verification related to newly added built-in unreachable 2016-07-12 14:32:47 +10:00
Adrian Danis
2b3a305ef8 SELFOUR-560: Remove unused io_page_directory cap 2016-07-08 16:55:33 +10:00
Adrian Danis
c50926b505 SELFOUR-559: Cleanup ARMPageUnmap for IO mappings
This commit moves setThreadState outside the 'perform' stage of the
invocation, and renames decodeARMIOUnmapInvocation to
performPageInvocationUnmapIO as it is actually doing a perform
and not a decode
2016-07-08 16:50:08 +10:00
Adrian Danis
5ca374b34c SELFOUR-558: Consistently name Unmap instead of UnMap 2016-07-08 16:27:02 +10:00
Adrian Danis
75299d05a9 SELFOUR-557: s/isIOSpaceFrame/isIOSpaceFrameCap/ 2016-07-08 16:17:09 +10:00
Adrian Danis
382dc2d60e SELFOUR-554: Update archCapIsPhysical
VCPU and IO page table caps were not added to archCapisPhysical,
this commit fixes that and marks them as physical objects
2016-07-08 15:38:33 +10:00
Adrian Danis
9bedaaa873 SELFOUR-552: Translate IO-ASIDs->PDs by table
Previously looking up the page directory base for a SysteMMU was
done by writing the ASID into the hardware and reading out the
currently set page directory for that ASID. This is confusing for
verification so this commit introduces a global translation table
for converting an ASID to a page directory.
2016-07-08 15:38:33 +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
Matthew Fernandez
d36447b35f Mark strncmp as a pure function.
Simply a performance optimisation. This has no effect on functional behaviour.
2016-06-29 17:04:28 +10:00
Matthew Fernandez
fee3af3dd3 Fix: Make VISIBLE expand to nothing for Clang.
The `VISIBLE` macro is designed to selectively inhibit the effects of GCC's
whole program and link-time optimisations. This is necessary when a C function
is only referenced from a context outside the compiler's visibility, e.g. an
assembly file. As far as I can determine, Clang's link-time optimisations
already account for this possibility and do not need to have this information
manually indicated to them (see, for example, Linux's compiler support headers).

In any event, `__attribute__((visibility("default")))` is not equivalent to
`__attribute__((externally_visible))`, but is instead for controlling symbol
visibility in a library-like setting. This commit removes this incorrect
expansion.
2016-06-29 16:58:47 +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