lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <tip-e3271c96ca7d01957b03b5f1e2bdc00e08fd7160@git.kernel.org>
Date:	Thu, 28 Apr 2016 03:39:11 -0700
From:	tip-bot for Ard Biesheuvel <tipbot@...or.com>
To:	linux-tip-commits@...r.kernel.org
Cc:	matt@...eblueprint.co.uk, pjones@...hat.com, bp@...en8.de,
	mingo@...nel.org, mark.rutland@....com,
	linux-kernel@...r.kernel.org, hpa@...or.com, dh.herrmann@...il.com,
	ard.biesheuvel@...aro.org, will.deacon@....com,
	peterz@...radead.org, tglx@...utronix.de
Subject: [tip:efi/core] efi/arm*: Wire up 'struct screen_info' to
 efi-framebuffer platform device

Commit-ID:  e3271c96ca7d01957b03b5f1e2bdc00e08fd7160
Gitweb:     http://git.kernel.org/tip/e3271c96ca7d01957b03b5f1e2bdc00e08fd7160
Author:     Ard Biesheuvel <ard.biesheuvel@...aro.org>
AuthorDate: Mon, 25 Apr 2016 21:06:55 +0100
Committer:  Ingo Molnar <mingo@...nel.org>
CommitDate: Thu, 28 Apr 2016 11:34:01 +0200

efi/arm*: Wire up 'struct screen_info' to efi-framebuffer platform device

This adds code to the ARM and arm64 EFI init routines to expose a platform
device of type 'efi-framebuffer' if 'struct screen_info' has been populated
appropriately from the GOP protocol by the stub. Since the framebuffer may
potentially be located in system RAM, make sure that the region is reserved
and marked MEMBLOCK_NOMAP.

Signed-off-by: Ard Biesheuvel <ard.biesheuvel@...aro.org>
Signed-off-by: Matt Fleming <matt@...eblueprint.co.uk>
Cc: Borislav Petkov <bp@...en8.de>
Cc: David Herrmann <dh.herrmann@...il.com>
Cc: Mark Rutland <mark.rutland@....com>
Cc: Peter Jones <pjones@...hat.com>
Cc: Peter Zijlstra <peterz@...radead.org>
Cc: Thomas Gleixner <tglx@...utronix.de>
Cc: Will Deacon <will.deacon@....com>
Cc: linux-efi@...r.kernel.org
Link: http://lkml.kernel.org/r/1461614832-17633-24-git-send-email-matt@codeblueprint.co.uk
Signed-off-by: Ingo Molnar <mingo@...nel.org>
---
 drivers/firmware/efi/arm-init.c | 18 ++++++++++++++++++
 1 file changed, 18 insertions(+)

diff --git a/drivers/firmware/efi/arm-init.c b/drivers/firmware/efi/arm-init.c
index ac95dd8..7a3318d 100644
--- a/drivers/firmware/efi/arm-init.c
+++ b/drivers/firmware/efi/arm-init.c
@@ -19,6 +19,7 @@
 #include <linux/mm_types.h>
 #include <linux/of.h>
 #include <linux/of_fdt.h>
+#include <linux/platform_device.h>
 #include <linux/screen_info.h>
 
 #include <asm/efi.h>
@@ -78,6 +79,10 @@ static void __init init_screen_info(void)
 		screen_info.orig_video_cols = 80;
 		screen_info.orig_video_lines = 25;
 	}
+
+	if (screen_info.orig_video_isVGA == VIDEO_TYPE_EFI &&
+	    memblock_is_map_memory(screen_info.lfb_base))
+		memblock_mark_nomap(screen_info.lfb_base, screen_info.lfb_size);
 }
 
 static int __init uefi_init(void)
@@ -256,3 +261,16 @@ void __init efi_init(void)
 
 	init_screen_info();
 }
+
+static int __init register_gop_device(void)
+{
+	void *pd;
+
+	if (screen_info.orig_video_isVGA != VIDEO_TYPE_EFI)
+		return 0;
+
+	pd = platform_device_register_data(NULL, "efi-framebuffer", 0,
+					   &screen_info, sizeof(screen_info));
+	return PTR_ERR_OR_ZERO(pd);
+}
+subsys_initcall(register_gop_device);

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