Commit graph

220 commits

Author SHA1 Message Date
Yanyan Shen
454efecbcf Merge branch 'feature/arm_hyp_tk1' of ssh://bitbucket:7999/~yshen/sel4k into feature/arm_hyp_tk1 2016-05-04 17:05:34 +10:00
Yanyan Shen
fa9b6e4312 arm/tk1: addresses/interrupts for hyp mode 2016-05-04 16:53:27 +10:00
Yanyan Shen
c13eeffddc arm/tk1: add system MMU structures for TK1 2016-05-04 16:42:35 +10:00
Yanyan Shen
4d8f933aba arm/arm_hyp: replace macros with explicit inline 2016-03-24 12:52:38 +11:00
Yanyan Shen
67bcf2357c arm_hyp: rm ARM_HYP ifdefs; func inline assembly
vcpu.c:
encapsulate inline assembly into inline functions that added to
device_pl2.h file.

other files:
replace #ifdef ARM_HYP with config_set(ARM_HYP)
2016-03-24 12:42:19 +11:00
Yanyan Shen
d195a02b91 arm_hyp: remove unused function declaration.
remove map_hypervisor_devices function declaration.
2016-03-24 12:42:19 +11:00
Yanyan Shen
cbb6bf15d1 arm_hyp: add file to contain hyp mode inline funcs
machine_pl2.h:
new place for hyp mode inline functions.

boot.c:
replace #ifdef ARM_HYP with config_set(ARM_HYP).

vcpu.h, machine_pl2.h:
add empty functions when ARM_HYP is not defined to
pass compilation.
2016-03-24 12:42:19 +11:00
Adrian Danis
6932e6a725 Merge branch master into arm_hyp 2016-03-22 16:48:52 +11:00
Yanyan Shen
cc729fab45 Merge pull request #145 in SEL4/sel4 from ~YSHEN/sel4k:feature/tk1 to master
* commit 'b9410822c17886309021671ac547589f4f76db05':
  arm/tk1: add support for Nvidia Tegra K1 board
2016-03-22 05:31:49 +00:00
Yanyan Shen
b9410822c1 arm/tk1: add support for Nvidia Tegra K1 board 2016-03-22 16:23:37 +11:00
Anna Lyons
9ae867cbf2 SELFOUR-435: change kernel timer from GPT11 to 9
GPT1-9 are configured by uboot to run at 13Mhz,
while GPT10-11 are not and run with a much slower clock.
2016-03-17 09:54:40 +11:00
Yanyan Shen
3287bb0e2d Merge branch 'arm_hyp' into feature/arm_hyp_tk1 2016-03-14 16:49:30 +11:00
Yanyan Shen
4178a9e79f arm/arm_hyp: replace macros with explicit inline 2016-03-14 16:47:40 +11:00
Yanyan Shen
6b2c9ade2a Merge branch 'feature/tk1' into feature/arm_hyp_tk1 2016-03-14 16:45:28 +11:00
Yanyan Shen
b0b5d5aaab arm/tk1: add support for Nvidia Tegra K1 board 2016-03-14 16:01:20 +11:00
Yanyan Shen
8e2e8db976 arm_hyp: rm ARM_HYP ifdefs; func inline assembly
vcpu.c:
encapsulate inline assembly into inline functions that added to
device_pl2.h file.

other files:
replace #ifdef ARM_HYP with config_set(ARM_HYP)
2016-03-03 16:03:22 +11:00
Yanyan Shen
1cdc450cb3 arm_hyp: remove unused function declaration.
remove map_hypervisor_devices function declaration.
2016-03-03 15:57:13 +11:00
Yanyan Shen
3abf177c5b arm_hyp: add file to contain hyp mode inline funcs
machine_pl2.h:
new place for hyp mode inline functions.

boot.c:
replace #ifdef ARM_HYP with config_set(ARM_HYP).

vcpu.h, machine_pl2.h:
add empty functions when ARM_HYP is not defined to
pass compilation.
2016-03-03 13:49:45 +11:00
Joel Beeren
702930246a Merge pull request #53 in SEL4/sel4 from ~ALYONS/sel4:reduce-dup-bi to master
* commit '289bf92bf0713f9060f3a43c0ee91f2a06d9e4d7':
  SELFOUR-114: remove bootinfo.h duplication
