Unable to set up SDP (Secure Data Path) in Hikey 960

Hi,

I am trying to integrate the SDP patches for Hikey960 by manually applying all the patches mentioned in https://android-review.linaro.org/#/c/17907/1/hikey-optee-4.9 1.

The build that I am using is Kernel build from Android source.

But the main issue that I am facing is after reverting commit 5634cf8762d848b673a0de5259264fb5681d5d00 (https://android-review.linaro.org/#/c/18281/).

I am getting a build error.

drivers/gpu/drm/hisilicon/kirin960/kirin_fbdev.c: In function ‘kirin_alloc_fb_buffer’:
drivers/gpu/drm/hisilicon/kirin960/kirin_fbdev.c:97:2: error: implicit declaration of function ‘ion_map_iommu’ [-Werror=implicit-function-declaration]
_ if (ion_map_iommu(client, handle, &(fbdev->iommu_format))) {_
_ ^_
drivers/gpu/drm/hisilicon/kirin960/kirin_fbdev.c: In function ‘kirin_fbdev_mmap’:
drivers/gpu/drm/hisilicon/kirin960/kirin_fbdev.c:149:2: error: implicit declaration of function ‘ion_sg_table’ [-Werror=implicit-function-declaration]
_ table = ion_sg_table(fbdev->ion_client, fbdev->ion_handle);_
_ ^_
drivers/gpu/drm/hisilicon/kirin960/kirin_fbdev.c:149:8: warning: assignment makes pointer from integer without a cast
_ table = ion_sg_table(fbdev->ion_client, fbdev->ion_handle);_

This is quite obvious as the revert mentioned compromised the functions from ion.c and ion.h.

Does anyone have any idea how to proceed with the SDP feature in Hikey 960 ?

OP-TEE is NOT supported on HiKey960 AOSP yet, so the SDP patches haven’t been tested on the kernel build.

In any case, always refer to hikey-optee-4.9 - android-patchsets.git - for the latest SDP patches to use, not just any random one under https://android-review.linaro.org.

Thanks @vchong for your prompt reply.

I will follow your suggestion and get back to you if I have any further query.

I have also been trying to enable SDP in Hikey 960 board. I have applied the patchsets mentioned in ‘hikey-optee-4.9 - android-patchsets.git -’ to the ‘android-hikey-linaro-4.9’ branch of ‘kernel/hikey-linaro - Git at Google’ and came up with the error mentioned in the original post by @sayan
Looks like the ion library support after applying the patches does not support some of the functionalities desired by the kirin_fbdev implementation of ‘kirin_alloc_fb_buffer’ and ‘kirin_fbdev_mmap’ functions. The missing functionalities being ‘ion_map_iommu’ and ‘ion_sg_table’.
Are there some more patches to be considered?
@vchong could you please provide some pointers to work that has already been done in this area for other boards?

1 Like