Commit graph

1173 commits

Author SHA1 Message Date
Anna Lyons
e4f567e19e imx6: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Anna Lyons
7bf513b75e imx31: use declare_default_headers
- remove unused header files replaced by declare_default_headers
- move interrupt.h -> drivers/irq/imx31.h
- move hardware.bf -> drivers/timer/imx31-epit.bf
- move timer.h -> drivers/timer/imx31-epit.h
- move definitions from hardware.h to plat/imx31/machine/hardware.c
2019-04-12 14:25:58 +10:00
Anna Lyons
209563d4ca hikey: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Anna Lyons
e1a36c2601 exynos: use declare_default_headers
- remove unused header files replaced by declare_default_headers
- move timer.h to drivers/timer/exynos5422-mct.h
- move mct.h to drivers/timer/mct.h
2019-04-12 14:25:58 +10:00
Anna Lyons
474a7da5c0 bcm2837: use declare_default_headers
- remove unused header files replaced by declare_default_headers
- move machine.h to drivers/irq/bcm2836-armctrl-ic.h
2019-04-12 14:25:58 +10:00
Anna Lyons
2d77062df4 apq8064: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Anna Lyons
a69c3f0f9c am335x: use declare_default_headers
- move timer.h to include/drivers/timer/am335x.h
- move interrupt.h to include/drivers/irq/am335x.h
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Anna Lyons
0a4ffd0a9a allwinnerA20: use declare_default_headers
- move timer.h to include/drivers/timer/allwinner.h
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Kent McLeod
78c8ac9fae tx2: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Kent McLeod
e86190839e tx1: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Kent McLeod
04aabf92ce tk1: use declare_default_headers
- remove unused header files replaced by declare_default_headers
2019-04-12 14:25:58 +10:00
Kent McLeod
d703eab23d cmake: add declare_default_headers
This allows for arm headers to be generated for an arm platform
in include/plat/default that specifies the following:

- maxIRQ
- TIMER_CLOCK_HZ
- the timer header to use
- the interrupt controller header to use
2019-04-12 14:25:53 +10:00
Curtis Millar
f99f6790ab Use more robust check for TCB size
The complex conditions for the AARCH32 TCB size are updated to better
reflect the circumstances in which the TCB will have a particular size.
2019-04-08 11:18:41 +10:00
Curtis Millar
01c7e62cce Update size comments to reflect the size better
This changes the comments regarding the size of the TCB to be more
generally accurate to help manually determine the size of the TCB for
different configurations.
2019-04-08 10:48:32 +10:00
Curtis Millar
49d2a96dbd Add message register macros to ARMv6 2019-04-05 16:13:56 +11:00
Anna Lyons
56de1ad74b aarch64: adjustments to pass c-parser
This commit updates the aarch64 build to pass the c-parser.

- replace 0b constants with decimal
- remove empty array definition
- replace __uint128_t with uint64_t, and double the array size
- remove variable shadowing

No further verification guarantees are provided for aarch64 code.
2019-04-05 15:39:20 +11:00
Anna Lyons
0cdd0514cf ia32: adjustments to pass c-parser
This commit updates the ia32 build to pass the c-parser.

- replaces ++i with i++
- use void in functions with no parameters
- add a missing typecast
- remove a void cast of an unused variable

It does not provide any verification guarantees about ia32 code.
2019-04-05 15:39:20 +11:00
Kent McLeod
50b1b0a749 arm: Move SYSTEM_*_WORD macros to armv header file
This is needed to avoid circular include dependencies that result from
other header files trying to use these macros.
2019-04-05 13:56:07 +11:00
Siwei Zhuang
897aaf5b13 RISCV: Change 64 bit kernel window mapping to avoid PMP exception.
The SBI memory was mapped outside the kernel window. This would trigger
an instruction access fault on some hardware, when the bootloader has set
up PMP to protect the SBI memory. Instead of protecting a particular memory
region, the PMP locks the entire page table entry that covers the region.

The PADDR_LOAD and kernel base are adjusted to have the SBI memory
included in the kernel window. So that the SBI memory can be mapped as
part of the kernel image to a separate page table entry. This also
avoids the kernel to allocate untyped memory from the SBI region.
2019-04-03 15:03:25 +11:00
Kent McLeod
cde3934f09 handleReservedIRQ: Fix typo in CONFIG_ARM_SMMU
CONFIG_ARM_SMMMU has one too many 'm's
2019-04-02 08:56:46 +11:00
Jesse Millwood
76bf1d2bcd Changed padding and capIRQ in irq_hander_cap structure
This is for the new GIC code

Change-Id: I64fd20767e9b46b3300d87397c72e4e55d386746
2019-03-27 11:16:12 +11:00
Sylvain Gauthier
142bf9b127 More standard constant name, moved ASID constants to arch generic files 2019-03-22 17:34:39 +11:00
Anna Lyons
f54e0ea541 arm-hyp: pass ESR in handleUserLevelFault 2019-03-22 13:40:02 +11:00
Kent McLeod
f6e5e218dc Remove symlinked libsel4 files from include dir
These files can be included normally using libsel4 include paths. This
removes situations where the same file is available under different
include paths due to symlinking into different directory structures.
2019-03-21 12:44:57 +11:00
Kent McLeod
f85774e36f Rename shared_types*.bf files to be consistent
Now these bitfield definitions are generated from the same source file
in the kernel and libsel4, and also result in the same include path: <sel4/shared_types_gen.h>
2019-03-21 12:43:43 +11:00
Kofi Doku Atuah
a61ed43af9 AArch64: Modify kernel higher half mapping: increase from 510 to 512 GiB
The previous 510GiB mapping was chosen to make it easier to eyeball addresses
while debugging: it was trivial to determine the physical address that a virtual
address pertained to in the kernel with this mapping.

This was no longer considered to be a necessary benefit, so this is being
changed.
2019-03-21 12:31:25 +11:00
Kofi Doku Atuah
2352855213 pc99: Use kernelBase in linker script 2019-03-21 12:31:25 +11:00
Kofi Doku Atuah
bc620a707d AArch32: Add __ASSEMBLER__ preprocessor guards for kernelBase 2019-03-21 12:31:25 +11:00
Kofi Doku Atuah
45f16b8e2e AArch64: Remove the llu suffix from kernelBase
* The linker doesn't understand the C type "unsigned long long", so this
  suffix simply causes it to fail with a parsing error.
2019-03-21 12:31:25 +11:00
Edward Pierzchalski
1ca215cfea RISCV: make sure i has a uniform type.
The C parser produces abbreviations for local variables that depend on
the variable type and the order they appear in the source.

The signature for `get_avail_p_reg` on RISCV has a different type for
`i` than every other function, which causes issues when `hardware.h` is
included early in `kernel_all.c_pp`. Changing the type to `word_t`
avoids these issues.
2019-03-20 17:37:41 +11:00
Oliver Scott
ea365a8553 capdl-dump: tcbDebug list, multicore-support, add tcb command
-Use debuglist for runqueues and filter idle and root thread.
-Refactor sendEPQueue.
-Add multicore support.
-Added TCB_COMMAND, kernel now does translation
depending on how it's configured.
2019-03-20 12:55:30 +11:00
Anna Lyons
7fc45c4ef1 style: set code width to 120 2019-03-19 14:05:44 +11:00
Anna Lyons
306453e347 style: set min-conditional-indent to 0
Given we use braces all the time conditional indents do not make code
cleaner.
2019-03-19 14:05:44 +11:00
Anna Lyons
d0930f67de style: consistently attach return type
Add attach-return-type to astyle
2019-03-19 14:05:36 +11:00
Anna Lyons
761006e03b style: consistently align pointer with name
Run astyle with align-pointer=name
2019-03-19 14:04:54 +11:00
Anna Lyons
3d10ef0c4d style: correct parenthesis padding
Use astyle's unpad-paren to unpad all parentheses that are not included
by pad-header, pad-oper, and pad-comma.
2019-03-19 14:02:59 +11:00
Siwei Zhuang
3914931b32 RISCV: Remove hartid and DTB parsing from the boot code. 2019-03-19 13:39:36 +11:00
Anna Lyons
fa017b6d45 Upgrade to astyle 3.1
This produces minor changes
2019-03-18 15:46:44 +11:00
Jasper Lowell
cf113c619b x86_64: Use sys[ret/exit]q instead of rex prefix
Clang does not support the rex.w instruction prefix and instead requires
sys[ret/exit] mnemonics.
2019-03-18 14:11:07 +11:00
Jasper Lowell
7262cb87e6 Treat optimize attribute as gcc specific
Clang doesn't provide support for __attribute__((optimize ...)). There
are alternatives to provide the same functionality but due to how rarely
the kernel is compiled without optimisations, this can be added on
demand.
2019-03-18 14:11:07 +11:00
Anna Lyons
a39c9b6a76 RISC-V: handle all faults
This change alters RISC-V fault handling to pass all non-VM faults as
user exceptions. As we cannot guarantee what the hardware will send us
in the scause register, we must handle all possible values.

It also makes fault handling more consistent with other architectures in
c_traps.c.
2019-03-15 08:35:47 +11:00
Sylvain Gauthier
63ed19c9b7 handleReservedIRQ now implemented on arch level except for pc99 2019-03-14 15:23:54 +11:00
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