@@ -429,6 +429,46 @@ static void __init parse_setup_data(void)
429
429
}
430
430
}
431
431
432
+ /*
433
+ * Translate the fields of 'struct boot_param' into global variables
434
+ * representing these parameters.
435
+ */
436
+ static void __init parse_boot_params (void )
437
+ {
438
+ ROOT_DEV = old_decode_dev (boot_params .hdr .root_dev );
439
+ screen_info = boot_params .screen_info ;
440
+ edid_info = boot_params .edid_info ;
441
+ #ifdef CONFIG_X86_32
442
+ apm_info .bios = boot_params .apm_bios_info ;
443
+ ist_info = boot_params .ist_info ;
444
+ #endif
445
+ saved_video_mode = boot_params .hdr .vid_mode ;
446
+ bootloader_type = boot_params .hdr .type_of_loader ;
447
+ if ((bootloader_type >> 4 ) == 0xe ) {
448
+ bootloader_type &= 0xf ;
449
+ bootloader_type |= (boot_params .hdr .ext_loader_type + 0x10 ) << 4 ;
450
+ }
451
+ bootloader_version = bootloader_type & 0xf ;
452
+ bootloader_version |= boot_params .hdr .ext_loader_ver << 4 ;
453
+
454
+ #ifdef CONFIG_BLK_DEV_RAM
455
+ rd_image_start = boot_params .hdr .ram_size & RAMDISK_IMAGE_START_MASK ;
456
+ #endif
457
+ #ifdef CONFIG_EFI
458
+ if (!strncmp ((char * )& boot_params .efi_info .efi_loader_signature ,
459
+ EFI32_LOADER_SIGNATURE , 4 )) {
460
+ set_bit (EFI_BOOT , & efi .flags );
461
+ } else if (!strncmp ((char * )& boot_params .efi_info .efi_loader_signature ,
462
+ EFI64_LOADER_SIGNATURE , 4 )) {
463
+ set_bit (EFI_BOOT , & efi .flags );
464
+ set_bit (EFI_64BIT , & efi .flags );
465
+ }
466
+ #endif
467
+
468
+ if (!boot_params .hdr .root_flags )
469
+ root_mountflags &= ~MS_RDONLY ;
470
+ }
471
+
432
472
static void __init memblock_x86_reserve_range_setup_data (void )
433
473
{
434
474
struct setup_indirect * indirect ;
@@ -806,35 +846,7 @@ void __init setup_arch(char **cmdline_p)
806
846
807
847
setup_olpc_ofw_pgd ();
808
848
809
- ROOT_DEV = old_decode_dev (boot_params .hdr .root_dev );
810
- screen_info = boot_params .screen_info ;
811
- edid_info = boot_params .edid_info ;
812
- #ifdef CONFIG_X86_32
813
- apm_info .bios = boot_params .apm_bios_info ;
814
- ist_info = boot_params .ist_info ;
815
- #endif
816
- saved_video_mode = boot_params .hdr .vid_mode ;
817
- bootloader_type = boot_params .hdr .type_of_loader ;
818
- if ((bootloader_type >> 4 ) == 0xe ) {
819
- bootloader_type &= 0xf ;
820
- bootloader_type |= (boot_params .hdr .ext_loader_type + 0x10 ) << 4 ;
821
- }
822
- bootloader_version = bootloader_type & 0xf ;
823
- bootloader_version |= boot_params .hdr .ext_loader_ver << 4 ;
824
-
825
- #ifdef CONFIG_BLK_DEV_RAM
826
- rd_image_start = boot_params .hdr .ram_size & RAMDISK_IMAGE_START_MASK ;
827
- #endif
828
- #ifdef CONFIG_EFI
829
- if (!strncmp ((char * )& boot_params .efi_info .efi_loader_signature ,
830
- EFI32_LOADER_SIGNATURE , 4 )) {
831
- set_bit (EFI_BOOT , & efi .flags );
832
- } else if (!strncmp ((char * )& boot_params .efi_info .efi_loader_signature ,
833
- EFI64_LOADER_SIGNATURE , 4 )) {
834
- set_bit (EFI_BOOT , & efi .flags );
835
- set_bit (EFI_64BIT , & efi .flags );
836
- }
837
- #endif
849
+ parse_boot_params ();
838
850
839
851
x86_init .oem .arch_setup ();
840
852
@@ -858,8 +870,6 @@ void __init setup_arch(char **cmdline_p)
858
870
859
871
copy_edd ();
860
872
861
- if (!boot_params .hdr .root_flags )
862
- root_mountflags &= ~MS_RDONLY ;
863
873
setup_initial_init_mm (_text , _etext , _edata , (void * )_brk_end );
864
874
865
875
/*
0 commit comments