Skip to content

Support Orin In Virtio-SCMI. - #108

Open
ForeverYolo wants to merge 7 commits into
mainfrom
feat-virtio-scmi
Open

Support Orin In Virtio-SCMI.#108
ForeverYolo wants to merge 7 commits into
mainfrom
feat-virtio-scmi

Conversation

@ForeverYolo

Copy link
Copy Markdown
Contributor

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_config ARM64 arch config with a UEFI payload and bump CONFIG_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.

Comment thread tools/log.c
Comment on lines +68 to +69
printf("%s:%d: %s\n", file, line, buf);
syslog(syslog_levels[level], "%s:%d: %s", file, line, buf);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Comment thread tools/hvisor.c Outdated
Comment thread tools/hvisor.c Outdated
}
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");
Comment thread driver/scmi_server.c
Comment on lines 69 to 73
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
Comment thread driver/scmi_server.c
Comment on lines +57 to +72
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)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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)?

Comment thread tools/log.c
Comment on lines +68 to +69
printf("%s:%d: %s\n", file, line, buf);
syslog(syslog_levels[level], "%s:%d: %s", file, line, buf);

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this change necessary?

Comment thread .gitignore

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Comment thread tools/hvisor.c
}
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 "

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There are non-ASCII symbols in the log. Shall we remove it?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to move all the configuration files to hvisor/platform instead of keeping them in hvisor-tool?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants