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]
Date:	Sat, 16 Apr 2016 11:37:20 +0530
From:	Vineet Gupta <Vineet.Gupta1@...opsys.com>
To:	Alexey Brodkin <Alexey.Brodkin@...opsys.com>,
	"dri-devel@...ts.freedesktop.org" <dri-devel@...ts.freedesktop.org>
CC:	"daniel@...ll.ch" <daniel@...ll.ch>,
	"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
	"linux-snps-arc@...ts.infradead.org" 
	<linux-snps-arc@...ts.infradead.org>,
	"airlied@...ux.ie" <airlied@...ux.ie>,
	"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	Rob Herring <robh@...nel.org>
Subject: Re: Allocation of frame buffer at a specific memory range or address

On Friday 15 April 2016 09:18 PM, Alexey Brodkin wrote:

> And now the question is how to force DRM subsystem or just that driver
> to use whatever predefined (say via device tree) location in memory
> for data buffer allocation.

It seems this is pretty easy to do with DT reserved-memory binding.

You need to partition memory into @memory and @reserved-memory.
Later can be subdivided into more granular regions and your driver can refer to
one of the regions.

Something like below (untested)

+	memory {
+		device_type = "memory";
+		reg = <0x0 0x80000000 0x0 0xA0000000>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+		/* This memory bypasses IOC port */
+		fb_reserved@...00000 {
+			reg = <0x0 0xA0000000 0x0 0xAF000000>;
+			#address-cells = <2>;
+			#size-cells = <2>;
+			/* no-map;   */
+		};
+	};
+
+
+	fb0: video@...00000 {
+		memory-region = <&fb_reserved>;
+		/* ... */
+	};

This might also need a DT helper in ARC mm init code.

+	early_init_fdt_scan_reserved_mem();

HTH,
-Vineet

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