Upon process entry, the kernel provides the following resources mapped into the init address space:
- The
boot_infostructure. - The
initrd(tarball archive). - A single page-sized (4096 bytes) bootstrap stack.
All kernel-provided data shall reside at the high end of the userspace virtual address range (the "Top of the Lower Half").
- Growth Direction: Data blocks are placed contiguously, starting from the highest available canonical address (e.g.,
0x00007FFFFFFFF000) and growing downwards. - Bootstrap Stack: The one-page initial stack is placed as the final (lowest address) item in this kernel-provided data block.
- Allocation Boundary: The lowest address of the bootstrap stack serves as the Stack Limit. The
initprogram can rely on this address as the hard upper bound for its own self-allocated "real" stack.
- RSP/SP: Shall point to the top of the bootstrap stack.
- RDI/X0: Shall contain the virtual address of the
boot_infostructure. - Alignment: The initial stack pointer must be 16-byte aligned to satisfy the SysV ABI before the first function call.