Hello Alex,
Hi Etienne,
Thanks a lot for the testing and suggestion!
Hi,
I have check the updated "ion unmapped heap" patches rebased on v4.9/topic/ion branch. Works nice but requires some updates.
Few changes in the kernel source:
- Patch "tee" driver (registering OPTEE shared memory through dmabuf FD)
https://github.com/etienne-lms/linux/commit/f2fbd9e7d65633a9bbd2406073b2092d...
I guess you want this patch in our ion branch. But could you like to show me how to pick up this patch from there? :)
Yes, i made a quite ugly statement. Simply fetch the branch "sdp-for-linaro-v4.9-ion" from https://github.com/etienne-lms/linux. There are the 3 kernel patches.
- Patch "ion" driver to implement the unmapped heap (2 step patch proposed)
https://github.com/etienne-lms/linux/commit/6f3606ee40b2a24e56b2d9516cae67f4...
+
https://github.com/etienne-lms/linux/commit/a87b3b51982d6e70ccc73f650d81bb8d...
Ditto.
Enable ION unmapped heap in kernel config (and ION of course) CONFIG_ION=y CONFIG_ION_UNMAPPED_HEAP=y
Platform needs to create (in the linux kernel) the ION 'unmapped heap' for target SDP memory area. This can be done either through some platform specific sequence or through linux configuration: CONFIG_ION_DUMMY_UNMAPPED_HEAP_BASE=<SDP-test-memory-phys-base> CONFIG_ION_DUMMY_UNMAPPED_HEAP_SIZE=<SDP-test-memory-byte-size>
If you don't care about the TEE and the SDP, simply ignore. You don't need to enable CONFIG_ION_UNMAPPED_HEAP. Once enabled, one can create "unmapped heaps" from kernel land. Providing a dummy location (phys-addr/size) allows to hard code a single heap (carveout or reserved in linux system memory) that is created at device init.
Based on latest OP-TEE (2.5.0), optee_test allows to test the SDP through ION unmapped heap support. Please patch optee_test with proposal below:
https://github.com/etienne-lms/optee_test/commit/bce6c3dba3afb72120628e097a7...
The patch seems not belong to a kernel tree. I can not find ion.h in include/uapi/linux/. How can I use this patch.
Actually, this reference relates to running the optee non regression tests, The with an updated 'xtest' tool for the ION changes in the kernel. If you want to run the optee non regression (incl. SDP test), you should get latest optee components (at least optee 2.5.0) and checkout branch "sdp-for-linaro-v4.9-ion" from "https://github.com/etienne-lms/optee_test".
The "optee_test" host/xtest/sdp-basic.c queries the ion device for the unmapped heap and allocates to for few optee sequences.
Thanks Alex
pleased, etienne
(and build the OP-TEE with *CFG_SECURE_DATA_PATH=y*)
Regards, etienne
Thanks! Alex
Regards, Joakim