Граф коммитов

16 Коммитов

Автор SHA1 Сообщение Дата
songrui
a3040bbd65 securemsm-kernel: Enable smmu-proxy compilation
Resolve compilation issues related to printing
caused by kernel upgrade.

Change-Id: I34db6dab0af32b75d0877ae55e6a493004e11de9
Signed-off-by: songrui <quic_songrui@quicinc.com>
2023-11-10 10:19:29 +08:00
Gaurav Kashyap
154b6011b0 securemsm-kernel: enable non-qtee modules
Fix compilation issues and enable all modules bound
by TARGET_KERNEL_DLKM_SECURE_MSM_OVERRIDE.

Change-Id: Id8e2d5ecb580d5fd200fe5e5e899202046136976
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
2023-10-04 11:50:16 -07:00
qctecmdr
e43059f322 Merge "securemsm-kernel: fix smcinvoke dependency" 2023-08-30 00:51:19 -07:00
Chris Goldsworthy
009ea1b0a5 smmu-proxy: Correctly allow a DMA-BUF to be mapped as RW
mem_buf_retrieve() is what will actually create a DMA-BUF, along with
the struct file that underpins the DMA-BUF's lifetime and user space
interface. The FD RWX permissions are set during this time, and
currently, we just supply a flags value of 0, corresponding to
read-only. Set the file permissions as O_RDWR accordingly.

Separately, dma_buf_fd(), which just exposes a DMA-BUF's struct file
to user space, ignores all other arguments other than O_CLOEXEC, so
discard the other arguments.

Change-Id: I5e81909f3b87edb28cbbb087ec1994004fd82e45
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-08-25 13:41:35 -07:00
Reut Zysman
a0b09e0715 securemsm-kernel: fix smcinvoke dependency
For hdcp and smmu, include smcinvoke_object.h
instead of smcinvoke.h.

Change-Id: Ieab17cfe70b779bd19d7596a3057e6d6c530b997
Signed-off-by: Reut Zysman <quic_rzysman@quicinc.com>
2023-08-23 21:32:02 -07:00
Chris Goldsworthy
6c1aa1e334 smmu-proxy: Change location of UAPI directory
Change the location of our UAPI directory in order to satisfy
directory structure requirements.

Change-Id: I620f441833fc1cbe5cd871028f2babba47af5ef4
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-07-31 12:53:37 -07:00
Chris Goldsworthy
53116dd965 securemsm-kernel: smmu-proxy: Remove TVM messaing log
Remove a log on the TVM when we receive a message in the proxy driver.

Change-Id: Ib7197eee830d0cf86b62893949cb6356c4a7b951
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-06-08 15:47:53 -07:00
Gaurav Kashyap
ed0eab9c68 sec-kernel: move uapi securemsm headers to uapi path
Move the securemsm-kernel uapi headers to a uapi include path,
to conform with the uapi requirements.

NOTE: Duplicating qcedev.h & smcinvoke.h temporarily until
clients that manually include the path use the exported headers.

Change-Id: I33d390954ff0e6c721a5fa8256b431020e4f8912
Signed-off-by: Gaurav Kashyap <quic_gaurkash@quicinc.com>
2023-06-05 09:47:37 -07:00
Chris Goldsworthy
e1ee568286 securemsm-kernel: smmu-proxy: Add custom fault handler
Add a custom fault handler for the SMMU proxy driver.

Change-Id: I155a047abb8899ba3458abd9bd48774965d339be
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-04-14 15:57:07 -07:00
Chris Goldsworthy
cc26427c40 securemsm-kernel: smmu-proxy: Zero the buffers on map and unmap
Zero the proxy buffers on mapping and unmapping them.

Change-Id: I3629f1333420aeefb4d0a6be8ad666d3e1dbc601
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-04-14 15:57:07 -07:00
Chris Goldsworthy
f2c054e049 securemsm-kernel: smmu-proxy: Move mapping state check
Proxy map calls on a locked and already-mapped buffer should succeed.
Re-arrange state checks in retrieve_and_iommu_map() to ensure this.

Change-Id: Ia14c565f2b6ba6ab97c5d4aca595b5ed707b5efb
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-04-14 15:57:07 -07:00
Chris Goldsworthy
cfb354651f securemsm-kernel: smmu-proxy: Fix CSF version caching code
We're not caching the CSF version despite intending to - fix this.

Change-Id: Iaf95c39eb0c3cade36a4c12454bb12fcd7becc74
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-04-14 15:57:07 -07:00
Chris Goldsworthy
d71f8c3401 securemsm-kernel: smmu-proxy: Return error on map failure
Return the failure code from the remote VM when smmu_proxy_map()
fails.

Change-Id: I7a7a8a5930275ce13e2bfea38365b878fba534bd
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-04-14 15:57:07 -07:00
Chris Goldsworthy
4b658ee6ce securemsm-kernel: smmu-proxy: Add full drivers
Add the full drivers for the PVM and TVM.

Change-Id: I3046306fff91670928c750ffa31db02bd0240c9c
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-03-09 21:52:47 -08:00
Chris Goldsworthy
e9c5417cdd securemsm-kernel: Add the base SMMU proxy driver
Add the base of the SMMU proxy driver for Android. The proxy driver
will take memory from the PVM, share it with the TVM and map it into
an S1 context bank on the TVM, before returning an IOVA for the mapped
buffer.

This patch intended to create the driver to allow other kenrel modules
to compile against it.

Change-Id: Id2951fbf467fcce0a3f1a1c45eba5b041f76f080
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-02-02 17:43:53 -08:00
Chris Goldsworthy
08b1eb82e2 securemsm-kernel: Add the UAPI headers for the SMMU proxy driver
Add the UAPI headers for the SMMU proxy driver and make them usable in
Android.

Change-Id: Ibea130d79631f4d973e957a43dffde27fc472035
Signed-off-by: Chris Goldsworthy <quic_cgoldswo@quicinc.com>
2023-02-02 17:41:37 -08:00