1 /* 2 * Copyright (c) 2025, Qualcomm Technologies, Inc. and/or its subsidiaries. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 #include <stddef.h> 7 8 #include <drivers/qti/accesscontrol/xpu.h> 9 #include <lib/mmio.h> 10 11 struct RGPartitionRangeType { 12 uint32_t rg_num; 13 uintptr_t start_addr; 14 uintptr_t end_addr; 15 }; 16 17 struct xpuInstanceType { 18 uintptr_t xpu_base_addr; 19 uint64_t owner_arr_size; 20 void *rg_owner; 21 uint64_t part_range_arr_size; 22 struct RGPartitionRangeType *partition_range; 23 int xpu_id; 24 uint32_t flag; 25 }; 26 27 #ifdef QTISECLIB_PATH 28 extern struct xpuInstanceType msm_xpu_cfg[]; 29 extern uint32_t msm_xpu_cfg_count; 30 #else 31 static struct xpuInstanceType msm_xpu_cfg[0]; 32 static uint32_t msm_xpu_cfg_count; 33 #endif 34 35 void qti_msm_xpu_bypass(void) 36 { 37 for (int i = 0; i < msm_xpu_cfg_count; i++) { 38 struct xpuInstanceType *xpu = &msm_xpu_cfg[i]; 39 40 for (int j = 0; j < xpu->part_range_arr_size; j++) { 41 xpu->partition_range[j].start_addr = 0xffffffff; 42 xpu->partition_range[j].end_addr = 0xffffffff; 43 } 44 } 45 } 46