mirror of
https://github.com/ipxe/ipxe
synced 2025-12-12 23:15:10 +03:00
[initrd] Rename bzimage_align() to initrd_align()
Alignment of initrd lengths is applicable to all Linux kernels, not just those in the x86 bzImage format. Signed-off-by: Michael Brown <mcb30@ipxe.org>
This commit is contained in:
@@ -60,9 +60,6 @@ struct cpio_header {
|
||||
/** CPIO header length alignment */
|
||||
#define CPIO_ALIGN 4
|
||||
|
||||
/** Alignment for CPIO archives within an initrd */
|
||||
#define INITRD_ALIGN 4096
|
||||
|
||||
/**
|
||||
* Get CPIO image name
|
||||
*
|
||||
|
||||
@@ -14,4 +14,19 @@ FILE_LICENCE ( GPL2_OR_LATER_OR_UBDL );
|
||||
extern void initrd_reshuffle ( physaddr_t bottom );
|
||||
extern int initrd_reshuffle_check ( size_t len, physaddr_t bottom );
|
||||
|
||||
/** Initial ramdisk chunk alignment */
|
||||
#define INITRD_ALIGN 4096
|
||||
|
||||
/**
|
||||
* Align initrd length
|
||||
*
|
||||
* @v len Length
|
||||
* @ret len Aligned length
|
||||
*/
|
||||
static inline __attribute__ (( always_inline )) size_t
|
||||
initrd_align ( size_t len ) {
|
||||
|
||||
return ( ( len + INITRD_ALIGN - 1 ) & ~( INITRD_ALIGN - 1 ) );
|
||||
}
|
||||
|
||||
#endif /* _IPXE_INITRD_H */
|
||||
|
||||
Reference in New Issue
Block a user