Unverified Commit 6924f558 authored by openeuler-ci-bot's avatar openeuler-ci-bot Committed by Gitee
Browse files
parents c147f19e a5d647cb
Loading
Loading
Loading
Loading
+7 −6
Original line number Diff line number Diff line
@@ -446,7 +446,6 @@ void __init efi_init(void)
	efi_char16_t *c16;
	char vendor[100] = "unknown";
	int i = 0;
	void *tmp;

#ifdef CONFIG_X86_32
	if (boot_params.efi_info.efi_systab_hi ||
@@ -471,14 +470,16 @@ void __init efi_init(void)
	/*
	 * Show what we know for posterity
	 */
	c16 = tmp = early_memremap(efi.systab->fw_vendor, 2);
	c16 = early_memremap_ro(efi.systab->fw_vendor,
				sizeof(vendor) * sizeof(efi_char16_t));
	if (c16) {
		for (i = 0; i < sizeof(vendor) - 1 && *c16; ++i)
			vendor[i] = *c16++;
		for (i = 0; i < sizeof(vendor) - 1 && c16[i]; ++i)
			vendor[i] = c16[i];
		vendor[i] = '\0';
	} else
		early_memunmap(c16, sizeof(vendor) * sizeof(efi_char16_t));
	} else {
		pr_err("Could not map the firmware vendor!\n");
	early_memunmap(tmp, 2);
	}

	pr_info("EFI v%u.%.02u by %s\n",
		efi.systab->hdr.revision >> 16,