2016-03-02 23:47:20 +00:00
Adrian Danis
602f536940 x86: Change some PHYS_CODE to BOOT_CODE
The functions pit_init and pit_wait_wraparound were previously marked as
PHYS_CODE, despite being called from BOOT_CODE elsewhere. This bug has
been present for some time but can be masked by the compiler inlining
all the involved functions, which is what typically happens.
2016-03-02 11:11:48 +11:00
Anna Lyons
289bf92bf0 SELFOUR-114: remove bootinfo.h duplication 2016-03-01 17:25:22 +11:00
Yanyan Shen
81fe0a7fa6 arm/imx7: add support for iMX7-based Sabre board 2016-02-25 15:07:53 +11:00
Adrian Danis
e61a1056cc SELFOUR-56: Remove diminish rights from IPC
Diminish rights were to prevent a user from sending a writeable
cap over a read only endpoint. It turns out this 'security' can
be worked around without difficulty (by putting caps in a cnode
and sending the cnode) making the current diminish rights
implementation functionally useless.

Removing diminish rights has the benefit of simplifying all the
IPC paths.
2016-02-23 13:58:48 +11:00
Adrian Danis
22623be2f8 Merge branch master into arm_hyp
Conflicts:
	include/arch/arm/arch/32/mode/object/structures.h
	libsel4/sel4_arch_include/aarch32/sel4/sel4_arch/types.h
	src/arch/arm/32/model/statedata.c
2016-02-22 15:55:31 +11:00
Adrian Danis
d9329d6ba3 Merge commit '417e3e1ccf57f046dcd1e5f5e775f362ddf8bca0' into arm_hyp
Conflicts:
	src/arch/arm/32/kernel/vspace.c
2016-02-22 15:55:10 +11:00
Adrian Danis
d0a42bbf49 Merge commit '812a73a9f58670cb18c36694d505dcd742c2ba8b' into arm_hyp 2016-02-22 15:02:12 +11:00
Adrian Danis
9e35b398cc x86: Refactor vspace code to have verification friendly invocations 2016-02-17 09:43:54 +11:00
Adrian Danis
dd59353944 x86: More portable user mode IO port restriction
For x86-64, to disable IO instructions in user mode requires a
IO permission map being set up properly in TSS. Setting the
IO map base field of TSS larger than the TSS works for 32-bit, but
not 64-bit. This commit sets up a IO permission map usable for both
32-bit and 64-bit kernel and changes the TSS to use the mapping.
The IO permission bitmap is appened to the bitfield generated tss_t,
resulting the tss_io_t structure.
2016-02-15 16:08:51 +11:00
Adrian Danis
775ca8c929 x86: Fix clflush invocation in flushCacheLine
This fixes flushCacheLine to flush the line pointer to be vaddr,
not the cache line of the stack location holding the vaddr pointer
2016-02-15 15:57:45 +11:00
Adrian Danis
1ca0fa1fc2 imx6: Update autconf.h for standalone kernel compile 2016-02-12 14:08:08 +11:00
Robert Kaiser
c0bc7d8fc1 Added changes for Wandboard 2016-02-12 11:54:36 +11:00
Adrian Danis
d20ca20a13 x86: Rename ia32->x86
This is a stylistic commit to make names of variables/constants and
functions in the kernel more consistent. That is, things that are
not IA32 specific, but are generic x86, get renamed to having an
x86 name
2016-02-10 17:02:06 +11:00
Adrian Danis
eb5b792bca trivial: style 2016-02-10 11:48:31 +11:00
Adrian Danis
cfcaf49c2d SELFOUR-399: object sizes and globals frame addr should come from the same source 2016-02-10 09:13:16 +11:00
Adrian Danis
3c9f304a40 x86: Update autoconf.h for standalone kernel builds 2016-02-04 15:00:49 +11:00
Adrian Danis
be6b6be119 x86: FS/GS base MSRs
when FS/GS_BASE_MSR are used to set the base addreses,
user applications should not touch FS/GS regiters; so
the kernel should load proper selectors once, establishing
limits and other attributes for the segments.
2016-02-04 13:39:16 +11:00
Adrian Danis
fa3989eff6 trivial: style 2016-02-04 12:12:36 +11:00
Adrian Danis
91b38f371e x86: Rename mistake usage of x86->ia32 to fix build errors 2016-02-04 11:32:05 +11:00
Adrian Danis
d53aa04fd8 x86: Abstractions for setting up benchmarking log 2016-02-04 10:30:55 +11:00
Adrian Danis
9b7a8405c2 Change bootinfo to have generic slot region for paging structures
Current bootinfo defines two slot regions for paging structures,
one for page directories and one for page tables. This does not
easily generalise for N levels of paging structures. This change
uses a single region that has a known order of objects for however
many levels exist
2016-02-03 16:16:00 +11:00
Robert Kaiser
a2f414dc18 Run idle thread in system mode (rather than supervisor)
Add platform dependent code (using macros from autoconf.h)
to make idle thread run in low power mode on all ARMv7
and ARMv6 except for the KZM board: That board does not
seem to support low power mode although the chip should,
according to he manual

