aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/boot/compressed/eboot.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/x86/boot/compressed/eboot.c')
-rw-r--r--arch/x86/boot/compressed/eboot.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/arch/x86/boot/compressed/eboot.c b/arch/x86/boot/compressed/eboot.c
index 0cdfc0d2315e..2c14e76bb4c7 100644
--- a/arch/x86/boot/compressed/eboot.c
+++ b/arch/x86/boot/compressed/eboot.c
@@ -904,11 +904,19 @@ struct boot_params *efi_main(void *handle, efi_system_table_t *_table)
904 904
905 memset(boot_params, 0x0, 0x4000); 905 memset(boot_params, 0x0, 0x4000);
906 906
907 /* Copy first two sectors to boot_params */
908 memcpy(boot_params, image->image_base, 1024);
909
910 hdr = &boot_params->hdr; 907 hdr = &boot_params->hdr;
911 908
909 /* Copy the second sector to boot_params */
910 memcpy(&hdr->jump, image->image_base + 512, 512);
911
912 /*
913 * Fill out some of the header fields ourselves because the
914 * EFI firmware loader doesn't load the first sector.
915 */
916 hdr->root_flags = 1;
917 hdr->vid_mode = 0xffff;
918 hdr->boot_flag = 0xAA55;
919
912 /* 920 /*
913 * The EFI firmware loader could have placed the kernel image 921 * The EFI firmware loader could have placed the kernel image
914 * anywhere in memory, but the kernel has various restrictions 922 * anywhere in memory, but the kernel has various restrictions