struct startup_info_mem and startup_info_mem_extended

These structures contain an address and size pair defining a chunk of memory that should be added to procnto's free memory pool.

The startup_info_mem structure is defined as follows:

struct startup_info_mem {
    struct startup_info_hdr     hdr;
    unsigned long               addr;
    unsigned long               size;

The addr and size fields are 32 bits long, so memory is limited to 4 GB. For larger memory blocks, the startup_info_mem_extended structure is used:

struct startup_info_mem_extended {
    struct startup_info_mem     mem;
    unsigned long               addr_hi;
    unsigned long               size_hi;

For the extended structure, determine the address and size from the addr_hi and size_hi members and the encapsulated startup_info_mem structure as follows:

((paddr64_t) addr_hi << 32) | mem.addr
((paddr64_t) size_hi << 32) | mem.size

More than one startup_info_mem or startup_info_mem_extended structure may be present to accommodate systems that have free memory located in various blocks throughout the address space.

Note: Both these structures are indentified by a type member of STARTUP_INFO_MEM in the startup_info_hdr structure; use the size field in the header to tell them apart.