From 2b0e36e377e88e51331b0aadad8d001b66f2970c Mon Sep 17 00:00:00 2001 From: Chris Goldsworthy Date: Fri, 14 Apr 2023 17:14:38 -0700 Subject: [PATCH] securemsm-kernel: Compile the SMMU proxy driver with Bazel Compile the SMMU proxy driver with Bazel. Change-Id: I3323e2a6fec620354c4f9a6de1270ba9155998af Signed-off-by: Chris Goldsworthy --- BUILD.bazel | 10 ++++++++++ pineapple.bzl | 3 ++- securemsm_modules.bzl | 8 ++++++++ 3 files changed, 20 insertions(+), 1 deletion(-) diff --git a/BUILD.bazel b/BUILD.bazel index c669f4877d..641ae44bd8 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -47,6 +47,16 @@ ddk_headers( includes = [".", "crypto-qti"] ) +ddk_headers( + name = "smmu_proxy_headers", + hdrs = glob([ + "smmu-proxy/*.h", + "smmu-proxy/linux/*.h", + "smmu-proxy/uapi/linux/*.h" + ]), + includes = [".", "smmu-proxy"], +) + load("pineapple.bzl", "define_pineapple") define_pineapple() diff --git a/pineapple.bzl b/pineapple.bzl index 749c298315..42d48166f6 100644 --- a/pineapple.bzl +++ b/pineapple.bzl @@ -10,7 +10,8 @@ def define_pineapple(): "qce50_dlkm", "qcedev-mod_dlkm", "qrng_dlkm", - "qcrypto-msm_dlkm" + "qcrypto-msm_dlkm", + "smmu_proxy_dlkm" ], extra_options = [ "CONFIG_QCOM_SMCINVOKE"] diff --git a/securemsm_modules.bzl b/securemsm_modules.bzl index 5a941ced78..f72f021f82 100644 --- a/securemsm_modules.bzl +++ b/securemsm_modules.bzl @@ -4,6 +4,7 @@ TZLOG_PATH = "tz_log" HDCP_PATH = "hdcp" QCEDEV_PATH = "crypto-qti" QRNG_PATH = "qrng" +SMMU_PROXY_PATH = "smmu-proxy" # This dictionary holds all the securemsm-kernel modules included by calling register_securemsm_module securemsm_modules = {} @@ -121,3 +122,10 @@ register_securemsm_module( deps = [":qcedev_local_headers", "%b_qce50_dlkm"], ) + +register_securemsm_module( + name = "smmu_proxy_dlkm", + path = SMMU_PROXY_PATH, + srcs = ["qti-smmu-proxy-pvm.c", "qti-smmu-proxy-common.c"], + deps = ["%b_smcinvoke_dlkm", ":smmu_proxy_headers"], +)