Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

openhcl: report bootloader log via device tree when configured #719

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

chris-oo
Copy link
Member

@chris-oo chris-oo commented Jan 24, 2025

At times, it can be annoying to configure com3 or the right logging channel. Add a mechanism for the bootshim to report logs to usermode via device tree.

Today, this is viewable via inspect, but the output isn't the prettiest:

openvmm> x -v vm/runtime_params/parsed_openhcl_boot/
{
    accepted_ranges: _,
    boot_log: "openhcl_boot: early debugging enabled\nreclaim device tree memory 1ef5b814000-1ef5b854000\nopenhcl_boot: entered shim_main\n",
...
}

Obviously this doesn't work when we don't actually make it to usermode.

#710

@chris-oo chris-oo requested a review from a team as a code owner January 24, 2025 00:09
@daprilik
Copy link
Contributor

talked about this offline a bit - my gut feeling is that stuffing these logs into the DT directly as a string node seems highly unorthadox. A far more natural representation, albeit requiring a bit more work, would be to report a pointer to the page(s) that contain the bootloader logs, which we can then read

@smalis-msft
Copy link
Contributor

It feels a little weird to me too to be stuffing information that isn't really related to devices/configuration into device tree like this. Is there nowhere else we could stash it?

@jstarks
Copy link
Member

jstarks commented Jan 24, 2025

I think Daniel's right. It's reasonable to report the memory range for the log via devicetree--that's what it's for, to report the VM's topology.

I don't think it's terrible to put the strings in here directly, but it is unorthodox, and it could create pressure on the max size of the dtb if the log gets big.

@chris-oo
Copy link
Member Author

I think i'll revisit this with a different approach - have dtb describe a log buffer region that the bootloader has used.

@chris-oo chris-oo marked this pull request as draft January 27, 2025 22:59
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.

4 participants