iPXE
|
Initial ramdisk (initrd) reshuffling. More...
#include <ipxe/uaccess.h>
Go to the source code of this file.
Macros | |
#define | INITRD_MIN_FREE_LEN ( 512 * 1024 ) |
Minimum free space required to reshuffle initrds. More... | |
Functions | |
FILE_LICENCE (GPL2_OR_LATER_OR_UBDL) | |
void | initrd_reshuffle (userptr_t bottom) |
Reshuffle initrds into desired order at top of memory. More... | |
int | initrd_reshuffle_check (size_t len, userptr_t bottom) |
Check that there is enough space to reshuffle initrds. More... | |
Initial ramdisk (initrd) reshuffling.
Definition in file initrd.h.
#define INITRD_MIN_FREE_LEN ( 512 * 1024 ) |
FILE_LICENCE | ( | GPL2_OR_LATER_OR_UBDL | ) |
void initrd_reshuffle | ( | userptr_t | bottom | ) |
Reshuffle initrds into desired order at top of memory.
bottom | Lowest address available for initrds |
After this function returns, the initrds have been rearranged in memory and the external heap structures will have been corrupted. Reshuffling must therefore take place immediately prior to jumping to the loaded OS kernel; no further execution within iPXE is permitted.
Definition at line 230 of file initrd.c.
References bottom, DBGC, free, images, initrd_bottom, initrd_dump(), initrd_squash_high(), initrd_swap_any(), initrd_top, top, user_to_phys(), and userptr_sub().
Referenced by bzimage_load_initrds().
Check that there is enough space to reshuffle initrds.
len | Total length of initrds (including padding) |
bottom | Lowest address available for initrds |
rc | Return status code |
Definition at line 267 of file initrd.c.
References bottom, ENOBUFS, initrd_bottom, INITRD_MIN_FREE_LEN, initrd_top, len, top, and userptr_sub().
Referenced by bzimage_check_initrds().