Commit graph

362 commits

Author SHA1 Message Date
Axel Heider
ed613d7d49 python: remove unused template parameter
Since commit cf8be663 this is no longer needed.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2024-01-02 10:55:45 +11:00
Cindy Liu
498fd84a55 use raise warining in version check
Signed-off-by: Cindy Liu <hcindyl@google.com>
2023-12-28 06:05:07 +07:00
Cindy Liu
807a42e91e Move the version check just before the usage
Signed-off-by: Cindy Liu <hcindyl@google.com>
2023-12-28 06:05:07 +07:00
Cindy Liu
04dc9675f3 Replace deprecated pkg_resources usage
Use importlib.metadata to check the jinja2 version

Signed-off-by: Cindy Liu <hcindyl@google.com>
2023-12-28 06:05:07 +07:00
Ivan-Velickovic
e959f83962 Add support for Star64 SBC
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
2023-11-08 14:34:18 +00:00
Nick Spinale
2c8bc584da cmake: generate config headers at config-time
Commit 6d439a4646, which added JSON configuration output, caused the
configuration headers to be generated at build-time instead of
configure-time.  This broke CAmkES build systems which depend on
configuration headers in CAmkES files at configure-time.

This commit makes the configuration headers available at configure-time.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2023-10-28 07:36:42 +11:00
Ivan-Velickovic
e1bdd809b6 Output JSON for hardware configuration
Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
2023-08-13 08:59:55 +10:00
Ivan-Velickovic
2730e65796 Mark CLINT as reserved device on RISC-V platforms
Without this patch, user-level programs have the ability to
map in the core-local interrupt controller on RISC-V platforms
which contains the memory-mapped registers for the core-local
timer the kernel uses. This is a level of privilege that
user-level programs should not have. Writing to the `mtime`
register is possible which can then affect the timer interrupts
are delivered to the kernel.

Signed-off-by: Ivan-Velickovic <i.velickovic@unsw.edu.au>
2023-06-19 11:05:02 +10:00
Gerwin Klein
07a8263a9d bitfield_gen: add CLI to manual
* describe CLI
* describe pruning
* mention where in seL4 generated code and source are

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-03 09:05:23 +10:00
Gerwin Klein
449c9089ad
bitfield_gen: remove obsolete options, add help
* Add help texts for all CLI options.

* Point to the manual in file header.

