Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Make hardware_gen.py support interrupt-multiplex #1514

@sevenautumns

Description

@sevenautumns

When we tried building seL4 for xilinx zynqmp we encountered an issue when building with the dts from Xilinx/system-device-tree-xlnx

seL4-aarch64-unknown-none-elf> -- Using custom /nix/store/1fs379in6jf4fqz8g6hcnj67789sbqc6-te0706-0821-3be21-linux-dt/system.dts.pp device tree, ignoring default dts and overlays
seL4-aarch64-unknown-none-elf> -- /build/source/build/gen_headers/plat/machine/devices_gen.h is out of date. Regenerating from DTB...
seL4-aarch64-unknown-none-elf> Traceback (most recent call last):
seL4-aarch64-unknown-none-elf>   File "/build/source/tools/hardware_gen.py", line 92, in <module>
seL4-aarch64-unknown-none-elf>     main(args)
seL4-aarch64-unknown-none-elf>   File "/build/source/tools/hardware_gen.py", line 62, in main
seL4-aarch64-unknown-none-elf>     OUTPUTS[t].run(parsed_dt, hw_yaml, cfg, args)
seL4-aarch64-unknown-none-elf>   File "/build/source/tools/hardware/outputs/c_header.py", line 216, in run
seL4-aarch64-unknown-none-elf>     kernel_regions, kernel_macros = get_kernel_devices(tree, hw_yaml)
seL4-aarch64-unknown-none-elf>                                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
seL4-aarch64-unknown-none-elf>   File "/build/source/tools/hardware/outputs/c_header.py", line 149, in get_kernel_devices
seL4-aarch64-unknown-none-elf>     dev_rule = hw_yaml.get_rule(dev)
seL4-aarch64-unknown-none-elf>                ^^^^^^^^^^^^^^^^^^^^^
seL4-aarch64-unknown-none-elf>   File "/build/source/tools/hardware/utils/rule.py", line 235, in get_rule
seL4-aarch64-unknown-none-elf>     raise ValueError('Failed to match compatibles "{}" for node {}!'.format(
seL4-aarch64-unknown-none-elf> ValueError: Failed to match compatibles "interrupt-multiplex" for node /axi/interrupt-multiplex!
seL4-aarch64-unknown-none-elf> CMake Error at config.cmake:218 (message):
seL4-aarch64-unknown-none-elf>   Failed to generate from DTB:
seL4-aarch64-unknown-none-elf>   /build/source/build/gen_headers/plat/machine/devices_gen.h
seL4-aarch64-unknown-none-elf> Call Stack (most recent call first):
seL4-aarch64-unknown-none-elf>   CMakeLists.txt:42 (include)
seL4-aarch64-unknown-none-elf>
seL4-aarch64-unknown-none-elf> -- Configuring incomplete, errors occurred!

Note that there is no issue when using xilinx vitis directly for generating the dts.
The issue very likely lies in the dts from vitis using the gic directly while the dts from Xilinx/system-device-tree-xlnx uses an interrupt-multiplexer whose compatible interrupt-multiplex is not recognized by hardware_gen.py

The dts which works: zynqmp-vitis.dts.txt
The dts which does not work: zynqmp-sdtx.dts.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions