1 /* 2 * Copyright (c) 2022-2022 Huawei Technologies Co., Ltd. All rights reserved. 3 * 4 * UniProton is licensed under Mulan PSL v2. 5 * You can use this software according to the terms and conditions of the Mulan PSL v2. 6 * You may obtain a copy of Mulan PSL v2 at: 7 * http://license.coscl.org.cn/MulanPSL2 8 * THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, 9 * EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, 10 * MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE. 11 * See the Mulan PSL v2 for more details. 12 * Create: 2022/11/18 13 * Description: shared data declaration 14 */ 15 16 #ifndef PRT_GIC_INTERNAL_H 17 #define PRT_GIC_INTERNAL_H 18 19 #include "../prt_gic_common_internal.h" 20 21 /* 22 * 模块间宏定义 23 */ 24 /* 各个board有差异的中断配置 */ 25 #define MAX_NNSPI_ID 31 // 系统可支持的最大NNSPI的中断号,为了代码归一,不支持NNSPI场景配置成MAX_PPI_ID相同 26 #define MIN_SPI_ID 32 // 系统可支持的最小SPI的中断号 27 #define GICD_SPI_IROUTERN_L_ADDR (GIC_GICD_BASE + 0x6000U) // GIC亲和性配置寄存器 28 29 /* 30 * 描述: GicV3 根据中断号获取全局中断亲和配置寄存器地址 31 */ OsGicGetRouterAddr(U32 intId)32OS_SEC_ALW_INLINE INLINE uintptr_t OsGicGetRouterAddr(U32 intId) 33 { 34 return GICD_SPI_IROUTERN_L_ADDR + (uintptr_t)(sizeof(uintptr_t) * intId); 35 } 36 37 #endif /* PRT_GIC_INTERNAL_H */ 38