* Remove obsolete `--multifile_base` and `--c_defs` options. The former
  is unused and the logic for it was removed in the previous commit.
  The latter is not referenced in the code and has no effect. `

* Remove unused `mode` variable.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-01 12:35:48 +10:00
Gerwin Klein
ebea422f86
bitfield_gen: remove unused --multifile_base logic
The `--multifile_base` option is unused in the seL4 build and has
comments indicating that it is broken.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-01 12:35:38 +10:00
Gerwin Klein
4b18acaed9
tools: TOC for bitfield generator manual
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-27 13:24:37 +10:00
Gerwin Klein
13f0f035cf
tools: add manual for bitfield_gen.py
Add a user manual for the bitfield generator that documents syntax,
semantics and basic concepts. Should also be able to serve as main
spec for what the tool is supposed to do.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-27 13:24:37 +10:00
Gerwin Klein
886fcec2b6 trivial: fix typo
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-27 13:13:13 +10:00
Axel Heider
525d14ccfc python: include config.h first in generated files
Including the configuration first ensure consistent behavior.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-04-24 23:02:12 +10:00
Axel Heider
8eec7ad207 python: include sel4/config.h and not autoconf.h
Include sel4/config.h instead of autoconf.h in the generated code.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2023-04-24 23:02:12 +10:00
Gerwin Klein
57c46bc8d0 bitfield_gen: comment for original source file
Add a `--form_file <file>` option to the bitfield generator for
printing a `/* generated from <file> */` message in a comment.

Use this option in cmake to provide the original source .bf file before
preprocessing so it's easier to find out where the corresponding
definitions are.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-10 15:46:00 +10:00
Rafal Kolanski
65a1b457a4 make physBase a static inline function
For verification flexible w.r.t kernel placement in physical memory, we
need to relate physBase as a named constant to its abstract equivalent.
Unfortunately, apart from enums, the C programming language does not
have real constants. The C parser follows the C standard and requires
enums constants to be storable as int, meaning without major overhaul
enums are not sufficient for storing word_t-sized memory addresses.

Since the linker scripts can't deal with static inline functions
in the constants they need (KERNEL_ELF_BASE and KERNEL_ELF_PADDR_BASE),
we provide the following preprocessor definitions for the linker
specifically:
* PHYS_BASE_RAW (the numerical value returned by physBase())
* KERNEL_ELF_BASE_RAW
* KERNEL_ELF_PADDR_BASE_RAW

Signed-off-by: Rafal Kolanski <rafal.kolanski@proofcraft.systems>
2023-03-07 14:29:14 +11:00
Nick Spinale
c642a398ba cmake: provide gen_config.json
gen_config.json provides a language-independent means of accessing the
kernel configuration. Before, gen_config.h was generated directly in
CMake.  Now, gen_config.yaml is generated directly in CMake, and
gen_config.h and gen_config.json are derived from gen_config.yaml.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2023-03-02 09:31:42 +11:00
Nick Spinale
acba034390 cmake: add missing dependency for autoconf
Declare that autoconf.h depends on each gen_config.h that it references.

Signed-off-by: Nick Spinale <nick@nickspinale.com>
2023-03-02 09:31:42 +11:00
Peter S. Housel
8ca4a87c9a Add Quartz64 support
This adds support for the Pine64 Quartz64 and other devices based on
the Rockchip RK3566. The platform support is adapted from the
Rockpro64 code, except that the RK356x has A55 cores, and adjusting
for the fact that the ARM Generic Timer is the only on-chip timer
available.

Signed-off-by: Peter S. Housel <housel@acm.org>
2022-11-21 16:43:20 +11:00
Jesse Millwood
e2ae959ceb polarfire: fix address for timer in dts
Signed-off-by: Alex Pavey <Alex.Pavey@dornerworks.com>
2022-11-06 18:31:54 +11:00
Jesse Millwood
48ee2f07c7 Polarfire: Made timer dts node 4k region
Signed-off-by: Alex Pavey <Alex.Pavey@dornerworks.com>
2022-11-06 18:31:54 +11:00
Joonas Onatsu
8b22630929 kernel,bcm2711: Remove redundant reserved mem
Remove redundant (and incorrect) reserved memory
definition for VideoCore memory. The reserved
memory area is defined in 'overlay-rpi4.dts'.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Hannu Lyytinen
0de322929c kernel,bcm2711: remove UART pinmux
Signed-off-by: Hannu Lyytinen <hannux@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Hannu Lyytinen
1a9b776e4f kernel,bcm2711: Add RPi4 memory map
Signed-off-by: Hannu Lyytinen <hannu.lyytinen@unikie.com>

kernel,bcm2711: Fix RPI4 address mapping

Fix build error and warnings by removing GPIO mapping
from overlay. Also as a note, don't add 'serial1' or 'ethernet'
here, because 'serial1' is already mapped to sel4 kernel by
'chosen' block in 'overlay-rpi4.dts', and the translation for
the 'ethernet' is done with 'ranges' property.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>

kernel,bcm2711: Fix memory area overlay DTS

First fix is to change the memory area reserved for
the VideoCore from 64 -> 76 MB, as this is the default
value on RPi4. Using other values would require configuration
of the first stage bootloader with 'config.txt' file.

Second fix is separating the disjunct memory areas
to separate nodes, as the generator Python scripts
in 'kernel/tools/' etc discarded the first area below
1GB limit if all areas were defined in the same node.
The effect of different variations can be observed
during kernel build in the generated
'kernel/gen_headers/plat/machine/devices_gen.h' header.

Third fix is adding the reserved memory area for the
VideoCore memory to avoid any collisions.

Signed-off-by: Joonas Onatsu <joonasx@ssrc.tii.ae>
2022-10-26 15:27:19 +11:00
Ahmed Charles
c92b3b3163 Add __repr__ for WrappedNode
Signed-off-by: Ahmed Charles <acharles@outlook.com>
2022-07-20 16:37:33 +10:00
Bin Meng
3179add042 tools/bitfield_gen: ensure UTF-8 encoding
There are cases that reasonably require non-ASCII characters in the
source code, hence tools/bitfield_gen.py must be able to handle them
correctly. This commit makes sure the bitfield generator consistently
opens all files with UTF-8 encoding.

Co-authored-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
2022-06-03 14:19:24 +10:00
Mark Jenkinson
ae7798e319 Update MaaXBoard device tree
Generated from maaxboard-dcss-hdmi.dts (Avnet/linux-imx) for more
comprehensive device support. Updated overlay to align.
Signed-off-by: Mark Jenkinson <mark.jenkinson@capgemini.com>
2022-06-03 09:45:02 +10:00
Stephen Williams
55fde27e10 Add support for the Avnet MaaXBoard
Signed-off-by: Mark Jenkinson <mark.jenkinson@capgemini.com>
Co-Authored-By: Stephen Williams <stephen.williams@capgemini.com>
2022-05-11 17:31:07 +10:00
Axel Heider
83a02a96fc python: use '#paragma once' include guard
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-03-23 17:28:07 +11:00
matt rice
7eb7cb1f6a fix parenthesis in condition_to_cpp
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
e863cbe987 remove test_xml_condition.py
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
0e354b5766 tools: use conditions elem
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
matt rice
accccf3dbb add condition elem, test it against condition attr
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-22 18:33:38 +11:00
Gerwin Klein
0c9952f90a trivial: proof style fixes for bitfield_gen
Bring up-to-date with current proof style, make style consistent,
slightly increase proof parallelism.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-22 11:06:34 +11:00
Gerwin Klein
9f9ceddc18 bitfield_gen: allow non-contiguous tag fields
A tagged union can now optionally use multiple fields to indicate the
tag. These are called "sliced" tags in the code. The tag fields have to
be at the same position and width in each block of the tagged unions,
and all tag fields have to be within the same word.

When sliced tags are used, tag class masks cannot be used at the same
time for this tagged union.

In the `tagged_union` declaration, the values of such sliced tags
become tuples. For instance, if `x` and `y` are tag fields (declared in
blocks not shown here) with width 1 and 2, we can write:

    tagged_union ex exType(x,y) {
        tag ex1 (0,2)
        tag ex2 (1,3)
    }

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-21 17:43:37 +11:00
matt rice
97bb77a116 trivial: update path to syscall.xml
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-01 07:57:31 +11:00
matt rice
190e004614 move logic out of syscalls jinja template
Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-01 07:57:31 +11:00
matt rice
d742424021 use the loop.first builtin instead of namespaces
this allows the template to be parsed with minijinja
which doesn't support namespaces or set (at this time).

Signed-off-by: matt rice <ratmice@gmail.com>
2022-03-01 07:57:31 +11:00
Axel Heider
6c3c4ac7b4 add comment for conditional section end
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-01-04 19:26:24 +11:00
Axel Heider
b3fce750d5 use '#pragma once' guard
Signed-off-by: Axel Heider <axelheider@gmx.de>
2022-01-04 19:26:24 +11:00
Alex Pavey
2935150c35 zynqmp/ultra96: Generate smmu node in header
Also make device trees more consistent between zynqmp
and ultra96.

Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2021-12-21 08:13:14 +11:00
Chris Guikema
8d52ba7d26 ultra96: differentiate between v1 and v2
This commit adds a new device tree for the ultra96v2, adding
additional devices to give to userspace.

Signed-off-by: Robbie VanVossen <robert.vanvossen@dornerworks.com>
2021-12-21 08:13:14 +11:00
Axel Heider
c036e6c676 python: use KernelSel4Arch instead of KernelArch
Drop optional parameter 'arch' and make 'sel4arch' a required parameter
to avoid implicit assumptions.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-12-03 10:26:41 +11:00
Axel Heider
e75d22bedd python: align imports
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
88be9c1f7c python: add helper functions
Separate parameter collection from the actual file creation.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
42736a335f python: avoid name conflicts with module name
Also cleanup/align variable naming.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
f4e38b1e5b python: make Region parameter owner optional
Also ensure the description is created correctly.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
a16ec5ef7f python: add type information
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
a0c5020789 python: trivial script cleanup
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
d31019ff0a python: cleanup devices_gen.h template
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
bac15924ad python: clarify includes in devices_gen.h template
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Axel Heider
94963c7bec python: update creator info comment
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-11-14 11:44:00 +11:00
Luca (Wei) Chen
e9bdd85e81 allwinnerA20: switch to the ARM generic timer
The memory mapping for the timer only uses 1K on AllwinnerA20, but
the minimum device mapping is 4K in seL4. Other devices within this
4K page (CCU and PIO) cannot be accessed in the userland.
Replace the kernel timer with the ARM generic timer on AllwinnerA20,
and remove the implementation for AllwinnerA20 specific timer in the
kernel. So we should have user access to those devices now.

Signed-off-by: Luca (Wei) Chen <wei@cvluca.com>
2021-10-28 08:30:41 +11:00
Stephen Sherratt
711a17e4c9 Add whitespace to beaglebone dts to match others
Makes it easeier to eyeball the difference between the beaglebone's spec
and (say) the beaglebone-black's spec.

Changed with `sed -re 's/<(.*)>/< \1 >/`

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
2021-10-27 21:25:39 +11:00
Stephen Sherratt
86abcd33a1 Add device tree spec for bone
Generated by:
- clone linux from https://github.com/torvalds/linux.git
- checkout v4.20
- run update-dts.sh script

Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
2021-10-27 21:25:39 +11:00
Stephen Sherratt
5888e3a9a6 Add beaglebone to update-dts.sh script
Signed-off-by: Stephen Sherratt <stephen@sherra.tt>
2021-10-27 21:25:39 +11:00
elelel
be34e323e5 Fix indexing into an empty array
Signed-off-by: elelel <elelel@3wh.net>
2021-10-18 18:10:59 +11:00
Kent McLeod
18a3fb3bae hardware.py: Create smaller UT at end of addresses
At the end of the physical address range, the last address isn't turned
into an UT object. The scripts generating the memory regions
unnecessarily round down to a small page size when they could instead
round down to the smallest UT size and this memory could be used for
smaller kernel objects.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-10-03 10:10:43 +11:00
Kent McLeod
3defbff461 Remove KZM/imx31 platform
The platform was the original verification target of seL4 over 10 years
ago and by now there doesn't appear to be any ways to obtain new
hardware.

