Commit graph

286 commits

Author SHA1 Message Date
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
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
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
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
Kofi Doku Atuah
2352855213 pc99: Use kernelBase in linker script 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
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
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
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
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
3989d95473 arm: use UART_PPTR for all uarts 2019-02-05 14:47:38 +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
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
Anna Lyons
5fe6d0bcef riscv/spike: fix seL4_UserTop for riscv
Use correct values and document them.
2018-12-20 12:27:23 +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
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
Edward Pierzchalski
2d075c2760 riscv: remove spurious MODIFIES specs.
Until these functions have non-empty definitions, the C parser will spit
out warnings about ignoring the MODIFIES spec.
2018-12-06 15:04:41 +11:00
Peter Chubb
896e864431 TX2: Add initial TX2 support
See CHANGES and https://docs.sel4.systems/Hardware/ for more information
2018-11-07 11:52:51 +11:00
Axel Heider
8cf34ab395 add missing include for config.h
These files contain conditional parts which depends on CONFIG_PLAT_xxx being set, thus they must include config.h.
2018-09-24 11:03:14 +02:00
Axel Heider
924d1c2639 zynqmp: add Ultra96 platform
Add Ultra96 platform, which is based on the zynqmp SoC
2018-09-14 16:16:23 +02:00
Adam Felizzi
72e675f1da Kbuild: Removed Kbuild
Removed all Kbuild/Kconfig/Makefiles from the kernel as we migrate
to a CMake only build system. Kbuild is no longer supported.
2018-08-10 10:38:53 +10:00
Adrian Danis
3eefc3e7c2 riscv: Make room for devices in rv32
Leaves the last entry in the top level page table free so that it can be used for mapping
devices in the future. This moves the kernel image down to the second last entry in the
top level page table. Leaving the last entry in the top level page table also matches the
rv64 design.
2018-08-09 12:36:28 +10:00
Jesse Millwood
3db47a881e riscv: PADDR_LOAD changed when running on the rocket-chip
This change is required because the zedboard rocket-chip only has
256MiB of memory. Therefore the load address needs to be lowered
to fit in the available range.

This change will also require the kernel to be mapped with 2MiB
granularity so everything is properly page aligned.

Change-Id: I75ddec0be1bb2fd05d0a947ea19bce46e2cd9f96
2018-08-09 10:43:42 +10:00
Sebastian Holzapfel
5f1d63becf rpi3/aarch64: update linker script & relocate PHYS_BASE
rpi3 documentation states RAM *should* be mapped from 0x00000000 onwards,
but we omit the start of physical memory as it caused early boot issues
on access. Instead use u-boot's default kernel load address as PHYS_BASE.
2018-06-04 13:46:19 +10:00
Sebastian Holzapfel
26b66ba92c rpi3: fix PADDR_OFFSET nit 2018-06-04 13:45:44 +10:00
Sebastian Holzapfel
6033fad28a rpi3/aarch64: add aarch64 memory map 2018-06-04 13:44:08 +10:00
Nathan Studer
b15d1476d5 Support a PADDR base other than 0
Several of the mapping calculations rollover when dealing with 32-bits due to the location
of memory on spike, the kernel/user window addresses, and the kernel load address.

Adjust the kernel window so that it covers the typical location of memory on
spike.
2018-05-10 12:44:19 -04:00
Anna Lyons
d3feb06cdd riscv: fix licenses
- add files from elsewhere to the license ignore
- s/D61_BSD/DATA61_BSD
2018-04-18 10:52:02 +10:00
Anna Lyons
76c61025ac riscv: remove dev_pregs
We don't have any devices currently, and in future they will be
discovered, not statically specified.
2018-04-18 10:10:14 +10:00