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 for Android: free password hash cracker in your pocket
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue,  9 Jun 2015 17:58:25 +0300
From:	Andrew Andrianov <andrew@...mnt.org>
To:	Sudip Mukherjee <sudipm.mukherjee@...il.com>
Cc:	Andrew Andrianov <andrew@...mnt.org>, pebolle@...cali.nl,
	Arve Hj�nnev�g <arve@...roid.com>,
	Riley Andrews <riandrews@...roid.com>,
	Chen Gang <gang.chen.5i5j@...il.com>,
	Fabian Frederick <fabf@...net.be>,
	Android Kernel Team <kernel-team@...roid.com>,
	linux-kernel@...r.kernel.org,
	Greg Kroah-Hartman <gregkh@...uxfoundation.org>
Subject: [PATCH v4 2/2] staging: ion: Add ion-physmem documentation

Signed-off-by: Andrew Andrianov <andrew@...mnt.org>
---
 Documentation/devicetree/bindings/ion,physmem.txt | 98 +++++++++++++++++++++++
 1 file changed, 98 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/ion,physmem.txt

diff --git a/Documentation/devicetree/bindings/ion,physmem.txt b/Documentation/devicetree/bindings/ion,physmem.txt
new file mode 100644
index 0000000..e8c64dd
--- /dev/null
+++ b/Documentation/devicetree/bindings/ion,physmem.txt
@@ -0,0 +1,98 @@
+ION PhysMem Driver
+#include <dt-bindings/ion,physmem.h>
+
+
+ION PhysMem is a generic driver for ION Memory Manager that allows you to
+define ION Memory Manager heaps using device tree. This is mostly useful if
+your SoC has several 'special' regions (e.g. SRAM, dedicated memory banks,
+etc) that are present in the physical memory map and you want to add them to
+ION as heaps of memory.
+
+
+Examples:
+
+1. 256KiB On-chip SRAM used as ION DMA heap. reg range is treated as a physical
+   address range
+
+	ion_im0: ion@...0100000 {
+	     compatible = "ion,physmem";
+	     reg = <0x00100000 0x40000>;
+	     reg-names = "memory";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_DMA>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "IM0";
+	};
+
+2. The same, but using system DMA memory.
+
+	ion_dma: ion@...eadbeef {
+	     compatible = "ion,physmem";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_DMA>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "SYSDMA";
+	};
+
+3. Carveout heap, 1MiB size, ion-physmem will alloc pages for it using
+   alloc_pages_exact(). reg range is used for specifying size only.
+
+		ion_crv: ion@...dbeef {
+		     compatible = "ion,physmem";
+		     reg = <0x00000000 0x100000>;
+		     reg-names = "memory";
+		     ion-heap-id   = <3>;
+		     ion-heap-type = <ION_HEAP_TYPE_CARVEOUT>;
+		     ion-heap-align = <0x10>;
+		     ion-heap-name = "carveout";
+		};
+
+4. Chunk heap. 1MiB size, ion-physmem will alloc pages for it using
+   alloc_pages_exact(). reg range is used for specifying size only.
+
+	ion_chunk: ion@...eadbeef {
+	     compatible = "ion,physmem";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_CHUNK>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "chunky";
+	};
+
+
+5. vmalloc();
+
+	ion_chunk: ion@...eadbeef {
+	     compatible = "ion,physmem";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_SYSTEM>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "sys";
+	};
+
+6. kmalloc();
+
+	ion_chunk: ion@...eadbeef {
+	     compatible = "ion,physmem";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_SYSTEM_CONTIG>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "syscont";
+	};
+
+If the underlying heap relies on some physical device that needs clock
+gating, you may need to fill the clocks field in. E.g.:
+
+
+	ion_im0: ion@...0100000 {
+	     compatible = "ion,physmem";
+	     reg = <0x00100000 0x40000>;
+	     reg-names = "memory";
+	     ion-heap-id   = <2>;
+	     ion-heap-type = <ION_HEAP_TYPE_DMA>;
+	     ion-heap-align = <0x10>;
+	     ion-heap-name = "IM0";
+	     clocks = <&oscillator_27m>;
+	     clock-names = "clk_27m";
+	};
+
+ion-physmem will do everything required to enable and disable the clock.
-- 
2.1.4

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