Next: internals-protocols, Previous: internals-mm, Up: Internals
The kernel script is inlined in binary representation together with the gnufi kernel in the firmware image. It is up to the `gnufi-mkimage' utility to merge modules and build a kscript structure that the loader can later pass to the kernel.
In binary representation is a kernel script a list of TLV-records, in native endianess. Signature of the kscript generic header;
struct efi_kscript { efi_uint16_t type; efi_uint16_t subtype; efi_uint32_t offset; };
type specifies what kind of script record it is. The last entry
must be of type EFI_KSCRIPT_END_TYPE
. subtype is a type
specific. offset gives the number of bytes from this script
record to the next.
EFI_KSCRIPT_END_TYPE
EFI_KSCRIPT_LOAD_TYPE
struct efi_kscript_load { efi_kscript_t header; efi_uint32_t cmdline; efi_uint32_t size; efi_uint8_t data[0]; };
cmdline is an offset from the record to a NUL-terminated unicode
string. size is the length of the module data in bytes.
EFI_KSCRIPT_CONNECT_TYPE
struct efi_kscript_connect { efi_kscript_t header; efi_device_path_t path; };
EFI_KSCRIPT_SET_TYPE
struct efi_kscript_set { efi_kscript_t header; efi_device_path_t path; };
The subtype if the generic header specifies what variable is to be set. The following variables are available;