Commit Graph

314 Commits

Author SHA1 Message Date
Anna Lyons
bc61a7f3bd python2 --> python3
Update all scripts and build system to call python3, given python2's
upcoming doom. Use sys.maxsize instead of sys.maxint in one script
(maxint does not exist in python3).
2019-08-08 10:19:24 +10:00
Kent McLeod
158ab9a3eb python-deps: Add pyelftools to sel4-deps package
This dep is required by the elfloader for loading Arm and RISC-V
platforms.
2019-07-31 11:32:34 +10:00
Kent McLeod
9b1877de21 Add initial i.MX8M Mini evk 64-bit Support
This adds support for the 64-bit i.MX8M Mini evaluation kit.
Currently only AArch64 EL1 is supported.
2019-07-19 14:32:53 +10:00
Yanyan Shen
d6d3aa4c32 trivial: dts: Change the DTS for FVP 2019-07-10 06:59:13 +10:00
Simon Shields
55ad2c4dca GICv2: map VCPU region as execute never
This matches the other GIC regions.
2019-07-02 16:04:39 +10:00
Kent McLeod
051d32beab Add initial i.MX8M Quad evk 64-bit Support
This adds support for the 64-bit i.MX8M Quad evaluation kit.
Currently only AArch64 EL1 is supported.
2019-07-01 23:31:47 +10:00
Kent McLeod
0d60f6f298 arm: Rename gic_pl390 to gic_v2
This is to reflect that this driver provides support for features that
are newer than gic_pl390 such as virtualisation.
2019-07-01 23:30:39 +10:00
Kent McLeod
82f2d1fc9c helpers.cmake: Add FORCE to all INTERNAL sets
INTERNAL implies FORCE but in some versions of CMake if a config option
has been passed in via a -D option the INTERNAL set doesn't override the
value when it should.

See: https://gitlab.kitware.com/cmake/cmake/issues/19015
  INTERNAL does not imply FORCE for CACHE
2019-06-27 18:29:55 +10:00
Siwei Zhuang
8b4ed9941a RISCV: Add Hifive unleashed platform
This change adds support for Hifive unleashed board. It also removes the
outdated hifive suport from the spike platform.
2019-06-26 15:11:47 +10:00
Siwei Zhuang
efda335b8c RISCV: Add DTS for 32bit spike platform
There is a different DTS file for 32bit spike platform.
2019-06-26 11:38:08 +10:00
Siwei Zhuang
375a98c8b3 CMake: Generate device headers from DTS for spike
The DTS compilation was arm platforms only. Moving it to the top level
config file, making it available to RISCV platforms. The generated files
are almost identical with minor differences. A new argument(--arch) is
added to the hardware_gen.py for the differences.
2019-06-26 11:38:08 +10:00
James Ye
ff418649c1 am335x: add BeagleBone Blue support
BeagleBone Blue is a BeagleBone variant aimed at robotics applications.
Device Tree generated from Linux 4.20.17
2019-06-24 11:28:20 +10:00
James Ye
b7950aa332 tools/dts: use correct dts for am335x-boneblack
Device Tree generated from Linux 4.20.17
2019-06-24 11:28:20 +10:00
James Ye
33fd7b0423 Rename am335x to am335x-boneblack
There are other am335x boards which require different platform
configurations, such as the BeagleBone Blue.
2019-06-24 11:28:20 +10:00
Kent McLeod
664ac2288c python,sel4-deps: Pin versions for style tools
These tools sometimes style differently across different versions.
2019-06-18 15:33:36 +10:00
cvluca
24131333ac trivial: disable YAML loading warning
Use of PyYAML's yaml.load function without specifying the Loader=...
parameter, has been deprecated.
2019-06-14 10:17:10 +10:00
Anna Lyons
28c3dfe187 hardware_gen.py: Add YAML output support
We need other tools to be able to gather information about the kernel
memory reservation areas and device memory regions.  Add mandatory
parameter --yaml for specifying the name of the output file to receive
this information.  Write it.

Committed by G. Branden Robinson <Branden.Robinson@data61.csiro.au>.
2019-05-14 15:37:52 +10:00
G. Branden Robinson
d3446bc534 hardware_gen.py: List required paramaters first
In the usage message, identify all the required parameters before the
optional ones.
2019-05-14 15:37:52 +10:00
G. Branden Robinson
2ee6496af3 hardware_gen.py: Defer module import attempt
Move module imports that are not absolutely required into a function
instead of at the top level so that we don't spew the diagnostic message
in scenarios like `--help` or usage errors.
2019-05-14 15:37:52 +10:00
G. Branden Robinson
8d0950ff4f hardware_gen.py: Give tool a description
Nothing said what this tool actually _does_.
2019-05-14 15:37:52 +10:00
Kent McLeod
3707f65c6f CMake: Refactor DTS compilation step in CMake
- Minimise calls to external_process as this is more expensive than
using built-in CMake file operations.
- Update check_outfile_stale to also save the list of files it checks
for stale checks so if a config changes the list of files then the
output file will still be stale even if the input list of files are
older than it.
2019-05-07 10:15:54 +10:00
Kent McLeod
9db06db088 CMake: Remove unused cmake module import
While some functionality in helpers.cmake is based on
CMakeDependentOption, this module isn't actually used.
2019-05-07 10:00:08 +10:00
Kent McLeod
c75a270f56 hardware_gen.py: memoize should_parse_regions
should_parse_regions performs a lot of repeated recursive calls on
immutable inputs. Memoizing it to cache previous calls leads
to a noticible reduction in execution time.
2019-04-23 09:16:09 +10:00
James Ye
a16cc57e21 Add Odroid-C2 support
Add support for the Hardkernel Odroid-C2 board.

Co-Authored-By: Anna Lyons <Anna.Lyons@data61.csiro.au>
2019-04-18 11:14:17 +10:00
Anna Lyons
fa60ebabc6 tools: add autopep8 dependency 2019-03-27 10:50:26 +11:00
Anna Lyons
cf57914c7f style: run autopep8 on python files 2019-03-27 10:43:58 +11:00
Anna Lyons
305b5f9c3d tools: add guardonce python dependency 2019-03-25 16:02:51 +11:00
Luke Mondy
715e595193 Fix cmake-format dep name 2019-03-22 14:38:04 +11:00
Anna Lyons
ffa9fda8f0 style: use consistent styling for all cmake files
Add .cmake-format.yaml which defines custom functions with kwargs to
style nicely
2019-03-22 11:52:06 +11:00
Anna Lyons
86ed25b8c0 cmake: use snake_case for RegisterDriver & CPPFile
Our upcoming cmake styling tool requires any custom functions you want
styled nicely to be lower case. We only need to style these two nicely,
as they have kwargs we would like aligned.
2019-03-22 11:50:04 +11:00
Anna Lyons
dad3b8ba56 python-deps: add cmake-style 2019-03-22 11:47:07 +11:00
Kofi Doku Atuah
16f55f8e4b Device-generation: Add __ASSEMBLER__ guards 2019-03-21 12:31:25 +11:00
Anna Lyons
76267c410e Remove kernel_astyle.sh
Instead style.sh from seL4_tools should be used
2019-03-19 14:02:29 +11:00
Kent McLeod
0cc4997a16 cmake: add check_outfile_stale macro
This checks if a file is older than other files during CMake configure
phase. This is to prevent unnecessary long running execute_process
calls.
2019-03-12 08:55:05 +11:00
Kent McLeod
b7550ca830 hardware_gen.py: Write compat strings to file
This reduces chances of other parts of the script printing to stdout and
allows the compatibility strings file to be inspected or manually
changed for debugging purposes.
2019-03-12 08:55:05 +11:00
Adam Felizzi
e3c7e391c1 hardware_gen: Use logging.warning for import error
Updated YAML validation error message to use logging.warning,
forwarding the output to stderr. This would otherwise end up
in the CMake dts compatibility string.
2019-03-08 16:11:39 +11:00
Oliver Scott
96c63a4b55 serial-refactor: Fixed circular includes
Modify hardware_gen script to only include chosen
serial path. Added newlines to serial drivers to fix
concat issues when compiling. Move cmake macro RegisterDriver
 up a level to support timer refactor. Modify arm cmake to reflect
this.
2019-03-08 10:51:01 +11:00
Kent McLeod
2943f042a7 hardware_gen: Remove build path from output file
This was causing errors with a reproducible build check in the binary
verification toolchains.
2019-03-07 16:11:31 +11:00
Oliver Scott
34ce52e283 serial-refactor: Refactor kernel serial drivers
Have added a drivers/serial folder to kernel, where all serial drivers
will be kept. The point is to have the the dts parsed and generate cmake
to include the right uart.c file prefixed with the compatibility.
Have removed all io.c from plat and includes from plat/config.cmake and
updated CHANGES file.
2019-02-21 16:11:37 +11:00
Simon Shields
ca53350a71 hardware_gen: Add support for /reserved-memory node
Parse the /reserved-memory node per the Linux spec[1].
Ignore regions marked as 'no-map', but keep other regions
as they should be OK to use as RAM.

[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt?h=v5.0-rc6
2019-02-15 14:05:06 +11:00
Simon Shields
16d98d852f hardware_gen: use full node path in dictionaries
it's not guaranteed that node names will be globally unique,
so use the full path to the node instead.
2019-02-15 14:05:06 +11:00
Simon Shields
cbe6e4c651 hardware_gen: include linker.h in generated header
this is needed for the BOOT_RODATA attribute
2019-02-15 14:05:06 +11:00
Yanyan Shen
f7749ed54c dts: Add Arm FVP device tree file.
This file is based on foundation-v8-gicv3.dts.
2019-02-13 17:16:42 +11:00
Yanyan Shen
8f433d7dbc hardware_gen: Add GICv3 support. 2019-02-13 16:09:53 +11:00
Simon Shields
e9fc74b5a2 hardware_gen: support specifying size of kernel device
This allows for mapping of consecutive pages for a single device in the
kernel.
2019-02-13 11:13:05 +11:00
Simon Shields
21993d8bbc hardware_gen: generate kernel_devices
This change fixes support for instances where we have
multiple kernel devices in the same page, or kernel devices
which aren't at page-aligned addresses.

Also use seL4_UserTop to pick the right address to start
putting the kernel device pages.
2019-02-05 14:58:17 +11:00
Simon Shields
b45de78546 hardware_gen: use "ranges" property for cpu-addressable buses
This removes the need for the buses array in the hardware YAML
2019-02-05 12:14:28 +11:00
Simon Shields
d9b399ff27 hardware_gen: improve region-merging logic
Merge overlapping regions to ensure that we don't expose
the same paddr more than once.
2019-02-04 12:57:15 +11:00
Simon Shields
09e6fbb1c4 hardware_gen: don't merge regions that are conditional
If one region is conditional and another isn't, we shouldn't merge them.
This fixes a problem where some regions wouldn't be exposed to
userspace when they were merged with a conditional region which would
cause userspace apps to fail in unexpected ways.
2019-02-01 16:46:22 +11:00
Simon Shields
4269c70800 hardware_gen: simplify file handling logic
Argparse supports file arguments, use this for all files.
2019-01-31 11:44:42 +11:00