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

Chosen: convey kernel info inside chosen node #15

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

jongwu
Copy link

@jongwu jongwu commented Nov 22, 2023

Direct kernel boot based on UEFI is that UEFI bypass bootloader and load kernel image directly. That's important in some secure container senario. To achieve this, VMM must pass kernel info to UEFI, typically through FDT. However, there is no description for FDT to convey kernel info. But initramfs gives us a hint to put these info inside Chosen node. That's what this patch does.

Direct kernel boot based on UEFI is that UEFI bypass bootloader and load
kernel image directly. That's important in some secure container
senario. To achieve this, VMM must pass kernel info to UEFI, typically
through FDT. However, there is no description for FDT to convey kernel
info. But initramfs gives us a hint to put these info inside Chosen node.
That's what this patch does.

Signed-off-by: Jianyong Wu <[email protected]>
@repnop
Copy link
Owner

repnop commented Nov 22, 2023

Hi, thanks for expanding more on what your request is. This information can actually already be obtained by using fdt.find_node("/chosen") and extracting the properties as you would any other — I'm a bit hesitant to add platform/OS specific node to this library since its difficult for me to maintain not having much of a reference point for it and not being able to keep up with changes. Do you know how common this property is, and if there's documentation for reference? I don't believe I've seen it on any of the devicetree files I've looked at for testing.

@jongwu
Copy link
Author

jongwu commented Nov 23, 2023

Hi, thanks for expanding more on what your request is. This information can actually already be obtained by using fdt.find_node("/chosen") and extracting the properties as you would any other

Yes, It works! Thanks.

— I'm a bit hesitant to add platform/OS specific node to this library since its difficult for me to maintain not having much of a reference point for it and not being able to keep up with changes. Do you know how common this property is, and if there's documentation for reference? I don't believe I've seen it on any of the devicetree files I've looked at for testing.

I have never saw any doc about describing something releated with kernel image inside FDT. These kernel image information is important for direct kernel boot based on UEFI in virtualization. But this is only in my case. I have not saw other implementation about this except Qemu which use FWCFG to store kernel info. I choose FDT as it's a more common way to do these things. I hope there will be spec about this in the future. Maybe we can be the first to eat crab. 😄

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.

2 participants