
On Oct 4, 2007, at 8:52 AM, Haavard Skinnemoen wrote:
On Wed, 3 Oct 2007 12:01:28 +0200 Rafal Jaworowski raj@semihalf.com wrote:
This patchset attempts to implement an API for external applications, where the existing jumptable mechanism is too simplified. We needed a more robust and generic interface to access U-Boot resources for FreeBSD loader and came up with this approach.
Since nobody else has asked yet: Why? Can't you just pass the parameters you need through a boot protocol like everyone else does?
It's not just passing of parameters. It's an interface to expose services to code ran under U-Boot. Those services include console functionality, networking, etc.
The reason for a separate API is that both the global data structure as well as the jump table are heavily dependent on how U-Boot is configured. This is made worse (from a stable API point of view) by having the jump table at the end of the global data. So, besides principle argument that there's no separation that way, you would also need to "configure" the application in the same way you configure U-Boot in order for that application to use the internals of U-Boot. This is not useful.
A stable API, optionally added to U-Boot, allows any code to run under U-Boot without having that code worry about the detailed differences of the hardware and thus U-Boot and as such provides the same basic functionality a firmware would typically do.
FYI,