Xous arguments are automatically generated by [tools/src/bin/create-image.rs](https://github.com/betrusted-io/xous-core/blob/master/tools/src/bin/create-image.rs). Most
Xous arguments are passed by giving a page-aligned address pointed to
by register `$a0`. This uses IFF-style tags with the following format:
```rust
struct Tag {
/// Ascii-printable name, not null-terminated, in little endian format.
tag: u32,
/// CRC16 of the data section, using CCITT polynomial.
crc16: u16,
/// Size of the data section, in 4-byte words.
size: u16,
}
```
The size is in little endian byte order, and does not include the 8
bytes describing the tag type or the size. The data must be padded to
4-bytes, so the `size` field is in 4-byte words. That is, a tag with
four bytes of contents would have a `size` of `1`.
The `XArg` block **must** be first.
## Tag Types
| Tag | Description
| ---- | ------------
| XArg | Xous Args. This indicates the size of the entire block (including the XArg tag and size), as well as the user RAM area, and can be used to determine how many pages to save for this block. This must be the first argument.
| BFlg | Bootloader config flags.
| MREx | Extra memory ranges. This is a series of offset/size pairs indicating additional memory regions in the system beyond RAM, as well as a code name for the memory page. It does not include system RAM.
| XKrn | Kernel source specification. Includes the offset of the kernel in RAM as well as its size. Does not need to be page-aligned, unless NO_COPY is 1.
| IniE | Initial program specification, based on a degenerate ELF header. This includes the load offset of the binary, as well as the size of each section. Does not need to be page-aligned unless NO_COPY is 1. May appear more than once, for each of the initial processes.
| IniF | Same as IniE, except laid out on disk such that the sub-page address offsets correspond 1:1 with the virtual memory representation, allowing an execute in place (XIP) mapping of code into the virtual memory space.