Files
android/drivers/misc/mediatek/m4u/3.2/m4u_sec_gz.h
T
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

56 lines
1.5 KiB
C

/*
* Copyright (C) 2020 MediaTek Inc.
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*/
#ifndef M4U_GZ_SEC_H
#define M4U_GZ_SEC_H
#if defined(CONFIG_MTK_ENABLE_GENIEZONE)
#include "kree/mem.h"
#include "tz_m4u.h"
#include "kree/system.h"
struct m4u_sec_ty_context {
KREE_SESSION_HANDLE mem_sn; /*for mem service */
KREE_SESSION_HANDLE mem_hd;
KREE_SHAREDMEM_PARAM shm_param;
KREE_SESSION_HANDLE m4u_sn;
struct mutex ctx_lock;
int init;
};
struct m4u_gz_sec_context {
const char *name;
struct gz_m4u_msg *gz_m4u_msg;
void *imp;
};
int m4u_gz_sec_init(int mtk_iommu_sec_id);
int m4u_gz_sec_context_init(void);
int m4u_gz_sec_context_deinit(void);
void m4u_gz_sec_set_context(void);
struct m4u_gz_sec_context *m4u_gz_sec_ctx_get(void);
int m4u_gz_sec_ctx_put(struct m4u_gz_sec_context *ctx);
int m4u_gz_exec_cmd(struct m4u_gz_sec_context *ctx);
int m4u_unmap_gz_nonsec_buffer(int iommu_sec_id, unsigned long mva,
unsigned long size);
int m4u_map_gz_nonsec_buf(int iommu_sec_id, int port,
unsigned long mva, unsigned long size);
#endif/* #if defined(CONFIG_MTK_ENABLE_GENIEZONE) */
#endif