Currently, the KZM platform is the only ARMv6 platform and supporting it
requires a few work-arounds for emulating mechanisms that newer hardware
supports. Removing this platform also implies removing armv6 support
soon.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-09-30 18:07:19 +10:00
Axel Heider
77fb21aa90 python: add __str__() for Region
- Provide a nicer string for debugging purposes.
- improve comments about the purpose of __repr__() and __str__()

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-09-27 23:09:24 +10:00
Axel Heider
7d7a404bff python: raise exceptions on errors
- A region can't be created from an invalid range
- A region might be too small to support the change. There is no trivial
  way to fix this.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-09-27 20:49:56 +10:00
Axel Heider
14314983a6 risc-v: clarify PLIC is for SiFive U54/U74
RISC-V defines the concept of a PLIC, but leaves the details open. The
driver is for the PLIC of the SiFive U54/U74 SOC, which is used on
the HiFive Unleashed/Unmatched and Polarfire board.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-09-26 11:31:51 +10:00
Bertrand Virfollet
b32b9568b2 tools: merge adjacent memory regions
Merge memory regions before checking for reserved areas

Co-authored-by: Gerwin Klein <gerwin.klein@proofcraft.systems>

Signed-off-by: Bertrand Virfollet <bvirfollet@silicom.fr>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-08 07:53:53 +10:00
Alexander Fasching
560f215489
tools: Fix regex for ignore pattern (#535)
Signed-off-by: Alexander Fasching <fasching.a91@gmail.com>
2021-09-03 12:54:17 +10:00
Ben Leslie
e3eda12d03 Add support for the TQMa8XQP 1GiB module
TQ Group produces a system-on-module family called TQMa8Xx.

The user manual for this SoM is available here:

https://www.tq-group.com/filedownloads/files/products/embedded/manuals/arm/embedded-modul/TQ-Socket/TQMa8Xx/TQMa8Xx.UM.0104.pdf

This SoM comes in a number of different configurations.

The specific NXP SoC used, and the amount of memory are both
configurable.

The TQMa8XQP is the part number for the TQMa8Xx family configured with
the i.MX 8QuadXPlus SoC.

The datasheet for the SoC is available here:

https://www.nxp.com/docs/en/data-sheet/IMX8QXPAEC.pdf

In addition to the SoC being configurable the amount of SDRAM
on the SoM is also configurable.

The support provided in this PR is specifically for the TQMa8XQP
configured for 1GiB of memory. Note: Actual usable memory available
to the ARM application processor is 1022MiB.

System-on-modules rely on an appropriate carrier board.
Testing of this PR has been done on the MBa8Xx carrier board
that is available from TQ Group as part of their starter kit.

To the best of my knowledge there is nothing in this PR
that depends on the carrier board itself; all code is SoM
specific and should support any carrier board.

Note: This support is very specifically for the TQMa8XQP configured
with 1GiB of memory.

This may be a starting point for supporting other boards that
also have the NXP i.MX 8QuadXPlus SoC (as well as the i.MX 8DXP
and possibly other SoC in the i.MX 8 family).

Support is limited to the specific SoM due to the way in which
platform support currently works for seL4. Building a kernel
currently relies on the information from the DTS file (which is
SoM + RAM configuration specific). It would be preferable to
allow more generic support but SoC families but that is beyond
the scope of this PR.

Signed-off-by: Ben Leslie <benno@brkawy.com>
2021-08-31 08:38:25 +10:00
Axel Heider
da0aad0330 make kernel device frame handling more generic
The structure actually describes kernel frames and not kernel devices.
In most of the cases a peripherals will fit into one page, but some can
need more pages. On some platform there are no kernel devices at all.
Provides the macro NUM_KERNEL_DEVICE_FRAMES as simple way to find out if
there are mapping that hides the corner cases. This eventually allows
implementing a generic handling even on RISC-V without much overhead, so
the hack for HiFive/Spike can be removed.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-08-27 21:15:11 +10:00
Axel Heider
048c84fb94 use explicit field names in generated code
Using explicit field name in the assignment states more clearly what the
generated code does. It is also more robust and allows the compiler to
catch potential inconsistencies in case the structure details change.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-08-27 21:15:11 +10:00
Axel Heider
69204d0d2e trivial: break long lines in comment
Improve readability by breaking the line at around 80 chars.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-08-27 21:15:11 +10:00
Gerwin Klein
7892335ca1 tools: more portable shell test
No need for bash style test `[[ .. ]]`, normal POSIX test `[ .. ]`
works fine.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 17:56:49 +10:00
Gerwin Klein
00879fa943 tools: use /usr/bin/env for bash/sh invocation
This implements GitHub PR #115 on the current repo state. /usr/bin/env
is already used for other (cmake/python/etc) invocations, and this PR
brings bash/sh into line with that for slightly improved portability.

Co-authored-by: Douglas Wilson <douglas.wilson@gmail.com>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-25 17:56:49 +10:00
Gerwin Klein
7f562e1633 tools: consolidate RISC-V + Arm memory base logic
Co-authored-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
Co-authored-by: Axel Heider <axel-h@users.noreply.github.com>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-24 18:04:43 +10:00
Gerwin Klein
2296484665 tools: add risc-v dtb interrupt parsing
Co-authored-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-24 18:04:43 +10:00
Gerwin Klein
3398c01ee9 umm.py: no memoization
Memoization is not worth it here, the runtime of the entire program
is tiny. Removing the comment to curb temptations in the future.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-24 18:04:43 +10:00
Axel Heider
d0a3b28005 risc-v: avoid warning about interrupt parsing
Avoid the warning 'WARNING:root:Not sure how to parse interrupts for
"/cpus/cpu@0/interrupt-controller"' when building for platform hifive.

Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-08-24 10:04:56 +10:00
Kent McLeod
379bf5abe3 hardware_gen.py: Address some warning messages
CMake treats any text output that is generated by tools during the
configuration phase as important if it isn't part of a message(STATUS)
command. Output generated by hardware_gen.py often shows up as warnings
about device tree properties that are usually uninformative. Resolving
some of the warning conditions removes these messages for most
platforms.

- Setting kernel_size in hardware.yml to 0x1000 to handle cases where
  the kernel only needs the first page of a device that has a
  device-tree definition larger than that.
- Remove status print about each Interrupt processed as it's usually not
  useful information.
- Only process IRQs for a selected kernel device if the rule for that
  device has any interrupt queries. This prevents warnings for IRQ
  controllers that the script doesn't know how to process when it
  doesn't need to.

Signed-off-by: Kent McLeod <kent@kry10.com>
2021-07-29 16:03:01 +10:00
Curtis Millar
76b1de0670 Add ODroid C4 support
This adds support for the ODroidC4. The ODroidC4 is just a beefier
ODroidC2 with some bits moved around. The devices we care about here are
all essentially the same except the cores are A55s instead of A53s.

Signed-off-by: Curtis Millar <curtis@curtism.me>
2021-07-09 14:05:05 +10:00
Axel Heider
ad4ea6cd08 CMake: unify config options define generation
Add disabled options from the build system as comments in the generated
header files.

Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-07-01 12:05:37 +10:00
Axel Heider
d1fb5c01a7 use '#pragma once' include guards
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-06-20 11:53:58 +10:00
Axel Heider
9a4d3ae51d CMake/autoconf: remove unused AUTOCONF_INCLUDED
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-06-09 09:50:02 +10:00
Ben Leslie
7dc6dffa0f Add support for iMX LP UART
Add support the i.MX low-power UART. This is available on
chipsets such as i.MX8QXP.

Note: This is a preliminary patch in advance of providing
full support for the i.MX8QXP platform.

Note: getchar is not implemented (current) for this platform.

Signed-off-by: Ben Leslie <benno@brkawy.com>
2021-06-02 11:43:48 +10:00
Axel Heider
d486bc0b5a Add i.MX6 Nitrogen6_SoloX board
Signed-off-by: Axel Heider <axel.heider@hensoldt-cyber.de>
2021-03-31 13:38:25 +10:00
Lukas Graber
2a0e5a2a1f Bring Raspberry Pi 4 (RPi4) support
Signed-off-by: Lukas Graber <lukas.graber@hensoldt-cyber.de>
2021-03-22 11:41:03 +11:00
Alistair Francis
0972c4e9a9 RISC-V: Replace mentions of BBL with OpenSBI
Signed-off-by: Alistair Francis <alistair.francis@wdc.com>
2021-03-09 11:20:57 +11:00
Axel Heider
0a6e04769e autoconf: use "#pragma once" include guard
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-06 02:24:41 +01:00
Damon Lee
05222c2288 exynos5: Update device definitions
The max IRQ and devicetree definitions are slightly outdated. This
commit updates these definitions.

Signed-off-by: Damon Lee <Damon.Lee@data61.csiro.au>
2021-03-05 15:04:41 +11:00
Axel Heider
a5c2d51386 CMake: add include guard to auto-generated files
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-03 11:49:07 +01:00
Axel Heider
36ebac4fb4 trivial: fix typo in comment
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-03-03 11:47:23 +01:00
Axel Heider
f46df2ad6d CMake: remove unused macros
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-02-01 18:44:20 +01:00
Axel Heider
651fb65017 CMake: inline set_kernel_32() and set_kernel_64()
Signed-off-by: Axel Heider <axelheider@gmx.de>
2021-02-01 18:23:42 +01:00
Gerwin Klein
b5e48eb787 bitfield_gen: prep for Isabelle2021
Isabelle2021 sometimes gets further with mask_simps, so this commit
makes them optional. Also removes a duplicate simp-rule warning.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-01-24 18:42:27 +11:00
Damon Lee
2d9881065b zynqmp: Remove duplicate interrupt entries
There are duplicate interrupts in some of the devices in the devicetree.
This commit removes these duplicate interrupt entries to avoid errors
with some of our tools (CAmkES, etc).

Signed-off-by: Damon Lee <Damon.Lee@data61.csiro.au>
2021-01-22 16:02:53 +11:00
Curtis Millar
ab3d8c44cb
riscv: Map devices with large pages on 32 & 64-bit
For 64-bit, this adds a 2nd-level page table for mapping devices using
2MiB frames instead of 1GiB frames.

The boot mapping and hardware header generator have also been fixed to
correctly report the number of large frames needed for devices rather
than only reporting the first. The frame size is also specified
correctly (rather than assuming mapping with 4KiB frames).

This likely fixes an issue whereby only the first 4KiB frame of a device
was reserved but the remaining region of that kernel device could be
mapped at user level.

Signed-off-by: Curtis Millar <curtis.millar@data61.csiro.au>
2020-12-03 10:31:16 +11:00
Nils Wistoff
cd96ee330f ariane: update PLIC and dts
add PLIC driver for Ariane and update dts

Signed-off-by: Nils Wistoff <nwistoff@iis.ee.ethz.ch>
Reviewed-by: Siwei Zhuang <siwei.zhuang@data61.csiro.au>
2020-11-16 11:43:28 +11:00
Oliver Scott
73b0773d90 tk1-smmu: corrections
Fix tk1 smmu cmake config variables.
Fix platforn_gen for tk1.
Add separate hardware.yml for tk1.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-11-06 15:21:25 +11:00
Qian Ge
1a9756f65b SMMU: basic driver for init and probing
Introducing the driver in kernel for detecting SMMU features
and initialise the hardware.

Signed-off-by: Oliver Scott <Oliver.Scott@data61.csiro.au>
2020-10-28 17:30:42 +11:00
Gerwin Klein
4fd7cb0360 unify license tags
The tags now all conform to REUSE version 3.0

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-28 16:03:11 +11:00
Jesse Millwood
b77c9b2051 PolarFire SoC: Initial support for platform
Signed-off-by: Jesse Millwood <jesse.millwood@dornerworks.com>
2020-10-28 08:33:05 +10:00
Stefan O'Rear
a91e979c5a clang: Fix errors on zero kernel devices
"const TYPE *ptr" creates a non-const pointer to const data; for the
pointer itself to be rodata requires "TYPE *const ptr".

Taking the size of the pointer is caught by -Werror by default; suppress
that.

Signed-off-by: Stefan O'Rear <sorear@fastmail.com>
2020-08-26 14:21:35 +10:00