Sandeep Tripathy | 1c47839 | 2020-08-12 18:42:13 +0530 | [diff] [blame] | 1 | /* |
Nishant Sharma | abdc8b7 | 2023-10-12 10:45:28 +0100 | [diff] [blame] | 2 | * Copyright (c) 2017-2023, ARM Limited and Contributors. All rights reserved. |
Sandeep Tripathy | 1c47839 | 2020-08-12 18:42:13 +0530 | [diff] [blame] | 3 | * Copyright (c) 2020, Broadcom |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #include <bl31/ehf.h> |
| 8 | |
| 9 | #include <platform_def.h> |
| 10 | |
| 11 | /* |
| 12 | * Enumeration of priority levels on ARM platforms. |
| 13 | */ |
| 14 | ehf_pri_desc_t plat_exceptions[] = { |
Manish Pandey | f90a73c | 2023-10-10 15:42:19 +0100 | [diff] [blame] | 15 | #if ENABLE_FEAT_RAS && FFH_SUPPORT |
Sandeep Tripathy | 1c47839 | 2020-08-12 18:42:13 +0530 | [diff] [blame] | 16 | /* RAS Priority */ |
| 17 | EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_RAS_PRI), |
| 18 | #endif |
| 19 | |
| 20 | #if SDEI_SUPPORT |
| 21 | /* Critical priority SDEI */ |
| 22 | EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SDEI_CRITICAL_PRI), |
| 23 | |
| 24 | /* Normal priority SDEI */ |
| 25 | EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SDEI_NORMAL_PRI), |
| 26 | #endif |
Omkar Anand Kulkarni | a01256e | 2023-05-31 16:10:09 +0530 | [diff] [blame] | 27 | |
Nishant Sharma | abdc8b7 | 2023-10-12 10:45:28 +0100 | [diff] [blame] | 28 | #if SPM_MM || (SPMC_AT_EL3 && SPMC_AT_EL3_SEL0_SP) |
Manish Pandey | f90a73c | 2023-10-10 15:42:19 +0100 | [diff] [blame] | 29 | #if ENABLE_FEAT_RAS && FFH_SUPPORT |
Omkar Anand Kulkarni | a01256e | 2023-05-31 16:10:09 +0530 | [diff] [blame] | 30 | #if (PLAT_SP_PRI != PLAT_RAS_PRI) |
Sandeep Tripathy | 1c47839 | 2020-08-12 18:42:13 +0530 | [diff] [blame] | 31 | EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SP_PRI), |
| 32 | #endif |
Omkar Anand Kulkarni | a01256e | 2023-05-31 16:10:09 +0530 | [diff] [blame] | 33 | #else |
| 34 | EHF_PRI_DESC(PLAT_PRI_BITS, PLAT_SP_PRI), |
| 35 | #endif |
| 36 | #endif |
| 37 | |
Elyes Haouas | 2be03c0 | 2023-02-13 09:14:48 +0100 | [diff] [blame] | 38 | /* Platform specific exceptions description */ |
Sandeep Tripathy | 1c47839 | 2020-08-12 18:42:13 +0530 | [diff] [blame] | 39 | #ifdef PLAT_EHF_DESC |
| 40 | PLAT_EHF_DESC, |
| 41 | #endif |
| 42 | }; |
| 43 | |
| 44 | /* Plug in ARM exceptions to Exception Handling Framework. */ |
| 45 | EHF_REGISTER_PRIORITIES(plat_exceptions, ARRAY_SIZE(plat_exceptions), PLAT_PRI_BITS); |