Commit Graph
5 Commits
Author SHA1 Message Date
Dave Gerlach 37afff0d87 misc: sram: Integrate protect-exec reserved sram area type
Introduce a new "protect-exec" reserved sram area type which is
makes use of the the existing functionality provided for the "pool"
sram region type for use with the genalloc framework and with the
added requirement that it be maintained as read-only and executable
while allowing for an arbitrary number of drivers to share the space.

This introduces a common way to maintain a region of sram as read-only
and executable and also introduces a helper function, sram_exec_copy,
which allows for copying data to this protected region while maintaining
locking to avoid conflicts between multiple users of the same space. A
region of memory that is marked with the "protect-exec" flag in the
device tree also has the requirement of providing a page aligned block
of memory so that the page attribute manipulation does not affect
surrounding regions.

Also, selectively enable this only for builds that support set_memory_*
calls, for now just ARM, through the use of Kconfig.

Signed-off-by: Dave Gerlach <[email protected]>
Acked-by: Tony Lindgren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
2017-01-25 11:48:03 +01:00
Alexandre Belloni 15adffadc5 misc: sram: document new compatible
Add atmel,sama5d2-securam to the compatible list.

Signed-off-by: Alexandre Belloni <[email protected]>
Acked-by: Rob Herring <[email protected]>
2016-11-07 23:43:28 +01:00
Geert Uytterhoeven 2366b80f91 misc: sram: DT spelling s/#adress-cells/#address-cells/
Signed-off-by: Geert Uytterhoeven <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
2016-04-25 08:38:44 -05:00
Marcin Wojtas eb43e02313 misc: sram: add optional ioremap without write combining
Some SRAM users may require non-bufferable access to the memory, which is
impossible, because devm_ioremap_wc() is used for setting sram->virt_base.

This commit adds optional flag 'no-memory-wc', which allow to choose remap
method, using DT property. Documentation is updated accordingly.

Signed-off-by: Marcin Wojtas <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
2016-03-14 12:19:45 -04:00
Krzysztof Kozlowski 22697acdd7 dt-bindings: Consolidate SRAM bindings from all vendors
SRAM bindings for various SoCs, using the mmio-sram genalloc
API, are spread over different places - per SoC vendor. Since all of
these are quite similar (they depend on mmio-sram) move them to a common
place.

Suggested-by: Rob Herring <[email protected]>
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Cc: Heiko Stuebner <[email protected]>
Cc: Maxime Ripard <[email protected]>
Cc: Chen-Yu Tsai <[email protected]>
Cc: Kukjin Kim <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
Acked-by: Heiko Stuebner <[email protected]>
Signed-off-by: Rob Herring <[email protected]>
2015-12-09 15:29:37 -06:00