Skip to content

proto-rfc: replace ELF patching (setvar) with passing a 'microkit_bootinfo_t' structure #422

@midnightveil

Description

@midnightveil

Related: #411, #362, #248

Similar to how seL4_BootInfo_t works, we should pass a bootinfo structure in the $a0 register through to init(), which can contain physical and virtual addresses of various memory regions, populated by the capDL initialiser; instead of doing this at build time with ELF patching. This helps especially with x86, where paddr are often unknown at runtime.

void init(microkit_bootinfo_t *bi) {
  // etc
}

This structure could look something like:

typedef struct _microkit_bootinfo {
   paddr_t paddrs[...];
   vaddr_t vaddrs[...];
   void *preloaded_data_regions[...];
} microkit_bootinfo_t;

and have everything in the system description file have a numeric ID; or alternatively be a bit more wasteful of memory and pass e.g. an array of memory regions which contains the string-name, and id, the vaddr, possibly the paddr, etc. (essentially, serialising the SDF file).

This would also make it a bit easier for non-microkit users to re-use microkit PDs (e.g. Djawula), as this requires no runtime ELF-patching.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions