Refactor platform data to allow for better
expansion in the future. Add void * for
elements unique to each heap type.
Change-Id: I435679819c67ce917b5798009eff7e71047fd2ea
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Secure buffers provides a way to allow premium encrypted
multimedia content to be decrypted in a secured
memory area that does not allow for interception of the
decrypted content.
Add support for heap type that allow heap to be
used for content protection. Introduce new content
protection heap type and id's.
Change-Id: Idd56aa8805b5b74d1b9ab3fe8964aacc218668c1
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Callbacks to request_region, release_region,
setup_region is missing from ION platform data for
SMI heap.
Change-Id: Ida603d4ac7c3246c0deedb9b80dc0c1ea64638eb
Signed-off-by: Olav Haugan <ohaugan@codeaurora.org>
Add infrastructure to support mapping allocations
into iommus.
Change-Id: Ia5eafebee408e297013bf55284abf67d9eb8d78b
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
This change is part of the move from PMEM to ION. ION needs an SMI
voting interface smiliar to PMEM's.
Change-Id: I18888f46198848694fb7e1e0d2671074bf51d7c9
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
Userspace clients pass fds around, not handles. Support flushing
via fd.
Change-Id: Ic22d9327e9fa72cb604c3010a2a6f798be8dfdb1
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
As part of the transition from PMEM to ION, the interface for accessing
SMI memory needs to be accessible from ION as it was from PMEM.
Change-Id: Ia6f9475dc030bbb0dafdcc1b6dbe93c7cdeca268
Signed-off-by: Alex Bird <alexbird@codeaurora.org>
Add err.h for the declaration of ERR_PTR which
is used with the stubbed out ion headers.
Change-Id: Ic5e5aea556723ea6b9c8953ef54ad5a82d3761ec
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add adsp heaps for ion. This corresponds directly
to what pmem currently does. This also includes disabling
the adsp and pmem heaps for pmem.
Change-Id: I4354c713413ebbe949579741efdd75e9c444c8e7
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add inline stubs for in-kernel Ion functions to use when
Ion is not enabled in the kernel config.
Change-Id: Ic0dedbadbe4d7bab8f24763e67dd775c769b06df
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Clients may want to know what the existing flags are on a
handle for mapping, cache flushing or other purposes. Add
an API to get those flags.
Change-Id: I2d8c93194d1fc940042529b8851ebecf35d6e3de
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Make sure the header file for Ion gets exported to userspace.
Also make sure userspace can actually use the header.
Change-Id: I44f436005a6a503811c85d4fb0f89264ba160571
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add explicit support for cached and uncached mappings. Functions
now describe whether mappings will be cached or uncached.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
Add infrastructure for supporting ion carveout heaps.
The memory type should be specified in the board file using
mach/ion.h. The ion platform driver will be responsible for
allocating the correct memory.
Signed-off-by: Laura Abbott <lauraa@codeaurora.org>
-- init rb nodes in ion_handle_create
-- in ion_handle_destroy, check that a node belongs to a tree before removing
it (safety check, does not happen right now)
-- mark as static functions used only inside ion.c
-- update comments to ion_share() with a relevant blurb from the implementation
-- other minor updates/typo fixes to comments
Signed-off-by: Iliyan Malchev <malchev@google.com>