size_t rm_heap;
/** Command line (offset from rm_kernel) */
size_t rm_cmdline;
+ /** Command line maximum length */
+ size_t cmdline_size;
/** Video mode */
unsigned int vid_mode;
/** Memory limit */
/* Copy command line down to real-mode portion */
cmdline_len = ( strlen ( cmdline ) + 1 );
- if ( cmdline_len > BZI_CMDLINE_SIZE )
- cmdline_len = BZI_CMDLINE_SIZE;
+ if ( cmdline_len > exec_ctx->cmdline_size )
+ cmdline_len = exec_ctx->cmdline_size;
copy_to_user ( exec_ctx->rm_kernel, exec_ctx->rm_cmdline,
cmdline, cmdline_len );
DBGC ( image, "bzImage %p command line \"%s\"\n", image, cmdline );
} else {
exec_ctx.mem_limit = BZI_INITRD_MAX;
}
+ if ( bzhdr.version >= 0x0206 ) {
+ exec_ctx.cmdline_size = bzhdr.cmdline_size;
+ } else {
+ exec_ctx.cmdline_size = BZI_CMDLINE_SIZE;
+ }
+ DBG ( "cmdline_size = %zd\n", exec_ctx.cmdline_size );
/* Parse command line for bootloader parameters */
if ( ( rc = bzimage_parse_cmdline ( image, &exec_ctx, cmdline ) ) != 0)
uint32_t cmd_line_ptr;
/** Highest legal initrd address */
uint32_t initrd_addr_max;
+ /** Physical addr alignment required for kernel */
+ uint32_t kernel_alignment;
+ /** Whether kernel is relocatable or not */
+ uint8_t relocatable_kernel;
+ /** Unused */
+ uint8_t pad2[3];
+ /** Maximum size of the kernel command line */
+ uint32_t cmdline_size;
} __attribute__ (( packed ));
/** Offset of bzImage header within kernel image */