-
Notifications
You must be signed in to change notification settings - Fork 1k
Open
Description
Feature Request: Add --dtb-discovery flag for direct DTB device discovery
Description
I'd like to propose adding a --dtb-discovery flag that enables direct device discovery from the device tree blob (DTB), allowing Spike to automatically instantiate devices defined in the DTB without requiring individual --device flags for each instance.
Motivation
Currently, when working with multiple instances of the same device type or with a relevant number of devices in general, each instance must be specified separately via --device flags:
spike --device=counter,0x30000000,0x1000 \
--device=counter,0x30001000,0x1000 \
--device=counter,0x30002000,0x1000 \
...This becomes cumbersome with many devices. A DTB-based approach would be IMHO cleaner:
counter@30000000 {
compatible = "counter";
reg = <0x0 0x30000000 0x0 0x1000>;
spike,plugin-params = "0x30000000,0x1000";
};
counter@30001000 {
compatible = "counter";
reg = <0x0 0x30001000 0x0 0x1000>;
spike,plugin-params = "0x30001000,0x1000";
};
spike --dtb=system.dtb --dtb-direct fw_payload.elfProposed Behavior
--dtb-direct: Enable direct device discovery from DTB- Requires
--dtbto be specified - Incompatible with
--device(conflicting specification methods) - Spike would scan the DTB and instantiate devices based on their
compatibleproperties - Custom plugin parameters can be passed via
spike_plugin_paramsproperty in the device tree node, which would be parsed and passed to the plugin's initialization function
Questions
- Does this feature make sense for Spike's architecture?
- Are there any concerns or edge cases I'm missing?
- If this seems reasonable, I'd be happy to work on implementing it and submit a PR
Thank you for considering this request!
Metadata
Metadata
Assignees
Labels
No labels