Merge tag 'efi-next-for-v6.1' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
[platform/kernel/linux-rpi.git] / arch / loongarch / kernel / setup.c
index d97c69d..6ca5a0d 100644 (file)
 #define SMBIOS_CORE_PACKAGE_OFFSET     0x23
 #define LOONGSON_EFI_ENABLE            (1 << 3)
 
-#ifdef CONFIG_VT
-struct screen_info screen_info;
-#endif
+struct screen_info screen_info __section(".data");
 
-unsigned long fw_arg0, fw_arg1;
+unsigned long fw_arg0, fw_arg1, fw_arg2;
 DEFINE_PER_CPU(unsigned long, kernelsp);
 struct cpuinfo_loongarch cpu_data[NR_CPUS] __read_mostly;
 
@@ -122,16 +120,9 @@ static void __init parse_cpu_table(const struct dmi_header *dm)
 
 static void __init parse_bios_table(const struct dmi_header *dm)
 {
-       int bios_extern;
        char *dmi_data = (char *)dm;
 
-       bios_extern = *(dmi_data + SMBIOS_BIOSEXTERN_OFFSET);
        b_info.bios_size = (*(dmi_data + SMBIOS_BIOSSIZE_OFFSET) + 1) << 6;
-
-       if (bios_extern & LOONGSON_EFI_ENABLE)
-               set_bit(EFI_BOOT, &efi.flags);
-       else
-               clear_bit(EFI_BOOT, &efi.flags);
 }
 
 static void __init find_tokens(const struct dmi_header *dm, void *dummy)
@@ -196,7 +187,6 @@ early_param("mem", early_parse_mem);
 
 void __init platform_init(void)
 {
-       efi_init();
 #ifdef CONFIG_ACPI_TABLE_UPGRADE
        acpi_table_upgrade();
 #endif
@@ -356,6 +346,7 @@ void __init setup_arch(char **cmdline_p)
        *cmdline_p = boot_command_line;
 
        init_environ();
+       efi_init();
        memblock_init();
        parse_early_param();