On Mon, Sep 30, 2013 at 08:05:59AM -0700, Roy Franz wrote:
I was thinking that the stub would want to use the FDT passed by grub if one is passed, but I hadn't thought about the case where grub wants to pass information to the stub, but the stub still loads the FDT. The easiest thing would be to straight out say that if GRUB is loading the initrd, then it is mandatory for GRUB to also load the FDT. That eliminates the corner case and I can't think of any situation where we'd want GRUB loading the initrd, but use the stub to load the FDT.
I'd also like to avoid having the stub merge FDT contents from different trees.
If we add this table, then it seems this would be the right way to handle passing the FDT to the EFI stub, even without GRUB involved. Is there a reason not to move to this method in general?
Not really. So ... I guess that would modify the stub behaviour to: - Look for an FDT_GUID configuration table. - If there, use it. - If not there, require one to be loaded based on command line.
And the GRUB behaviour to: - If no FDT_GUID, require FDT if initrd. - If FDT_GUID, copy FDT + add initrd information.
The x86 code uses bootparam to pass the kernel command line. Could we use the FDT exists) for the kernel command line too? This would make more code shared between x86 and ARM*, since otherwise we would need to explicitly implement (UCS?) command line passing to stub?
Note that current code does not use CALL_IMAGE, it simply loads the kernel into memory and jumps to it (passing it GRUB image handle and System Table pointer).
Alternatively, we could define a special protocol for passing additional parameters to the stubbed kernel ... or a special protocol to pass a special FDT but I'm not sure we want yet another interface.
Indeed. I definitely don't want to do this.
Agreed...
I'm glad :)
/ Leif