Support Orin In Virtio-SCMI. - #108
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds Jetson Orin (“jeston-orin”) example configurations for VirtIO and Virtio-SCMI use-cases, and extends the zone configuration schema to carry UEFI-related address metadata needed by Orin boot flows. It also adjusts SCMI clock probing logic and tweaks tooling logging / repo ignores.
Changes:
- Extend
zone_configARM64 arch config with a UEFI payload and bumpCONFIG_MAGIC_VERSION. - Add Jetson Orin example JSON/DTS/Rust board configuration sets for VirtIO and Virtio-SCMI (RTC/MMC/GPU).
- Update SCMI server clock enumeration behavior and repository ignore patterns.
Reviewed changes
Copilot reviewed 18 out of 21 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| tools/log.c | Alters tool logging to print to stdout and changes syslog callsite. |
| tools/hvisor.c | Parses new optional UEFI fields from arch_config in zone JSON. |
| include/zone_config.h | Adds UEFI structs/unions to ARM64 arch_zone_config and bumps config magic. |
| examples/jeston/VirtIO/zone1_linux.json | New Orin VirtIO guest zone JSON example. |
| examples/jeston/VirtIO/virtio_cfg.json | New VirtIO device config example (blk/console). |
| examples/jeston/VirtIO/linux2.dts | New non-root guest DTS for VirtIO mmio devices. |
| examples/jeston/VirtIO/linux1.dts | New root DTS including UEFI chosen properties and hvisor node. |
| examples/jeston/VirtIO/board.rs | New board constants/config for Orin VirtIO scenario (includes UEFI config). |
| examples/jeston/SCMI/virtio_cfg.json | New Virtio-SCMI + blk + console device config example. |
| examples/jeston/SCMI/RTC/zone1_rtc.json | New Orin SCMI RTC guest zone JSON example. |
| examples/jeston/SCMI/RTC/linux_rtc.dts | New guest DTS for SCMI + RTC passthrough scenario. |
| examples/jeston/SCMI/MMC/zone1_mmc.json | New Orin SCMI MMC guest zone JSON example. |
| examples/jeston/SCMI/MMC/linux_mmc.dts | New guest DTS for SCMI + MMC scenario. |
| examples/jeston/SCMI/linux1.dts | New root DTS for Orin SCMI scenario (includes UEFI chosen properties). |
| examples/jeston/SCMI/GPU/zone1_gpu.json | New Orin SCMI GPU guest zone JSON example. |
| examples/jeston/SCMI/GPU/linux_gpu.dts | New guest DTS for SCMI + GPU nodes scenario. |
| examples/jeston/SCMI/board.rs | New board constants/config for Orin SCMI scenario (separate UEFI config struct). |
| driver/scmi_server.c | Adds probe limit and additional logging for SCMI clock counting. |
| .gitignore | Ignores an example ext4 rootfs artifact under examples/jeston/. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| printf("%s:%d: %s\n", file, line, buf); | ||
| syslog(syslog_levels[level], "%s:%d: %s", file, line, buf); |
| } | ||
| if (memory_map_addr_json == NULL) { | ||
| arch_config->uefi_config.no_uefi_tag = 1; | ||
| log_info("No Uefi —— This is a normal phenomenon. Currently, hvisor nonroot only supports legacy.\n"); |
| if (IS_ERR(clk)) { | ||
| if (PTR_ERR(clk) == -EINVAL) | ||
| long err = PTR_ERR(clk); | ||
| pr_warn("get_clock_count: clock id %d returned %ld\n", count, err); | ||
| if (err == -EINVAL) | ||
| break; // idx >= provider->data->clk_num, which means no more |
| pr_warn("get_clock_count: begin\n"); | ||
| provider_np = get_clock_provider_node(); | ||
| if (!provider_np) { | ||
| pr_warn("get_clock_count: no clock provider node\n"); | ||
| return -ENODEV; | ||
| } | ||
| pr_warn("get_clock_count: provider node found, phandle=%u\n", | ||
| clock_provider_phandle); | ||
|
|
||
| while (1) { | ||
| while (count < max_probe_count) { | ||
| clk = get_clock_by_id(count, provider_np); | ||
|
|
||
| if (IS_ERR(clk)) { | ||
| if (PTR_ERR(clk) == -EINVAL) | ||
| long err = PTR_ERR(clk); | ||
| pr_warn("get_clock_count: clock id %d returned %ld\n", count, err); | ||
| if (err == -EINVAL) |
b85be47 to
958a0cb
Compare
54f8c6c to
e96140c
Compare
There was a problem hiding this comment.
Image and initrd are binary files and are not currently included in this repository. Would you consider adding them here, or do you think they should be kept elsewhere (e.g., with build instructions placed in hvisor-book)?
| printf("%s:%d: %s\n", file, line, buf); | ||
| syslog(syslog_levels[level], "%s:%d: %s", file, line, buf); |
There was a problem hiding this comment.
Nice catch on adding the final newline. On the other hand, I’d question whether rootfs should be listed in .gitignore. Would you mind revisiting that entry?
| } | ||
| if (memory_map_addr_json == NULL) { | ||
| arch_config->uefi_config.no_uefi_tag = 1; | ||
| log_info("No Uefi —— This is a normal phenomenon. Currently, hvisor " |
There was a problem hiding this comment.
There are non-ASCII symbols in the log. Shall we remove it?
There was a problem hiding this comment.
Just a thought: do you think it is worth extracting the UEFI config parsing into its own helper (like parse_pci_config)? No strong opinion here - happy to keep it as is if you prefer.
There was a problem hiding this comment.
Would it make sense to move all the configuration files to hvisor/platform instead of keeping them in hvisor-tool?
No description provided.