1 /* 2 * Copyright (c) 2025, Arm Limited and Contributors. All rights reserved. 3 * 4 * SPDX-License-Identifier: BSD-3-Clause 5 */ 6 7 #include <cdefs.h> 8 9 #include <arch_features.h> 10 #include <bl31/interrupt_mgmt.h> 11 #include <common/debug.h> 12 #include <drivers/arm/gicv5.h> 13 14 void __init gicv5_driver_init(void) 15 { 16 } 17 18 /* 19 * There exists a theoretical configuration where FEAT_RME is enabled 20 * without using TrustZone (i.e., no Secure world present). Currently, 21 * there is no reliable mechanism to detect this scenario at runtime. 22 * 23 * TODO: Add support for this configuration in the future if required. 24 */ 25 bool gicv5_has_interrupt_type(unsigned int type) 26 { 27 switch (type) { 28 case INTR_TYPE_EL3: 29 case INTR_TYPE_S_EL1: 30 case INTR_TYPE_NS: 31 return true; 32 case INTR_TYPE_RL: 33 return is_feat_rme_supported(); 34 default: 35 return false; 36 } 37 } 38 39 uint8_t gicv5_get_pending_interrupt_type(void) 40 { 41 /* there is no pending interrupt expected */ 42 return INTR_TYPE_INVAL; 43 } 44