|
@@ -343,6 +343,11 @@ static int bzimage_exec ( struct image *image ) {
|
343
|
343
|
/* Prepare for exiting */
|
344
|
344
|
shutdown();
|
345
|
345
|
|
|
346
|
+ DBGC ( image, "bzImage %p jumping to RM kernel at %04x:0000 "
|
|
347
|
+ "(stack %04x:%04x)\n", image,
|
|
348
|
+ ( exec_ctx.rm_kernel_seg + 0x20 ),
|
|
349
|
+ exec_ctx.rm_kernel_seg, exec_ctx.rm_heap );
|
|
350
|
+
|
346
|
351
|
/* Jump to the kernel */
|
347
|
352
|
__asm__ __volatile__ ( REAL_CODE ( "movw %w0, %%ds\n\t"
|
348
|
353
|
"movw %w0, %%es\n\t"
|
|
@@ -403,8 +408,9 @@ static int bzimage_load_header ( struct image *image,
|
403
|
408
|
/* Calculate load address and size of real-mode portion */
|
404
|
409
|
load_ctx->rm_kernel_seg = 0x1000; /* place RM kernel at 1000:0000 */
|
405
|
410
|
load_ctx->rm_kernel = real_to_user ( load_ctx->rm_kernel_seg, 0 );
|
406
|
|
- load_ctx->rm_filesz = load_ctx->rm_memsz =
|
|
411
|
+ load_ctx->rm_filesz =
|
407
|
412
|
( ( bzhdr->setup_sects ? bzhdr->setup_sects : 4 ) + 1 ) << 9;
|
|
413
|
+ load_ctx->rm_memsz = BZI_ASSUMED_RM_SIZE;
|
408
|
414
|
if ( load_ctx->rm_filesz > image->len ) {
|
409
|
415
|
DBGC ( image, "bzImage %p too short for %zd byte of setup\n",
|
410
|
416
|
image, load_ctx->rm_filesz );
|