iPXE
initrd.h
Go to the documentation of this file.
1 #ifndef _INITRD_H
2 #define _INITRD_H
3 
4 /** @file
5  *
6  * Initial ramdisk (initrd) reshuffling
7  *
8  */
9 
10 FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
11 
12 #include <ipxe/uaccess.h>
13 
14 /** Minimum alignment for initrds
15  *
16  * Some versions of Linux complain about initrds that are not
17  * page-aligned.
18  */
19 #define INITRD_ALIGN 4096
20 
21 /** Minimum free space required to reshuffle initrds
22  *
23  * Chosen to avoid absurdly long reshuffling times
24  */
25 #define INITRD_MIN_FREE_LEN ( 512 * 1024 )
26 
27 extern void initrd_reshuffle ( userptr_t bottom );
28 extern int initrd_reshuffle_check ( size_t len, userptr_t bottom );
29 
30 #endif /* _INITRD_H */
static userptr_t bottom
Bottom of heap (current lowest allocated block)
Access to external ("user") memory.
int initrd_reshuffle_check(size_t len, userptr_t bottom)
Check that there is enough space to reshuffle initrds.
Definition: initrd.c:266
uint32_t len
Length.
Definition: ena.h:14
void initrd_reshuffle(userptr_t bottom)
Reshuffle initrds into desired order at top of memory.
Definition: initrd.c:229
FILE_LICENCE(GPL2_OR_LATER_OR_UBDL)
unsigned long userptr_t
A pointer to a user buffer.
Definition: uaccess.h:33