Skip to content

Chosen: convey kernel info inside chosen node#15

Open
jongwu wants to merge 1 commit intorepnop:masterfrom
jongwu:chosen
Open

Chosen: convey kernel info inside chosen node#15
jongwu wants to merge 1 commit intorepnop:masterfrom
jongwu:chosen

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 <jianyong.wu@arm.com>
@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