Files
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

51 lines
2.2 KiB
C

/*
* Copyright (C) 2018 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 TMEM_ENTRY_H
#define TMEM_ENTRY_H
#include "private/tmem_device.h"
int tmem_core_session_open(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_session_close(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_ssmr_allocate(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_ssmr_release(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_alloc_chunk(enum TRUSTED_MEM_TYPE mem_type, u32 alignment,
u32 size, u32 *refcount, u32 *sec_handle, u8 *owner,
u32 id, u32 clean);
int tmem_query_gz_handle_to_pa(enum TRUSTED_MEM_TYPE mem_type, u32 alignment,
u32 size, u32 *refcount, u32 *gz_handle,
u8 *owner, u32 id, u32 clean, uint64_t *phy_addr);
int tmem_query_sec_handle_to_pa(enum TRUSTED_MEM_TYPE mem_type, u32 alignment,
u32 size, u32 *refcount, u32 *sec_handle,
u8 *owner, u32 id, u32 clean, uint64_t *phy_addr);
int tmem_core_alloc_chunk_priv(enum TRUSTED_MEM_TYPE mem_type, u32 alignment,
u32 size, u32 *refcount, u32 *sec_handle,
u8 *owner, u32 id, u32 clean);
int tmem_core_unref_chunk(enum TRUSTED_MEM_TYPE mem_type, u32 sec_handle,
u8 *owner, u32 id);
bool tmem_core_is_regmgr_region_on(enum TRUSTED_MEM_TYPE mem_type);
u64 tmem_core_get_regmgr_region_online_cnt(enum TRUSTED_MEM_TYPE mem_type);
u32 tmem_core_get_regmgr_region_ref_cnt(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_regmgr_online(enum TRUSTED_MEM_TYPE mem_type);
int tmem_core_regmgr_offline(enum TRUSTED_MEM_TYPE mem_type);
bool tmem_core_is_device_registered(enum TRUSTED_MEM_TYPE mem_type);
u32 tmem_core_get_min_chunk_size(enum TRUSTED_MEM_TYPE mem_type);
u32 tmem_core_get_max_pool_size(enum TRUSTED_MEM_TYPE mem_type);
bool tmem_core_get_region_info(enum TRUSTED_MEM_TYPE mem_type, u64 *pa,
u32 *size);
#endif /* end of TMEM_ENTRY_H */