Browse Source

[bzImage] Support loading zImage kernels

zImage kernels require the real-mode portion to be loaded at 9000:0000
rather than 1000:0000.
tags/v0.9.4
Stefan Hajnoczi 16 years ago
parent
commit
ce51128534
1 changed files with 3 additions and 1 deletions
  1. 3
    1
      src/arch/i386/image/bzimage.c

+ 3
- 1
src/arch/i386/image/bzimage.c View File

@@ -414,7 +414,9 @@ static int bzimage_load_header ( struct image *image,
414 414
 	}
415 415
 
416 416
 	/* Calculate load address and size of real-mode portion */
417
-	load_ctx->rm_kernel_seg = 0x1000; /* place RM kernel at 1000:0000 */
417
+	load_ctx->rm_kernel_seg = ( ( bzhdr->loadflags & BZI_LOAD_HIGH ) ?
418
+				    0x1000 :  /* 1000:0000 (bzImage) */
419
+				    0x9000 ); /* 9000:0000 (zImage) */
418 420
 	load_ctx->rm_kernel = real_to_user ( load_ctx->rm_kernel_seg, 0 );
419 421
 	load_ctx->rm_filesz =
420 422
 		( ( bzhdr->setup_sects ? bzhdr->setup_sects : 4 ) + 1 ) << 9;

Loading…
Cancel
Save