Part of SELFOUR-419
2016-02-03 16:07:55 +11:00
Adrian Danis
417e3e1ccf Merge pull request #103 in SEL4/sel4 from ~AZARRABI/sel4:aarch32 to master
* commit '3959ced3418c08d174e3c7533fc7459d2286fe15':
  Remove mode dependant codes for initial thread from architecture dependant boot codes
2016-02-03 04:14:34 +00:00
Adrian Danis
bddd804a6e x86: IOAPIC/MSI syscalls
Restructure the x86 interrupt handling to allow for a more flexible
method of using IOAPIC and MSI interrupts. The essence of this change
is to allow for the user to pick, for both IOAPIC and MSIs, which
CPU vector to use. Additionally there is future support, in the API,
for seL4 to eventually protect MSI interrupts with the vt-d interrupt
routing tables.

API behaviour for legacy systems using the PIC is preserved

Part of SELFOUR-281
2016-02-02 15:58:18 +11:00
amrzar
3959ced341 Remove mode dependant codes for initial thread from architecture dependant boot codes 2016-02-02 15:48:42 +11:00
Adrian Danis
95c33147c0 Merge branch master into arm_hyp
Conflicts:
	Kconfig
	include/arch/arm/arch/fastpath/fastpath.h
	include/arch/arm/arch/machine.h
	include/arch/arm/arch/machine/hardware.h
	include/arch/arm/arch/machine/registerset.h
	include/arch/arm/arch/model/statedata.h
	include/arch/arm/arch/object/structures.bf
	include/arch/arm/arch/object/structures.h
	libsel4/arch_include/arm/sel4/arch/exIPC.h
	libsel4/arch_include/arm/sel4/arch/types.h
2016-02-01 14:57:37 +11:00
Adrian Danis
0107e60169 ia32: Reduce total number of ASIDs from 16bits to 12bits
This change brings the ia32 api in line with the planned x64 api,
which will have 12bits of ASID. Aside from providing a consistent
API, this change also frees up bits in the frame cap that will
allow further x64 changes to be unified.
2016-01-29 15:46:51 +11:00
Adrian Danis
4f7ac5e196 Merge pull request #95 in SEL4/sel4 from ~ADANIS/sel4:used to master
* commit '21d9f7aeabce0c47033b402c07ec78a36c69c2f4':
  Add 'used' attribute to memcpy to prevent optimizing out
2016-01-27 23:39:01 +00:00
Adrian Danis
21d9f7aeab Add 'used' attribute to memcpy to prevent optimizing out
Some versions of GCC replace a struct copy with a call to 'memcpy',
which it is fully in its rights to do. Unfortunately on ARM platforms,
that have no direct calls to memcpy, the optimizer (in the presence
of -fwhole-program) drops the implementation of memcpy, even as it
is outputting calls to it.

Add the USED attribute prevents the optimizer from dropping the
function eagerly.
2016-01-28 10:36:24 +11:00
amrzar
3fc76c25f6 Rearranging headers for aarch32 to 32/mode/* 2016-01-27 16:32:48 +11:00
Adrian Danis
915a404d5c libsel4: Provide a layer of indirection around types.bf and shared_types.bf to allow for 64-bit variants 2016-01-21 13:31:54 +11:00