Re: [Etherboot-developers] ELF Parameter Passing....
Brought to you by:
marty_connor,
stefanhajnoczi
|
From: <ebi...@ln...> - 2002-11-21 09:51:39
|
ke...@us... (Ken Yap) writes: > >Roughly this is what I have proposed before for a standard except for > >using the C calling conventions. > > > >If there is a better proposal, or something more standard (say what > >the open firmware platforms are doing) I am still open to discussion. > >But if I don't hear anything this is what I will implement. > > Looks ok to me. Will it also work for environment variables? Linux > doesn't use them but other OSes might (think *BSD does). A bunch of > key/value pairs is all it needs. Basically I am passing a vector of ELF notes which have the form. n_name "string" (of the allocating authority "etherboot" for example) n_type number of whichever parameter we are passing. n_desc arbitrary binary data. So I suspect initially I will pass: #define EB_LOADER_INFO 1 #define EB_HEADER 2 #define EB_BOOTP_DATA_ADDR 3 n_name = "etherboot" n_type = EB_LOADER_INFO n_desc = &loadinfo (or perhaps the contents) n_name = "etherboot" n_type = EB_HEADER n_desc = address of the elf header. n_name = "etherboot" n_type = EB_BOOTP_DATA_ADDR n_desc = BOOP_DATA_ADDR Adding another parameter for to hold an environment, or to point at one should be fairly straight forward. I am going to aim at a couple of types like command line, bootloader, bootloader_version, to be universal. But for the most part the bootloader gets to pass what it wants, with no one interfering. Essentially this is an implementation of passing parameters by name instead of just by position. Eric |